1) When adding a new document, add checks to validate the existence of the same document with the local client-data service. using /gwc/document/exists service.
Currently fields are validated as they are entered. A similar check needs to be added in render()of DocumentForm - which checks if the document exists (if all fields are valid - i.e. document can be saved) . It is a pre-save existence check.
2) On save (before calling the "add" service) a 2nd level of check is needed which checks for the document's existence on the portal-ui backend (gawati-data) . So a service on that needs to be called to verify if the document exists on the public portal. If it does, a warning must be shown to the user that the document already exists on the public portal. A doc-exists api will need to be added in gawati-data.
@ashwinibm for point 2. above we need to show a confirmation dialog telling the user the document exists on a public portal are they sure they want to add.
1) When adding a new document, add checks to validate the existence of the same document with the local client-data service. using
/gwc/document/exists
service.Currently fields are validated as they are entered. A similar check needs to be added in render()of DocumentForm - which checks if the document exists (if all fields are valid - i.e. document can be saved) . It is a pre-save existence check.
2) On save (before calling the "add" service) a 2nd level of check is needed which checks for the document's existence on the portal-ui backend (gawati-data) . So a service on that needs to be called to verify if the document exists on the public portal. If it does, a warning must be shown to the user that the document already exists on the public portal. A doc-exists api will need to be added in gawati-data.