diff --git a/application/core/Tag_Controller.php b/application/core/Tag_Controller.php index 5c0a580ef..6f6cef31b 100644 --- a/application/core/Tag_Controller.php +++ b/application/core/Tag_Controller.php @@ -64,6 +64,7 @@ class Tag_Controller extends FHCAPI_Controller tag ' ); + $this->NotiztypModel->addOrder('prioritaet'); $notiztypen = $this->NotiztypModel->loadWhere(array('aktiv' => true)); $this->terminateWithSuccess(hasData($notiztypen) ? getData($notiztypen) : array()); } diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php index bfd8aa258..9e81ca835 100644 --- a/application/models/person/Notiz_model.php +++ b/application/models/person/Notiz_model.php @@ -142,7 +142,7 @@ class Notiz_model extends DB_Model // Join with the table public.tbl_notizzuordnung using notiz_id $this->addJoin('public.tbl_notizzuordnung', 'notiz_id'); - return $this->loadWhere(array('person_id' => $person_id)); + return $this->loadWhere(array('person_id' => $person_id, 'tbl_notiz.typ' => NULL)); } /** diff --git a/include/notiz.class.php b/include/notiz.class.php index 5d237e2b8..6e4edd0df 100644 --- a/include/notiz.class.php +++ b/include/notiz.class.php @@ -325,7 +325,7 @@ class notiz extends basis_db FROM public.tbl_notiz LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) - WHERE 1=1"; + WHERE 1=1 AND AND tbl_notiz.typ IS NULL "; if(!is_null($erledigt)) { @@ -523,7 +523,7 @@ class notiz extends basis_db FROM public.tbl_notiz LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) - WHERE 1=1"; + WHERE 1=1 AND tbl_notiz.typ IS NULL "; if(!is_null($erledigt)) { diff --git a/public/css/tags.css b/public/css/tags.css index b97e4c1fc..8cf306626 100644 --- a/public/css/tags.css +++ b/public/css/tags.css @@ -1,4 +1,4 @@ -:is(.tag_notice, .tag_inwork, .tag_planning, .tag_prio_one, .tag_prio_two, .tag_finished, .display_all) { +.tag { display: inline-block; padding: 5px 10px; margin-right: 5px; @@ -12,47 +12,72 @@ vertical-align: baseline; } -:is(.tag_notice, .tag_inwork, .tag_planning, .tag_prio_one, .tag_prio_two, .tag_finished):hover { +.tag:hover +{ transform: scale(1.15); } -.tag_notice { - background-color: orangered !important; +.tag_rot { + background-color: #ff0000ff; } -.tag_finished { - background-color: green !important; -} - -.tag_inwork { - background-color: violet !important; -} - -.tag_planning { - background-color: lightblue !important; -} - -.tag_prio_one { - background-color: red !important; -} - -.tag_prio_two { - background-color: yellow !important; +.tag_gelb { + background-color: #ffff00ff; color: black; } +.tag_gruen { + background-color: #008000ff; +} + +.tag_rosa { + background-color: #FFC1C1; + color: black; +} + +.tag_aprikose { + background-color: #4f7596; +} + +.tag_pfirsich { + background-color: #a15f95; +} + +.tag_orange { + background-color: #ffA500ff; +} + + +.tag_braun { + background-color: #6d4c41; +} + +.tag_blau { + background-color: #508498; +} + +.tag_lavendel { + background-color: #C7A3FF; +} + +.tag_limette { + background-color: #D3FFCE; +} + +.tag_done { + text-decoration: line-through; +} .display_all { background-color: darkgrey !important; border: none; } - -.dropdown-list { +.dropdown_list { list-style: none; background-color: white; border: 1px solid #ccc; border-radius: 5px; - box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); z-index: 1000; position: absolute; padding: 10px 10px 10px; @@ -60,17 +85,14 @@ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + cursor: pointer; } -.plus-button-container.disabled { +.plus_button_container.disabled { pointer-events: none; opacity: 0.5; } -.tag-done { - text-decoration: line-through; -} - .modificationdate { font-style: italic; font-size: 0.7em; diff --git a/public/js/components/Tag/Tag.js b/public/js/components/Tag/Tag.js index c4a3f0846..b1bf33dbd 100644 --- a/public/js/components/Tag/Tag.js +++ b/public/js/components/Tag/Tag.js @@ -23,6 +23,10 @@ export default { values: { type: Array, required: true + }, + confirmLimit: { + type: Number, + default: 20 } }, data() { @@ -120,11 +124,16 @@ export default { } else { + if (this.$fhcAlert && postData.values.length >= this.confirmLimit) + { + if (await this.$fhcAlert.confirm({message: `Der Tag wird für ${postData.values.length} Einträge gesetzt. Sind Sie sicher?`}) === false) + return; + } + this.endpoint.addTag(postData) .then(response => response.data) .then(response => { if (typeof response === 'number') { - console.log(response); this.tagData.id = response; } else { this.tagData.response = response; @@ -182,13 +191,13 @@ export default { } }, template: ` -
+
-