diff --git a/public/js/components/Cis/Cms/Content_types/News_content.js b/public/js/components/Cis/Cms/Content_types/News_content.js index a4eacd332..a17e8592a 100644 --- a/public/js/components/Cis/Cms/Content_types/News_content.js +++ b/public/js/components/Cis/Cms/Content_types/News_content.js @@ -1,6 +1,6 @@ import { replaceRelativeLegacyLink } from "../../../../helpers/LegacyLinkReplaceHelper.js" export default { - name: "GeneralComponent", + name: "NewsContentType", props:{ content:{ type:String, diff --git a/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js b/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js index 40627d98b..b8cfb52e4 100644 --- a/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js +++ b/public/js/components/Cis/Profil/ProfilComponents/FetchProfilUpdates.js @@ -88,6 +88,18 @@ export default { if (isMitarbeiter) { content["isMitarbeiter"] = isMitarbeiter; } + + const filesFromDatabase = + await this.$api + .call(ApiProfilUpdate.getProfilRequestFiles( + updateRequest.profil_update_id + )) + .then((res) => { + return res.data; + }); + + files = filesFromDatabase; + content["files"] = files; } //? adds the status information if the profil update request was rejected or accepted diff --git a/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/EditAdresse.js b/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/EditAdresse.js index 1dcde49c9..83d98a31f 100644 --- a/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/EditAdresse.js +++ b/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/EditAdresse.js @@ -1,8 +1,11 @@ +import Dms from "../../../../Form/Upload/Dms.js"; + import ApiProfil from '../../../../../api/factory/profil.js'; export default { components: { AutoComplete: primevue.autocomplete, + Dms: Dms }, props: { @@ -11,9 +14,13 @@ export default { type: Boolean, default: false, }, + files: { + type: Array, + default: [] + }, }, - inject: ["getZustelladressenCount"], + inject: ["getZustelladressenCount", "updateFileID"], data() { return { @@ -23,6 +30,8 @@ export default { nationenList: [], originalValue: null, zustellAdressenCount: null, + dmsData: [], + fileschanged: false }; }, @@ -83,6 +92,11 @@ export default { //? sets the value of a property to null when an empty string is entered to keep the isChanged function valid if (bind === "zustelladresse") { this.data[bind] = event.target.checked; + } else if(bind === 'files') { + if(this.dmsData.length > 0 && this.dmsData[0].type !== 'application/x.fhc-dms+json') { + this.fileschanged = true; + } + this.updateFileID(this.dmsData); } else { this.data[bind] = event.target.value === "" ? null : event.target.value; } @@ -91,6 +105,11 @@ export default { // update the zustellAdressen count this.zustellAdressenCount = this.getZustelladressenCount(); }, + + deleteDmsData: function() { + this.dmsData = []; + this.updateValue(null, 'files'); + } }, computed: { @@ -111,12 +130,14 @@ export default { !this.data.strasse || !this.data.plz || !this.data.ort || - !this.data.typ + !this.data.typ || + this.dmsData.length === 0 ) { return false; } - return this.originalValue !== JSON.stringify(this.data); + const datachanged = this.originalValue !== JSON.stringify(this.data); + return datachanged || this.fileschanged; }, }, @@ -133,6 +154,12 @@ export default { this.zustellAdressenCount = this.getZustelladressenCount(); }, + mounted() { + if (this.files) { + this.dmsData = this.files; + } + }, + template: /*html*/ `
@@ -212,9 +239,28 @@ export default {
- - - +
+
+
{{$p.t('profilUpdate','meldebestaetigung')}}*
+ +
+
+
 
+ +
+
`, diff --git a/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/Status.js b/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/Status.js index a0492a2da..d8c7637b3 100644 --- a/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/Status.js +++ b/public/js/components/Cis/Profil/ProfilModal/EditProfilComponents/Status.js @@ -112,14 +112,17 @@ export default {
{{topic}}
{{data.value}} -
- - {{file.name}} -
+ +
+
{{$p.t('profilUpdate','nachweisdokumente')}}
+
+ {{file.name}} +
+
`, }; diff --git a/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js b/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js index d9495f073..d23dcb1b8 100644 --- a/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js +++ b/public/js/components/Cis/ProfilUpdate/AcceptDenyUpdate.js @@ -188,16 +188,21 @@ export default { {{data.requested_change.value}} -
- - {{file.name}} -
+ + +
+
{{$p.t('profilUpdate','nachweisdokumente')}}
+
+ {{file.name}} +
+
+ diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 0bfcdc466..43e9c0fcc 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -29149,7 +29149,7 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Erneuern Sie ihr {0} und laden Sie die passenden Beweisdokumente hoch', + 'text' => 'Aktualisieren Sie ihren {0} und laden Sie die passenden Nachweisdokumente hoch', 'description' => '', 'insertvon' => 'system' ), @@ -48370,6 +48370,46 @@ and represent the current state of research on the topic. The prescribed citatio ) ) ), + array( + 'app' => 'core', + 'category' => 'profilUpdate', + 'phrase' => 'meldebestaetigung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Meldebestätigung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Confirmation of registration', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'profilUpdate', + 'phrase' => 'nachweisdokumente', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachweisdokumente', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Confirmation documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), );