TimeTrex/interface/html5/dist/attendance-job_item_amendment-JobItemAmendmentViewController.bundle.js

1 line
29 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["attendance-job_item_amendment-JobItemAmendmentViewController"],{1960:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JobItemAmendmentViewController\": () => (/* binding */ JobItemAmendmentViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass JobItemAmendmentViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#job_item_amendment_view_container',\n\n\n\t\t\tcurrent_default_record: {}\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'JobItemAmendmentEditView.html';\n\t\tthis.permission_id = 'job_item';\n\t\tthis.viewId = 'JobItemAmendment';\n\t\tthis.script_name = 'JobItemAmendmentView';\n\t\tthis.table_name_key = 'job_item_amendment';\n\t\tthis.context_menu_name = $.i18n._( 'Task Amendments' );\n\t\tthis.navigation_label = $.i18n._( 'Task Amendment' );\n\n\t\tthis.api = TTAPI.APIJobItemAmendment;\n\n\t\tthis.job_api = TTAPI.APIJob;\n\t\tthis.job_item_api = TTAPI.APIJobItem;\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\texclude: ['copy'],\n\t\t\tinclude: []\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tbuildEditViewUI() {\n\n\t\tsuper.buildEditViewUI();\n\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_task_amendment': { 'label': $.i18n._( 'Task Amendment' ) },\n\t\t\t'tab_audit': true,\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APIJobItemAmendment,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_job_item_amendment',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\t//Tab 0 start\n\n\t\tvar tab_task_amendment = this.edit_view_tab.find( '#tab_task_amendment' );\n\n\t\tvar tab_task_amendment_column1 = tab_task_amendment.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_task_amendment_column1 );\n\n\t\tvar form_item_input;\n\t\tvar widgetContainer;\n\t\tvar label;\n\n\t\t//Job\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIJob,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_job',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: false,\n\t\t\tsetRealValueCallBack: ( function( val ) {\n\n\t\t\t\tif ( val ) {\n\t\t\t\t\tjob_coder.setValue( val.manual_id );\n\t\t\t\t}\n\t\t\t} ),\n\t\t\tfield: 'job_id'\n\t\t} );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\n\t\tvar job_coder = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tjob_coder.TTextInput( { field: 'job_quick_search', disable_keyup_event: true } );\n\t\tjob_coder.addClass( 'job-coder' );\n\n\t\twidgetContainer.append( job_coder );\n\t\twidgetContainer.append( form_item_input );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Job' ), [form_item_input, job_coder], tab_task_amendment_column1, '', widgetContainer );\n\n\t\t// Task\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIJobItem,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_job_item',\n\t\t\tshow_search_inputs: true,\n\t\t\tset_empty: true,\n\t\t\tsetRealValueCallBack: ( function( val ) {\n\n\t\t\t\tif ( val ) {\n\t\t\t\t\tjob_item_coder.setValue( val.manual_id );\n\t\t\t\t}\n\t\t\t} ),\n\t\t\tfield: 'item_id'\n\t\t} );\n\n\t\twidgetContainer = $( '<div class=\\'widget-h-box\\'></div>' );\n\n\t\tvar job_item_co