mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-12 06:54:04 +00:00
Merge branch 'master' into cis40_2026-09_ma_rc
This commit is contained in:
@@ -574,6 +574,19 @@ class Kontakt extends FHCAPI_Controller
|
||||
$person_id = $this->input->post('person_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(
|
||||
[
|
||||
'kontakt_id' => $kontakt_id
|
||||
|
||||
@@ -103,6 +103,13 @@ export default {
|
||||
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) {
|
||||
const BsModal = this,
|
||||
slots = {};
|
||||
|
||||
@@ -263,7 +263,7 @@ export default {
|
||||
this.$refs[modalRef].hide();
|
||||
},
|
||||
reload() {
|
||||
this.$refs.table.reloadTable();
|
||||
this.$refs.table?.reloadTable();
|
||||
},
|
||||
searchFirma(event) {
|
||||
if (this.abortController.firmen) {
|
||||
|
||||
+15
-2
@@ -30,6 +30,9 @@ export default {
|
||||
computed: {
|
||||
betreuerFormOpened() {
|
||||
return this.newMode || this.editMode;
|
||||
},
|
||||
isMitarbeiter(){
|
||||
return this.autocompleteSelectedBetreuer?.name?.includes('Mitarbeiter') ?? false;
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -430,6 +433,11 @@ export default {
|
||||
},
|
||||
actionKontaktdatenBearbeiten() {
|
||||
if (!this.autocompleteSelectedBetreuer) return;
|
||||
if (this.isMitarbeiter)
|
||||
{
|
||||
this.$fhcAlert.alertError(this.$p.t('ui', 'editingMitarbeiterPVonly'));
|
||||
return;
|
||||
}
|
||||
this.$refs.kontaktdatenModal.show();
|
||||
},
|
||||
// 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>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
@@ -605,7 +618,7 @@ export default {
|
||||
</contact>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</bs-modal>
|
||||
|
||||
`
|
||||
}
|
||||
|
||||
@@ -63774,6 +63774,26 @@ I have been informed that I am under no obligation to consent to the transmissio
|
||||
)
|
||||
),
|
||||
// ### 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'
|
||||
)
|
||||
)
|
||||
),
|
||||
//**************************** CIS Projektabgabeuebersicht start
|
||||
array(
|
||||
'app' => 'core',
|
||||
|
||||
Reference in New Issue
Block a user