mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-01 10:59:28 +00:00
verfasser nur noch readonly - wird im backend gesetzt
This commit is contained in:
@@ -29,7 +29,7 @@ class NotizAnrechnung extends Notiz_Controller
|
||||
{
|
||||
if($typeId != "anrechnung_id")
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//TODO define permission
|
||||
@@ -37,8 +37,8 @@ class NotizAnrechnung extends Notiz_Controller
|
||||
{
|
||||
$result = $this->p->t('lehre','error_keineSchreibrechte');
|
||||
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
$this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
}
|
||||
}
|
||||
@@ -29,15 +29,15 @@ class NotizBestellung extends Notiz_Controller
|
||||
{
|
||||
if($typeId != "bestellung_id")
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
//TODO define permission
|
||||
if(!$this->permissionlib->isBerechtigt('admin', 'suid') && !$this->permissionlib->isBerechtigt('assistenz', 'suid'))
|
||||
{
|
||||
$result = $this->p->t('lehre','error_keineSchreibrechte');
|
||||
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
$this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ class NotizLehreinheit extends Notiz_Controller
|
||||
{
|
||||
if($typeId != "lehreinheit_id")
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//TODO define permission
|
||||
@@ -37,8 +37,8 @@ class NotizLehreinheit extends Notiz_Controller
|
||||
{
|
||||
$result = $this->p->t('lehre','error_keineSchreibrechte');
|
||||
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
$this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ class NotizMitarbeiter extends Notiz_Controller
|
||||
{
|
||||
if($typeId != "mitarbeiter_uid")
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//TODO define permission
|
||||
@@ -37,8 +37,8 @@ class NotizMitarbeiter extends Notiz_Controller
|
||||
{
|
||||
$result = $this->p->t('lehre','error_keineSchreibrechte');
|
||||
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
$this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
}
|
||||
}
|
||||
@@ -25,17 +25,17 @@ class NotizPerson extends Notiz_Controller
|
||||
{
|
||||
if($typeId != "person_id")
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui', 'error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//TODO define permission
|
||||
if (!$this->permissionlib->isBerechtigt('admin', 'suid') && !$this->permissionlib->isBerechtigt('assistenz', 'suid'))
|
||||
{
|
||||
$result = $this->p->t('lehre', 'error_keineSchreibrechte');
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
return $this->outputJsonSuccess(true);
|
||||
$this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
}
|
||||
|
||||
public function loadDokumente()
|
||||
|
||||
@@ -29,7 +29,7 @@ class NotizPrestudent extends Notiz_Controller
|
||||
{
|
||||
if($typeId != "prestudent_id")
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//TODO define permission
|
||||
@@ -37,8 +37,8 @@ class NotizPrestudent extends Notiz_Controller
|
||||
{
|
||||
$result = $this->p->t('lehre','error_keineSchreibrechte');
|
||||
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
$this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ class NotizProjekt extends Notiz_Controller
|
||||
{
|
||||
if($typeId != "projekt_kurzbz")
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//TODO define permission
|
||||
@@ -25,8 +25,8 @@ class NotizProjekt extends Notiz_Controller
|
||||
{
|
||||
$result = $this->p->t('lehre','error_keineSchreibrechte');
|
||||
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
$this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ class NotizProjektphase extends Notiz_Controller
|
||||
{
|
||||
if($typeId != "projektphase_id")
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//TODO define permission
|
||||
@@ -25,8 +25,8 @@ class NotizProjektphase extends Notiz_Controller
|
||||
{
|
||||
$result = $this->p->t('lehre','error_keineSchreibrechte');
|
||||
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
$this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ class NotizProjekttask extends Notiz_Controller
|
||||
{
|
||||
if($typeId != "projekttask_id")
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_typeNotizIdIncorrect'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//TODO define permission
|
||||
@@ -25,8 +25,8 @@ class NotizProjekttask extends Notiz_Controller
|
||||
{
|
||||
$result = $this->p->t('lehre','error_keineSchreibrechte');
|
||||
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
$this->terminateWithSuccess("berechtigt in überschreibender Funktion");
|
||||
}
|
||||
}
|
||||
@@ -96,13 +96,13 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess(getData($result) ?: []);
|
||||
$this->terminateWithSuccess(getData($result) ?: []);
|
||||
}
|
||||
|
||||
|
||||
//Override function
|
||||
protected function isBerechtigt($id, $typeId){
|
||||
return $this->terminateWithError("in abstract function: define right in extension", self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError("in abstract function: define right in extension", self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
public function loadNotiz()
|
||||
@@ -142,14 +142,9 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
|
||||
$uid = getAuthUID();
|
||||
|
||||
if (isset($_POST['data']))
|
||||
{
|
||||
$data = json_decode($_POST['data']);
|
||||
unset($_POST['data']);
|
||||
foreach ($data as $k => $v) {
|
||||
$_POST[$k] = $v;
|
||||
}
|
||||
}
|
||||
$json = $this->input->post('data');
|
||||
$post_data = json_decode($json, true);
|
||||
$this->form_validation->set_data($post_data);
|
||||
|
||||
//Form Validation
|
||||
$this->form_validation->set_rules('titel', 'Titel', 'required', [
|
||||
@@ -165,26 +160,25 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$titel = $this->input->post('titel');
|
||||
$text = $this->input->post('text');
|
||||
$erledigt = $this->input->post('erledigt');
|
||||
$verfasser_uid = isset($_POST['verfasser']) ? $_POST['verfasser'] : $uid;
|
||||
$bearbeiter_uid = isset($_POST['bearbeiter']) ? $_POST['bearbeiter'] : null;
|
||||
$type = $this->input->post('typeId');
|
||||
$start = $this->input->post('start');
|
||||
$ende = $this->input->post('ende');
|
||||
$titel = $post_data['titel'];
|
||||
$text = $post_data['text'];
|
||||
$erledigt = $post_data['erledigt'];
|
||||
$bearbeiter_uid = isset($post_data['bearbeiter']) ? $post_data['bearbeiter'] : null;
|
||||
$type = $post_data['typeId'];
|
||||
$start = isset($post_data['start']) ? $post_data['start'] : null;
|
||||
$ende = isset($post_data['ende']) ? $post_data['ende'] : null;
|
||||
|
||||
// Start DB transaction
|
||||
$this->db->trans_start();
|
||||
|
||||
//Save note
|
||||
$result = $this->NotizModel->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => $erledigt, 'verfasser_uid' => $verfasser_uid,
|
||||
"insertvon" => $verfasser_uid, 'start' => $start, 'ende' => $ende, 'bearbeiter_uid' => $bearbeiter_uid));
|
||||
$result = $this->NotizModel->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => $erledigt, 'verfasser_uid' => $uid,
|
||||
"insertvon" => $uid, 'start' => $start, 'ende' => $ende, 'bearbeiter_uid' => $bearbeiter_uid));
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$notiz_id = $result->retval;
|
||||
@@ -219,7 +213,7 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
if (isError($result))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$dms_id_arr[] = $result->retval['dms_id'];
|
||||
}
|
||||
@@ -234,12 +228,12 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
if (isError($result))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->db->trans_commit();
|
||||
return $this->terminateWithSuccess($result);
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function updateNotiz()
|
||||
@@ -247,21 +241,14 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
$this->load->library('form_validation');
|
||||
$this->load->library('DmsLib');
|
||||
|
||||
if (isset($_POST['data']))
|
||||
{
|
||||
$data = json_decode($_POST['data']);
|
||||
unset($_POST['data']);
|
||||
foreach ($data as $k => $v) {
|
||||
$_POST[$k] = $v;
|
||||
}
|
||||
}
|
||||
$json = $this->input->post('data');
|
||||
$post_data = json_decode($json, true);
|
||||
|
||||
$notiz_id = $this->input->post('notiz_id');
|
||||
$this->form_validation->set_data($post_data);
|
||||
|
||||
if(!$notiz_id)
|
||||
{
|
||||
$this->terminateWithError($this->p->t('ui','error_missingId',['id'=>'Notiz_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->form_validation->set_rules('notiz_id', 'Notiz ID', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'notiz_id'])
|
||||
]);
|
||||
|
||||
//Form Validation
|
||||
$this->form_validation->set_rules('titel', 'Titel', 'required', [
|
||||
@@ -279,25 +266,23 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
|
||||
//update Notiz
|
||||
$uid = getAuthUID();
|
||||
$titel = $this->input->post('titel');
|
||||
$text = $this->input->post('text');
|
||||
$verfasser_uid = isset($_POST['verfasser']) ? $_POST['verfasser'] : $uid;
|
||||
$bearbeiter_uid = isset($_POST['bearbeiter']) ? $_POST['bearbeiter'] : $uid;
|
||||
$erledigt = $this->input->post('erledigt');
|
||||
$start = $this->input->post('start');
|
||||
$ende = $this->input->post('ende');
|
||||
$titel = $post_data['titel'];
|
||||
$text = $post_data['text'];
|
||||
$bearbeiter_uid = isset($post_data['bearbeiter']) ? $post_data['bearbeiter'] : $post_data['bearbeiter_uid'];
|
||||
$erledigt = $post_data['erledigt'];
|
||||
$start = $post_data['start'];
|
||||
$ende = $post_data['ende'];
|
||||
|
||||
$result = $this->NotizModel->update(
|
||||
[
|
||||
'notiz_id' => $notiz_id
|
||||
'notiz_id' => $post_data['notiz_id'],
|
||||
],
|
||||
[
|
||||
'titel' => $titel,
|
||||
'updatevon' => $uid,
|
||||
'updateamum' => date('c'),
|
||||
'text' => $text,
|
||||
'verfasser_uid' => $verfasser_uid,
|
||||
'bearbeiter_uid' => $bearbeiter_uid,
|
||||
'bearbeiter_uid' => isEmptyString($bearbeiter_uid) ? null : $bearbeiter_uid,
|
||||
'start' => $start,
|
||||
'ende' => $ende,
|
||||
'erledigt' => $erledigt
|
||||
@@ -305,7 +290,7 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
);
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
//update(1) loading all dms-entries with this notiz_id
|
||||
@@ -313,7 +298,7 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
$this->load->model('person/Notizdokument_model', 'NotizdokumentModel');
|
||||
$this->NotizdokumentModel->addJoin('campus.tbl_dms_version', 'dms_id');
|
||||
|
||||
$result = $this->NotizdokumentModel->loadWhere(array('notiz_id' => $notiz_id));
|
||||
$result = $this->NotizdokumentModel->loadWhere(array('notiz_id' => $post_data['notiz_id']));
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
foreach ($result as $doc) {
|
||||
$dms_id_arr[$doc->dms_id] = array(
|
||||
@@ -350,7 +335,7 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
$result = $this->getDataOrTerminateWithError($result);
|
||||
$dms_id = $result['dms_id'];
|
||||
|
||||
$result = $this->NotizdokumentModel->insert(array('notiz_id' => $notiz_id, 'dms_id' => $dms_id));
|
||||
$result = $this->NotizdokumentModel->insert(array('notiz_id' => $post_data['notiz_id'], 'dms_id' => $dms_id));
|
||||
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
}
|
||||
@@ -364,7 +349,7 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
$this->getDataOrTerminateWithError($result);
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess($result);
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
public function deleteNotiz()
|
||||
@@ -415,15 +400,15 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
if (isError($result))
|
||||
{
|
||||
$this->db->trans_rollback();
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
if(!hasData($result))
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_missingId', ['id'=> 'Notiz_id']), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_missingId', ['id'=> 'Notiz_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$this->db->trans_complete();
|
||||
return $this->terminateWithSuccess(getData($result));
|
||||
$this->terminateWithSuccess(getData($result));
|
||||
}
|
||||
|
||||
public function loadDokumente()
|
||||
@@ -439,14 +424,14 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
array('public.tbl_notiz.notiz_id' => $notiz_id)
|
||||
);
|
||||
if (isError($result)) {
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
if(!hasData($result))
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui','error_missingId', ['id'=> 'Notiz_id']), self::ERROR_TYPE_GENERAL);
|
||||
$this->terminateWithError($this->p->t('ui','error_missingId', ['id'=> 'Notiz_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess(getData($result));
|
||||
$this->terminateWithSuccess(getData($result));
|
||||
}
|
||||
|
||||
public function getMitarbeiter($searchString)
|
||||
@@ -456,7 +441,7 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
return $this->terminateWithSuccess($result);
|
||||
$this->terminateWithSuccess($result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import VueDatePicker from '../vueDatepicker.js.php';
|
||||
import PvAutoComplete from "../../../../index.ci.php/public/js/components/primevue/autocomplete/autocomplete.esm.min.js";
|
||||
import FormUploadDms from '../Form/Upload/Dms.js';
|
||||
import {CoreFilterCmpt} from "../filter/Filter.js";
|
||||
import BsModal from "../Bootstrap/Modal.js";
|
||||
@@ -11,7 +10,6 @@ export default {
|
||||
components: {
|
||||
CoreFilterCmpt,
|
||||
VueDatePicker,
|
||||
PvAutoComplete,
|
||||
FormUploadDms,
|
||||
FormForm,
|
||||
FormInput,
|
||||
@@ -281,6 +279,7 @@ export default {
|
||||
showId: false,
|
||||
showLastupdate: false
|
||||
},
|
||||
currentVerfasserUid: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -308,8 +307,6 @@ export default {
|
||||
this.notizData.bis = this.notizen.ende;
|
||||
this.notizData.document = this.notizen.dms_id;
|
||||
this.notizData.erledigt = this.notizen.erledigt;
|
||||
this.notizData.verfasser = this.notizen.verfasser_uid;
|
||||
this.notizData.intVerfasser = this.notizen.verfasser_uid;
|
||||
this.notizData.intBearbeiter = this.notizen.bearbeiter_uid;
|
||||
this.notizData.bearbeiter = this.notizen.bearbeiter_uid;
|
||||
}
|
||||
@@ -373,6 +370,7 @@ export default {
|
||||
this.notizData = result.data;
|
||||
this.notizData.typeId = this.typeId;
|
||||
this.notizData.anhang = [];
|
||||
this.currentVerfasserUid = result.data.verfasser_uid;
|
||||
return result;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
@@ -425,16 +423,17 @@ export default {
|
||||
bis: null,
|
||||
document: null,
|
||||
erledigt: false,
|
||||
verfasser: this.uid,
|
||||
bearbeiter: null,
|
||||
anhang: []
|
||||
anhang: [],
|
||||
};
|
||||
this.currentVerfasserUid = this.uid
|
||||
},
|
||||
getUid() {
|
||||
return this.$api
|
||||
.call(this.endpoint.getUid())
|
||||
.then(result => {
|
||||
this.notizData.intVerfasser = result.data;
|
||||
this.currentVerfasserUid = result.data;
|
||||
this.uid = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
@@ -518,14 +517,7 @@ export default {
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'notizData.intVerfasser': {
|
||||
handler(newVal) {
|
||||
if (typeof newVal === 'object') {
|
||||
this.notizData.verfasser = newVal.mitarbeiter_uid;
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
|
||||
id() {
|
||||
this.reload();
|
||||
}
|
||||
@@ -627,24 +619,23 @@ export default {
|
||||
<div class="row mb-3">
|
||||
<label for="bis" class="form-label col-sm-2">{{$p.t('notiz','verfasser')}}</label>
|
||||
|
||||
<div v-if="notizData.verfasser_uid" class="col-sm-3">
|
||||
<input type="text" :readonly="readonly" class="form-control" id="name" v-model="notizData.verfasser_uid">
|
||||
</div>
|
||||
<div v-else class="col-sm-3">
|
||||
<PvAutoComplete v-model="notizData.intVerfasser" optionLabel="mitarbeiter" :suggestions="filteredMitarbeiter" @complete="search" minLength="3"/>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" readonly="readonly" class="form-control" id="name" v-model="currentVerfasserUid">
|
||||
</div>
|
||||
|
||||
<label for="von" class="form-label col-sm-1">{{$p.t('global','gueltigVon')}}</label>
|
||||
<div class="col-sm-3">
|
||||
<vue-date-picker
|
||||
id="von"
|
||||
v-model="notizData.start"
|
||||
clearable="false"
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
v-model="notizData['start']"
|
||||
name="von"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"
|
||||
:teleport="true"
|
||||
preview-format="dd.MM.yyyy"></vue-date-picker>
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -652,26 +643,35 @@ export default {
|
||||
<label for="bis" class="form-label col-sm-2">{{$p.t('notiz','bearbeiter')}}</label>
|
||||
|
||||
<div v-if="notizData.bearbeiter_uid" class="col-sm-3">
|
||||
<input type="text" :readonly="readonly" class="form-control" id="name" v-model="notizData.bearbeiter_uid">
|
||||
<input type="text" class="form-control" id="name" v-model="notizData.bearbeiter_uid">
|
||||
</div>
|
||||
|
||||
<div v-else class="col-sm-3">
|
||||
<PvAutoComplete v-model="notizData.intBearbeiter" optionLabel="mitarbeiter" :suggestions="filteredMitarbeiter" @complete="search" minlength="3"/>
|
||||
<form-input
|
||||
type="autocomplete"
|
||||
v-model="notizData.intBearbeiter"
|
||||
:suggestions="filteredMitarbeiter"
|
||||
@complete="search"
|
||||
optionLabel="mitarbeiter"
|
||||
minlength="3"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
|
||||
<label for="bis" class="form-label col-sm-1">{{$p.t('global','gueltigBis')}}</label>
|
||||
<div class="col-sm-3">
|
||||
<vue-date-picker
|
||||
id="bis"
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
v-model="notizData.ende"
|
||||
clearable="false"
|
||||
name="bis"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"
|
||||
:teleport="true"
|
||||
preview-format="dd.MM.yyyy">
|
||||
</vue-date-picker>
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -811,28 +811,15 @@ export default {
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
v-if="notizData.verfasser_uid"
|
||||
container-class="col-6"
|
||||
:label="$p.t('notiz', 'verfasser')"
|
||||
type="text"
|
||||
v-model="notizData.verfasser_uid"
|
||||
name="titel"
|
||||
readonly="readonly"
|
||||
v-model="currentVerfasserUid"
|
||||
name="verfasser"
|
||||
>
|
||||
</form-input>
|
||||
|
||||
<form-input
|
||||
v-else
|
||||
container-class="col-6"
|
||||
:label="$p.t('notiz', 'verfasser')"
|
||||
type="autocomplete"
|
||||
v-model="notizData.intVerfasser"
|
||||
:suggestions="filteredMitarbeiter"
|
||||
@complete="search"
|
||||
optionLabel="mitarbeiter"
|
||||
minLength="3"
|
||||
>
|
||||
</form-input>
|
||||
|
||||
|
||||
<form-input
|
||||
v-if="notizData.bearbeiter_uid"
|
||||
container-class="col-6"
|
||||
@@ -977,25 +964,12 @@ export default {
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
v-if="notizData.verfasser_uid"
|
||||
container-class="col-6"
|
||||
:label="$p.t('notiz', 'verfasser')"
|
||||
type="text"
|
||||
v-model="notizData.verfasser_uid"
|
||||
name="titel"
|
||||
>
|
||||
</form-input>
|
||||
|
||||
<form-input
|
||||
v-else
|
||||
container-class="col-6"
|
||||
:label="$p.t('notiz', 'verfasser')"
|
||||
type="autocomplete"
|
||||
v-model="notizData.intVerfasser"
|
||||
:suggestions="filteredMitarbeiter"
|
||||
@complete="search"
|
||||
optionLabel="mitarbeiter"
|
||||
minLength="3"
|
||||
readonly="readonly"
|
||||
v-model="currentVerfasserUid"
|
||||
name="verfasser"
|
||||
>
|
||||
</form-input>
|
||||
|
||||
@@ -1164,28 +1138,15 @@ export default {
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
v-if="notizData.verfasser_uid"
|
||||
container-class="col-6"
|
||||
:label="$p.t('notiz', 'verfasser')"
|
||||
type="text"
|
||||
v-model="notizData.verfasser_uid"
|
||||
name="titel"
|
||||
readonly="readonly"
|
||||
v-model="currentVerfasserUid"
|
||||
name="verfasser"
|
||||
>
|
||||
</form-input>
|
||||
|
||||
<form-input
|
||||
v-else
|
||||
container-class="col-6"
|
||||
:label="$p.t('notiz', 'verfasser')"
|
||||
type="autocomplete"
|
||||
v-model="notizData.intVerfasser"
|
||||
:suggestions="filteredMitarbeiter"
|
||||
@complete="search"
|
||||
optionLabel="mitarbeiter"
|
||||
minLength="3"
|
||||
>
|
||||
</form-input>
|
||||
|
||||
|
||||
<form-input
|
||||
v-if="notizData.bearbeiter_uid"
|
||||
container-class="col-6"
|
||||
|
||||
@@ -22,7 +22,7 @@ export default {
|
||||
class="overflow-hidden"
|
||||
:endpoint="endpoint"
|
||||
ref="formc"
|
||||
notiz-layout="twoColumnsFormLeft"
|
||||
notiz-layout="popupModal"
|
||||
type-id="person_id"
|
||||
:id="modelValue.person_id"
|
||||
show-document
|
||||
|
||||
Reference in New Issue
Block a user