Merge branch 'cis40_2026-05_ma_rc' into demo-cis40

This commit is contained in:
Harald Bamberger
2026-05-18 16:51:33 +02:00
5 changed files with 33 additions and 17 deletions
@@ -40,7 +40,9 @@ abstract class AbstractBestandteil implements IValidation
if( is_bool($new_value) && ($old_value !== $new_value) ) { if( is_bool($new_value) && ($old_value !== $new_value) ) {
$this->modifiedcolumns[$columnname] = $columnname; $this->modifiedcolumns[$columnname] = $columnname;
} else if($old_value != $new_value) { } else if(is_null($old_value) xor is_null($new_value)) {
$this->modifiedcolumns[$columnname] = $columnname;
} else if($old_value != $new_value) {
$this->modifiedcolumns[$columnname] = $columnname; $this->modifiedcolumns[$columnname] = $columnname;
} }
} }
@@ -137,19 +137,25 @@ EOTXT;
return parent::__toString() . $txt; return parent::__toString() . $txt;
} }
/* public function validate() public function validate()
{ {
if( !(filter_var($this->tage, FILTER_VALIDATE_INT, $value = $this->vordienstzeit;
array(
'options' => array( if ($value === null || $value === '') {
'min_range' => 1, $result = null; // allow null value
'max_range' => 50 } else {
) $result = filter_var($value, FILTER_VALIDATE_INT, [
) 'options' => [
)) ) { 'min_range' => 0,
$this->validationerrors[] = 'Urlaubsanspruch muss eine Tagesanzahl im Bereich 1 bis 50 sein.'; 'max_range' => 100
]
]);
if ($result === false) {
$this->validationerrors[] = 'Vordienstjahre muss eine ganze Zahl (0 bis 100) enthalten oder leer sein.';
}
} }
return parent::validate(); return parent::validate();
} */ }
} }
+9 -1
View File
@@ -275,11 +275,15 @@ const app = Vue.createApp({
data: () => ({ data: () => ({
appSideMenuEntries: {}, appSideMenuEntries: {},
windowWidth: 0, windowWidth: 0,
isStudent: null,
isMitarbeiter: null,
}), }),
provide() { provide() {
return { // provide injectable & watchable language property return { // provide injectable & watchable language property
language: Vue.computed(() => this.$p.user_language), language: Vue.computed(() => this.$p.user_language),
isMobile: Vue.computed(() => this.windowWidth < 767), isMobile: Vue.computed(() => this.windowWidth < 767),
isStudent: Vue.computed(() => this.isStudent),
isMitarbeiter: Vue.computed(() => this.isMitarbeiter)
} }
}, },
methods: { methods: {
@@ -320,8 +324,12 @@ const app = Vue.createApp({
this.windowWidth = window.innerWidth; this.windowWidth = window.innerWidth;
}, },
}, },
created() { async created() {
this.windowWidth = window.innerWidth; this.windowWidth = window.innerWidth;
await this.$api.call(ApiAuthinfo.getAuthInfo()).then((res) => {
this.isMitarbeiter = res.data.isMitarbeiter;
this.isStudent = res.data.isStudent;
});
}, },
async mounted() { async mounted() {
document.addEventListener('click', this.handleClick); document.addEventListener('click', this.handleClick);
@@ -100,7 +100,6 @@ export default {
} }
}, },
openPruefungen() { openPruefungen() {
// early return if the pruefungenData is empty or not set
if (!this.LvHasPruefungenInformation) return; if (!this.LvHasPruefungenInformation) return;
LvPruefungen.popup({ LvPruefungen.popup({
@@ -182,6 +181,7 @@ export default {
<a href="#" class="col-auto text-start text-decoration-none" @click.prevent="openPruefungen"> <a href="#" class="col-auto text-start text-decoration-none" @click.prevent="openPruefungen">
<i class="fa fa-check text-success" v-if="positiv"></i> <i class="fa fa-check text-success" v-if="positiv"></i>
<span class="ps-1" :style="'color:'+gradeColor">{{ grade || $p.t('lehre/noGrades') }}</span> <span class="ps-1" :style="'color:'+gradeColor">{{ grade || $p.t('lehre/noGrades') }}</span>
<i class="fa fa-circle-info ms-1"></i>
</a> </a>
</template> </template>
<!-- template for the LV with no pruefungen --> <!-- template for the LV with no pruefungen -->
@@ -201,4 +201,4 @@ export default {
</div> </div>
</div> </div>
</div>` </div>`
}; };
+2 -2
View File
@@ -264,8 +264,8 @@ CREATE TABLE IF NOT EXISTS hr.tbl_vertragsbestandteil_lohnguide (
stellenbezeichnung varchar(255), stellenbezeichnung varchar(255),
fachrichtung_kurzbz character varying(32) NOT NULL, fachrichtung_kurzbz character varying(32) NOT NULL,
modellstelle_kurzbz character varying(32) NOT NULL, modellstelle_kurzbz character varying(32) NOT NULL,
kommentar_person varchar(255), kommentar_person text,
kommentar_modellstelle varchar(255), kommentar_modellstelle text,
CONSTRAINT tbl_vertragsbestandteil_lohnguide_pk PRIMARY KEY (vertragsbestandteil_id), CONSTRAINT tbl_vertragsbestandteil_lohnguide_pk PRIMARY KEY (vertragsbestandteil_id),
CONSTRAINT tbl_vertragsbestandteil_fk FOREIGN KEY (vertragsbestandteil_id) REFERENCES hr.tbl_vertragsbestandteil (vertragsbestandteil_id) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE, CONSTRAINT tbl_vertragsbestandteil_fk FOREIGN KEY (vertragsbestandteil_id) REFERENCES hr.tbl_vertragsbestandteil (vertragsbestandteil_id) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT tbl_vertragsbestandteil_lohnguide_fachrichtung_fk FOREIGN KEY (fachrichtung_kurzbz) REFERENCES hr.tbl_lohnguide_fachrichtung (fachrichtung_kurzbz) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE, CONSTRAINT tbl_vertragsbestandteil_lohnguide_fachrichtung_fk FOREIGN KEY (fachrichtung_kurzbz) REFERENCES hr.tbl_lohnguide_fachrichtung (fachrichtung_kurzbz) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE,