mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 06:22:18 +00:00
Letzte Änderung
This commit is contained in:
@@ -61,6 +61,8 @@ class Notiz extends FHC_Controller
|
||||
$this->load->model('person/Notiz_model', 'NotizModel');
|
||||
$this->NotizModel->addJoin('public.tbl_notiz_dokument', 'notiz_id', 'LEFT');
|
||||
$this->NotizModel->addSelect('*');
|
||||
$this->NotizModel->addSelect("TO_CHAR(CASE WHEN public.tbl_notiz.updateamum >= public.tbl_notiz.insertamum
|
||||
THEN public.tbl_notiz.updateamum ELSE public.tbl_notiz.insertamum END::timestamp, 'DD.MM.YYYY HH24:MI:SS') AS lastUpdate");
|
||||
$this->NotizModel->addLimit(1);
|
||||
|
||||
$result = $this->NotizModel->loadWhere(
|
||||
|
||||
@@ -266,9 +266,27 @@ class Notiz_model extends DB_Model
|
||||
*/
|
||||
public function getNotizWithDocEntries($id, $type)
|
||||
{
|
||||
// ci query builder returns null
|
||||
/* $this->db->select('n.*, count(dms_id) as countDoc, z.notizzuordnung_id');
|
||||
$this->db->select('(CASE WHEN n.updateamum >= n.insertamum THEN n.updateamum ELSE n.insertamum END) AS lastUpdate');
|
||||
$this->db->from('public.tbl_notiz n');
|
||||
$this->db->join('public.tbl_notizzuordnung z', 'n.notiz_id = z.notiz_id');
|
||||
$this->db->join('public.tbl_notiz_dokument dok', 'n.notiz_id = dok.notiz_id', 'left');
|
||||
$this->db->join('campus.tbl_dms_version', 'dok.notiz_id = campus.tbl_dms_version.dms_id', 'left');
|
||||
$this->db->where("z.$type", $id);
|
||||
$this->db->group_by('n.notiz_id, z.notizzuordnung_id');
|
||||
|
||||
$query = $this->db->get();
|
||||
return $query->result();*/
|
||||
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
n.*, count(dms_id) as countDoc, z.notizzuordnung_id
|
||||
n.*, count(dms_id) as countDoc, z.notizzuordnung_id,
|
||||
TO_CHAR (CASE
|
||||
WHEN n.updateamum >= n.insertamum THEN n.updateamum
|
||||
ELSE n.insertamum
|
||||
END::timestamp, 'DD.MM.YYYY HH24:MI:SS') AS lastUpdate
|
||||
FROM
|
||||
public.tbl_notiz n
|
||||
JOIN
|
||||
@@ -284,6 +302,7 @@ class Notiz_model extends DB_Model
|
||||
";
|
||||
|
||||
return $this->execQuery($qry, array($id));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ export default {
|
||||
'typeId',
|
||||
'titel',
|
||||
'text',
|
||||
'lastChange',
|
||||
'von',
|
||||
'bis',
|
||||
'statusNew',
|
||||
@@ -49,6 +50,14 @@ export default {
|
||||
this.$emit('update:text', value);
|
||||
}
|
||||
},
|
||||
/* intLastChange: {
|
||||
get() {
|
||||
return this.lastChange;
|
||||
},
|
||||
set(value) {
|
||||
this.$emit('update:lastChange', value);
|
||||
}
|
||||
},*/
|
||||
intVon: {
|
||||
get() {
|
||||
return this.von;
|
||||
@@ -142,6 +151,13 @@ export default {
|
||||
<span class="small">[{{this.typeId}}]</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-7">
|
||||
<p v-if="statusNew" class="fw-bold">Neue Notiz</p>
|
||||
<p v-else class="fw-bold">Notiz bearbeiten</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="notizTitle row mb-3">
|
||||
<label for="titel" class="form-label col-sm-2">Titel</label>
|
||||
@@ -156,6 +172,7 @@ export default {
|
||||
<textarea rows="5" cols="75" v-model="intText" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- show Documentupload-->
|
||||
@@ -179,7 +196,7 @@ export default {
|
||||
<PvAutoComplete v-model="intVerfasser" optionLabel="mitarbeiter" :suggestions="filteredMitarbeiter" @complete="search" minLength="3"/>
|
||||
</div>
|
||||
|
||||
<label for="von" class="form-label col-sm-1">von</label>
|
||||
<label for="von" class="form-label col-sm-1">gültig von</label>
|
||||
<div class="col-sm-3">
|
||||
<vue-date-picker
|
||||
id="von"
|
||||
@@ -198,7 +215,7 @@ export default {
|
||||
<PvAutoComplete v-model="intBearbeiter" optionLabel="mitarbeiter" :suggestions="filteredMitarbeiter" @complete="search" minLength="3"/>
|
||||
</div>
|
||||
|
||||
<label for="bis" class="form-label col-sm-1">bis</label>
|
||||
<label for="bis" class="form-label col-sm-1">gültig bis</label>
|
||||
<div class="col-sm-3">
|
||||
<vue-date-picker
|
||||
id="bis"
|
||||
@@ -219,7 +236,15 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="lastChange" class="form-label col-sm-2 small">letzte Änderung</label>
|
||||
<div class="col-sm-7">
|
||||
<!-- <input v-model="lastChange" >-->
|
||||
<p class="small">{{this.lastChange}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>`
|
||||
|
||||
@@ -37,6 +37,7 @@ export default {
|
||||
{title: "Erledigt", field: "erledigt", visible: false},
|
||||
{title: "Notiz_id", field: "notiz_id", visible: false},
|
||||
{title: "Notizzuordnung_id", field: "notizzuordnung_id", visible: false},
|
||||
{title: "letzte Änderung", field: "lastupdate", visible: false},
|
||||
{
|
||||
formatter: editIcon, cellClick: (e, cell) => {
|
||||
this.actionEditNotiz(cell.getData().notiz_id);
|
||||
@@ -66,6 +67,7 @@ export default {
|
||||
titel: null,
|
||||
statusNew: true,
|
||||
text: null,
|
||||
lastChange: null,
|
||||
von: null,
|
||||
bis: null,
|
||||
document: null,
|
||||
@@ -93,6 +95,7 @@ export default {
|
||||
this.formData.titel = this.notizen.titel;
|
||||
this.formData.statusNew = false;
|
||||
this.formData.text = this.notizen.text;
|
||||
this.formData.lastChange = this.notizen.lastupdate;
|
||||
this.formData.von = this.notizen.start;
|
||||
this.formData.bis = this.notizen.ende;
|
||||
this.formData.document = this.notizen.dms_id;
|
||||
@@ -115,6 +118,7 @@ export default {
|
||||
this.formData.titel = '';
|
||||
this.formData.statusNew = true;
|
||||
this.formData.text = null;
|
||||
this.formData.lastChange = null;
|
||||
this.formData.von = null;
|
||||
this.formData.bis = null;
|
||||
this.formData.document = null;
|
||||
@@ -212,6 +216,7 @@ export default {
|
||||
titel: null,
|
||||
statusNew: true,
|
||||
text: null,
|
||||
lastChange: null,
|
||||
von: null,
|
||||
bis: null,
|
||||
document: null,
|
||||
@@ -299,6 +304,7 @@ export default {
|
||||
v-model:typeId="formData.typeId"
|
||||
v-model:titel="formData.titel"
|
||||
v-model:text="formData.text"
|
||||
:lastChange="formData.lastChange"
|
||||
v-model:statusNew="formData.statusNew"
|
||||
v-model:von="formData.von"
|
||||
v-model:bis="formData.bis"
|
||||
@@ -312,7 +318,7 @@ export default {
|
||||
|
||||
<button v-if="formData.statusNew" type="button" class="btn btn-primary" @click="addNewNotiz()"> Neu anlegen </button>
|
||||
<button v-else type="button" class="btn btn-primary" @click="updateNotiz(notizen.notiz_id)"> Speichern </button>
|
||||
|
||||
|
||||
</div>
|
||||
`
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user