diff --git a/application/controllers/api/frontend/v1/education/Ferien.php b/application/controllers/api/frontend/v1/education/Ferien.php index 993deb51c..be9dd2437 100644 --- a/application/controllers/api/frontend/v1/education/Ferien.php +++ b/application/controllers/api/frontend/v1/education/Ferien.php @@ -72,10 +72,10 @@ class Ferien extends FHCAPI_Controller $filterVonDatum = $this->input->get('filterVonDatum'); $filterBisDatum = $this->input->get('filterBisDatum'); - if (isset($filterVonDatum) && !isValidDate($filterVonDatum)) + if (isset($filterVonDatum) && !is_valid_date($filterVonDatum)) return $this->terminateWithError($this->p->t('ui', 'error_invalid_date'), self::ERROR_TYPE_GENERAL); - if (isset($filterBisDatum) && !isValidDate($filterBisDatum)) + if (isset($filterBisDatum) && !is_valid_date($filterBisDatum)) return $this->terminateWithError($this->p->t('ui', 'error_invalid_date'), self::ERROR_TYPE_GENERAL); $this->FerienModel->addSelect( @@ -158,10 +158,10 @@ class Ferien extends FHCAPI_Controller if (!isset($oe_kurzbz) || isEmptyString($oe_kurzbz)) return $this->terminateWithError($this->p->t('ferien', 'error_missingId', ['id' => 'Organisationseinheit'])); - if (isset($vondatum) && !isValidDate($vondatum)) + if (isset($vondatum) && !is_valid_date($vondatum)) return $this->terminateWithError($this->p->t('ui', 'error_invalid_date'), self::ERROR_TYPE_GENERAL); - if (isset($bisdatum) && !isValidDate($bisdatum)) + if (isset($bisdatum) && !is_valid_date($bisdatum)) return $this->terminateWithError($this->p->t('ui', 'error_invalid_date'), self::ERROR_TYPE_GENERAL); // get Studiengang from Oe @@ -320,7 +320,7 @@ class Ferien extends FHCAPI_Controller $this->FerienModel->addSelect('ferien_id'); $result = $this->FerienModel->load($ferien_id); - if (!hasData($result)) return $this->terminateWithError($this->p->t('ferien', 'error_missingId', ['ferien_id' => $ferien_id])); + if (!hasData($result)) return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['ferien_id' => $ferien_id])); $result = $this->getDataOrTerminateWithError($this->FerienModel->delete($ferien_id)); diff --git a/public/js/components/Ferienverwaltung/Ferienverwaltung.js b/public/js/components/Ferienverwaltung/Ferienverwaltung.js index 81a74f576..e0c2d0f67 100644 --- a/public/js/components/Ferienverwaltung/Ferienverwaltung.js +++ b/public/js/components/Ferienverwaltung/Ferienverwaltung.js @@ -158,7 +158,7 @@ export default { let cm = this.$refs.table.tabulator.columnManager; cm.getColumnByField('ferien_id').component.updateDefinition({ - title: this.$p.t('ferien', 'ferien_id'), + title: this.$p.t('ferien', 'ferienId'), }); cm.getColumnByField('vondatum').component.updateDefinition({ title: this.$p.t('ferien', 'vondatum'), @@ -169,6 +169,27 @@ export default { cm.getColumnByField('bezeichnung').component.updateDefinition({ title: this.$p.t('global', 'bezeichnung'), }); + cm.getColumnByField('oe_kurzbz').component.updateDefinition({ + title: this.$p.t('ferien', 'oeKurzbezeichnung'), + }); + cm.getColumnByField('oe_bezeichnung').component.updateDefinition({ + title: this.$p.t('ferien', 'oeBezeichnung'), + }); + cm.getColumnByField('studienplan_bezeichnung').component.updateDefinition({ + title: this.$p.t('ferien', 'studienplanBezeichnung'), + }); + cm.getColumnByField('ferientyp_kurzbz').component.updateDefinition({ + title: this.$p.t('ferien', 'ferientypKurzbz'), + }); + cm.getColumnByField('mitarbeiterrelevant').component.updateDefinition({ + title: this.$p.t('ferien', 'mitarbeiterrelevant'), + }); + cm.getColumnByField('studierendenrelevant').component.updateDefinition({ + title: this.$p.t('ferien', 'studierendenrelevant'), + }); + cm.getColumnByField('lehre').component.updateDefinition({ + title: this.$p.t('ferien', 'lehrePlanbar'), + }); cm.getColumnByField('actions').component.updateDefinition({ title: this.$p.t('global', 'aktionen') }); diff --git a/public/js/components/Ferienverwaltung/Modal.js b/public/js/components/Ferienverwaltung/Modal.js index c79d8a50c..34ab222b1 100644 --- a/public/js/components/Ferienverwaltung/Modal.js +++ b/public/js/components/Ferienverwaltung/Modal.js @@ -144,7 +144,7 @@ export default { type="select" v-model="data.oe_kurzbz" name="oe_kurzbz" - :label="$p.t('lehre/organisationseinheit')" + :label="$p.t('ferien/organisationseinheit')" @change="getStudienplaene" >