mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-12 06:54:04 +00:00
Merge branch 'bug-83698/StudVW_Projektarbeit_Kontaktdaten'
This commit is contained in:
@@ -574,6 +574,19 @@ class Kontakt extends FHCAPI_Controller
|
|||||||
$person_id = $this->input->post('person_id');
|
$person_id = $this->input->post('person_id');
|
||||||
$standort_id = $this->input->post('standort_id');
|
$standort_id = $this->input->post('standort_id');
|
||||||
|
|
||||||
|
//check person_id: allow editing only of persons who are no mitarbeiter
|
||||||
|
if($person_id)
|
||||||
|
{
|
||||||
|
$this->load->model('person/Benutzer_model', 'BenutzerModel');
|
||||||
|
$this->BenutzerModel->addJoin('public.tbl_mitarbeiter ma', 'ON (ma.mitarbeiter_uid = public.tbl_benutzer.uid)');
|
||||||
|
|
||||||
|
$result = $this->BenutzerModel->loadWhere([
|
||||||
|
'person_id' => $person_id
|
||||||
|
]);
|
||||||
|
if(hasData($result))
|
||||||
|
return $this->terminateWithError($this->p->t('ui', 'editingMitarbeiterPVonly'), self::ERROR_TYPE_GENERAL);
|
||||||
|
}
|
||||||
|
|
||||||
$result = $this->KontaktModel->update(
|
$result = $this->KontaktModel->update(
|
||||||
[
|
[
|
||||||
'kontakt_id' => $kontakt_id
|
'kontakt_id' => $kontakt_id
|
||||||
|
|||||||
@@ -103,6 +103,13 @@ export default {
|
|||||||
keyboard: this.keyboard
|
keyboard: this.keyboard
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//to avoid pagelocks if more than one instance
|
||||||
|
beforeUnmount() {
|
||||||
|
if (this.modal) {
|
||||||
|
this.modal.dispose();
|
||||||
|
this.modal = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
popup(body, options, title, footer) {
|
popup(body, options, title, footer) {
|
||||||
const BsModal = this,
|
const BsModal = this,
|
||||||
slots = {};
|
slots = {};
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ export default {
|
|||||||
this.$refs[modalRef].hide();
|
this.$refs[modalRef].hide();
|
||||||
},
|
},
|
||||||
reload() {
|
reload() {
|
||||||
this.$refs.table.reloadTable();
|
this.$refs.table?.reloadTable();
|
||||||
},
|
},
|
||||||
searchFirma(event) {
|
searchFirma(event) {
|
||||||
if (this.abortController.firmen) {
|
if (this.abortController.firmen) {
|
||||||
|
|||||||
+15
-2
@@ -30,6 +30,9 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
betreuerFormOpened() {
|
betreuerFormOpened() {
|
||||||
return this.newMode || this.editMode;
|
return this.newMode || this.editMode;
|
||||||
|
},
|
||||||
|
isMitarbeiter(){
|
||||||
|
return this.autocompleteSelectedBetreuer?.name?.includes('Mitarbeiter') ?? false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -430,6 +433,11 @@ export default {
|
|||||||
},
|
},
|
||||||
actionKontaktdatenBearbeiten() {
|
actionKontaktdatenBearbeiten() {
|
||||||
if (!this.autocompleteSelectedBetreuer) return;
|
if (!this.autocompleteSelectedBetreuer) return;
|
||||||
|
if (this.isMitarbeiter)
|
||||||
|
{
|
||||||
|
this.$fhcAlert.alertError(this.$p.t('ui', 'editingMitarbeiterPVonly'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$refs.kontaktdatenModal.show();
|
this.$refs.kontaktdatenModal.show();
|
||||||
},
|
},
|
||||||
// stuff to do after new person has been saved
|
// stuff to do after new person has been saved
|
||||||
@@ -494,7 +502,12 @@ export default {
|
|||||||
<button class="btn btn-outline-secondary" @click="actionNewPerson">{{ $p.t('projektarbeit', 'neuePersonAnlegen') }}</button>
|
<button class="btn btn-outline-secondary" @click="actionNewPerson">{{ $p.t('projektarbeit', 'neuePersonAnlegen') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<button class="btn btn-outline-secondary float-end" @click="actionKontaktdatenBearbeiten">{{ $p.t('projektarbeit', 'kontaktdatenBearbeiten') }}</button>
|
<button
|
||||||
|
class="btn btn-outline-secondary float-end"
|
||||||
|
@click="actionKontaktdatenBearbeiten"
|
||||||
|
>
|
||||||
|
{{ $p.t('projektarbeit', 'kontaktdatenBearbeiten') }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -605,7 +618,7 @@ export default {
|
|||||||
</contact>
|
</contact>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</bs-modal>
|
</bs-modal>
|
||||||
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62751,8 +62751,28 @@ I have been informed that I am under no obligation to consent to the transmissio
|
|||||||
'insertvon' => 'system'
|
'insertvon' => 'system'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
// ### Infocenter Onboarding END
|
// ### Infocenter Onboarding END
|
||||||
|
array(
|
||||||
|
'app' => 'core',
|
||||||
|
'category' => 'ui',
|
||||||
|
'phrase' => 'editingMitarbeiterPVonly',
|
||||||
|
'insertvon' => 'system',
|
||||||
|
'phrases' => array(
|
||||||
|
array(
|
||||||
|
'sprache' => 'German',
|
||||||
|
'text' => 'Kontaktdaten von Mitarbeiter*innen dürfen nur in der Personalverwaltung editiert werden.',
|
||||||
|
'description' => '',
|
||||||
|
'insertvon' => 'system'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'sprache' => 'English',
|
||||||
|
'text' => 'Employee contact details may only be edited in the personnel administration system.',
|
||||||
|
'description' => '',
|
||||||
|
'insertvon' => 'system'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user