- added download application pdf button for submitted applications;

- fixed adding files for call;
This commit is contained in:
Vitalii Kiiko
2024-10-12 13:49:40 +02:00
parent 68f2d756ce
commit 6bfe2f9728
14 changed files with 400 additions and 264 deletions

View File

@@ -1,6 +1,7 @@
import { useEffect } from 'react';
import { __ } from '@wordpress/i18n';
import equal from 'fast-deep-equal';
import { diff } from 'deep-object-diff';
// store
import { storeGet } from '../../store';
@@ -10,7 +11,8 @@ const UnsavedChangesDetector = ({ getValuesFn }) => {
const formData = getValuesFn();
const initial = storeGet.main.formInitialData();
const isEqual = equal(initial, formData);
// TODO
//console.log('isEqual', isEqual, initial, formData, diff(initial, formData))
if (!isEqual) {
event.returnValue = __('You have unsaved changes. If you proceed, they will be lost.', 'gepafin');
}