From 8ae62e9c506b42d22722403459fdf831478ddead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Tue, 23 May 2023 10:11:33 +0200 Subject: [PATCH] fix(HumanResources): use new BankHoliday picker in contract edit dlg --- tine20/HumanResources/js/ContractEditDialog.js | 18 +++++------------- tine20/Tinebase/Model/BankHolidayCalendar.php | 2 ++ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/tine20/HumanResources/js/ContractEditDialog.js b/tine20/HumanResources/js/ContractEditDialog.js index 3b2b5122770..f2f20b8ac23 100644 --- a/tine20/HumanResources/js/ContractEditDialog.js +++ b/tine20/HumanResources/js/ContractEditDialog.js @@ -196,6 +196,10 @@ Tine.HumanResources.ContractEditDialog = Ext.extend(Tine.widgets.dialog.EditDial * @private */ getFormItems: function() { + const fieldManager = _.bind(Tine.widgets.form.FieldManager.get, + Tine.widgets.form.FieldManager, 'HumanResources', 'Contract', _, + Tine.widgets.form.FieldManager.CATEGORY_EDITDIALOG); + // blpipes is of type records with subrecord hr.blconfig this.blConfigPanel = new Tine.Tinebase.BL.BLConfigPanel({ app: this.app, @@ -254,19 +258,7 @@ Tine.HumanResources.ContractEditDialog = Ext.extend(Tine.widgets.dialog.EditDial {xtype: 'datefield', name: 'start_date', fieldLabel: this.app.i18n._('Start Date'), allowBlank: false, columnWidth: 1/2 }, {xtype: 'extuxclearabledatefield', name: 'end_date', fieldLabel: this.app.i18n._('End Date'), columnWidth: 1/2} ], [ - { - xtype: 'tinewidgetscontainerselectcombo', - name: 'feast_calendar_id', - containerName: this.app.i18n._('Calendar'), - containersName: this.app.i18n._('Calendars'), - recordClass: Tine.Calendar.Model.Event, - requiredGrant: 'readGrant', - hideTrigger2: true, - allowBlank: false, - blurOnSelect: true, - columnWidth: 1/2, - fieldLabel: this.app.i18n._('Public Holiday Calendar') - }, + fieldManager('feast_calendar_id', { allowBlank: false, blurOnSelect: true, columnWidth: 1/2 }), {name: 'vacation_days', fieldLabel: this.app.i18n._('Vacation days of one calendar year'), allowBlank: false, columnWidth: 1/2} ]] }] diff --git a/tine20/Tinebase/Model/BankHolidayCalendar.php b/tine20/Tinebase/Model/BankHolidayCalendar.php index 7f1c8b224bf..782ea4bbc8f 100644 --- a/tine20/Tinebase/Model/BankHolidayCalendar.php +++ b/tine20/Tinebase/Model/BankHolidayCalendar.php @@ -36,6 +36,8 @@ class Tinebase_Model_BankHolidayCalendar extends Tinebase_Record_NewAbstract self::APP_NAME => Tinebase_Config::APP_NAME, self::MODEL_NAME => self::MODEL_NAME_PART, + self::TITLE_PROPERTY => self::FLD_NAME, + self::TABLE => [ self::NAME => self::TABLE_NAME, ],