1 line
28 KiB
JavaScript
1 line
28 KiB
JavaScript
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["policy-expense_policy-ExpensePolicyViewController"],{6859:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExpensePolicyViewController\": () => (/* binding */ ExpensePolicyViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass ExpensePolicyViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#expense_policy_view_container',\n\n\t\t\ttype_array: null,\n\t\t\trequire_receipt_array: null\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 = 'ExpensePolicyEditView.html';\n\t\tthis.permission_id = 'expense_policy';\n\t\tthis.viewId = 'ExpensePolicy';\n\t\tthis.script_name = 'ExpensePolicyView';\n\t\tthis.table_name_key = 'expense_policy';\n\t\tthis.context_menu_name = $.i18n._( 'Expense Policy' );\n\t\tthis.navigation_label = $.i18n._( 'Expense Policy' );\n\t\tthis.api = TTAPI.APIExpensePolicy;\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\t\tthis.initDropDownOption( 'type' );\n\t\tthis.initDropDownOption( 'require_receipt' );\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_expense_policy': { 'label': $.i18n._( 'Expense Policy' ) },\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.APIExpensePolicy,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_expense_policy',\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_expense_policy = this.edit_view_tab.find( '#tab_expense_policy' );\n\n\t\tvar tab_expense_policy_column1 = tab_expense_policy.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_expense_policy_column1 );\n\n\t\t//Name\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'name', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Name' ), form_item_input, tab_expense_policy_column1, 'first' );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Description\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_AREA );\n\t\tform_item_input.TTextArea( { field: 'description', width: '100%' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Description' ), form_item_input, tab_expense_policy_column1, '', null, null, true );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Type\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'type_id', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.type_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Type' ), form_item_input, tab_expense_policy_column1 );\n\n\t\t// Unit Name\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'unit_name', width: 200 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Unit Name' ), form_item_input, tab_expense_policy_column1, '', null, true );\n\n\t\t// Percent\n\n\t\t// Amount/Unit\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'amount', width: 100 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Percent' ), form_item_input, tab_expense_policy_column1, '', null, true );\n\n\t\t// Minimum Amount\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'min_amount', width: 100 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Minimum Amount' ), form_item_input, tab_expense_policy_column1 );\n\n\t\t// Maximum Amount\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\n\t\tform_item_input.TTextInput( { field: 'max_amount', width: 100 } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Maximum Amount' ), form_item_input, tab_expense_policy_column1 );\n\n\t\t// Taxes\n\t\tvar default_args = {};\n\t\tdefault_args.filter_data = {};\n\t\tdefault_args.filter_data.type_id = [40, 50];\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIExpensePolicy,\n\t\t\tallow_multiple_selection: true,\n\t\t\tlayout_name: 'global_expense_policy',\n\t\t\tset_empty: true,\n\t\t\tshow_search_inputs: true,\n\t\t\tfield: 'expense_policy'\n\t\t} );\n\n\t\tform_item_input.setDefaultArgs( default_args );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Taxes' ), form_item_input, tab_expense_policy_column1 );\n\n\t\t// Require Receipt\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\n\t\tform_item_input.TComboBox( { field: 'require_receipt_id', set_empty: false } );\n\t\tform_item_input.setSourceData( $this.require_receipt_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Require Receipt' ), form_item_input, tab_expense_policy_column1 );\n\n\t\t// Reimbursable\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'is_reimbursable' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Reimbursable' ), form_item_input, tab_expense_policy_column1 );\n\n\t\t// Pay Stub Account\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIPayStubEntryAccount,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_PayStubAccount',\n\t\t\tset_empty: true,\n\t\t\tshow_search_inputs: true,\n\t\t\tfield: 'pay_stub_entry_account_id'\n\t\t} );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Pay Stub Account' ), form_item_input, tab_expense_policy_column1, '', null, true );\n\n\t\t// Product\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.AWESOME_BOX );\n\n\t\tform_item_input.AComboBox( {\n\t\t\tapi_class: TTAPI.APIProduct,\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_product',\n\t\t\tset_empty: true,\n\t\t\tshow_search_inputs: true,\n\t\t\tfield: 'product_id'\n\t\t} );\n\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Product' ), form_item_input, tab_expense_policy_column1 );\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\t\tthis.search_fields = [\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Name' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'name',\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Type' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'type_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Require Receipt' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'require_receipt_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Product' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'product_id',\n\t\t\t\tlayout_name: 'global_product',\n\t\t\t\tapi_class: TTAPI.APIProduct,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Created By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'created_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Updated By' ),\n\t\t\t\tin_column: 2,\n\t\t\t\tfield: 'updated_by',\n\t\t\t\tlayout_name: 'global_user',\n\t\t\t\tapi_class: TTAPI.APIUser,\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} )\n\t\t];\n\t}\n\n\tonFormItemChange( target, doNotValidate ) {\n\t\tthis.setIsChanged( target );\n\t\tthis.setMassEditingFieldsWhenFormChange( target );\n\n\t\tvar key = target.getField();\n\n\t\tthis.current_edit_record[key] = target.getValue();\n\n\t\tif ( key === 'type_id' || key === 'is_reimbursable' ) {\n\t\t\tthis.onTypeChange();\n\t\t}\n\n\t\tif ( !doNotValidate ) {\n\t\t\tthis.validate();\n\t\t}\n\t}\n\n\tsetCurrentEditRecordData() {\n\n\t\t// When mass editing, these fields may not be the common data, so their value will be undefined, so this will cause their change event cannot work properly.\n\t\tthis.setDefaultData( {\n\t\t\t'type_id': 10\n\t\t} );\n\n\t\t//Set current edit record data to all widgets\n\t\tfor ( var key in this.current_edit_record ) {\n\n\t\t\tif ( !this.current_edit_record.hasOwnProperty( key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar widget = this.edit_view_ui_dic[key];\n\t\t\tif ( Global.isSet( widget ) ) {\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'pay_stub_entry_account_id': //popular case\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\twidget.setValue( this.current_edit_record[key] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tthis.onTypeChange();\n\t\tthis.collectUIDataToCurrentEditRecord();\n\t\tthis.setEditViewDataDone();\n\t}\n\n\tonTypeChange() {\n\t\tif ( this.current_edit_record['type_id'] == 10 ) {\n\t\t\tthis.detachElement( 'amount' );\n\t\t\tthis.detachElement( 'unit_name' );\n\t\t} else if ( this.current_edit_record['type_id'] == 20 || this.current_edit_record['type_id'] == 40 ) {\n\t\t\tthis.edit_view_form_item_dic['amount'].find( '.edit-view-form-item-label' ).text( $.i18n._( 'Percent' ) );\n\t\t\tthis.attachElement( 'amount' );\n\t\t\tthis.detachElement( 'unit_name' );\n\t\t} else if ( this.current_edit_record['type_id'] == 30 ) {\n\t\t\tthis.edit_view_form_item_dic['amount'].find( '.edit-view-form-item-label' ).text( $.i18n._( 'Amount/Unit' ) );\n\t\t\tthis.attachElement( 'amount' );\n\t\t\tthis.attachElement( 'unit_name' );\n\t\t} else if ( this.current_edit_record['type_id'] == 50 ) {\n\t\t\tthis.edit_view_form_item_dic['amount'].find( '.edit-view-form-item-label' ).text( $.i18n._( 'Amount' ) );\n\t\t\tthis.detachElement( 'unit_name' );\n\t\t} else {\n\t\t\tthis.detachElement( 'amount' );\n\t\t\tthis.detachElement( 'unit_name' );\n\t\t}\n\n\t\tif ( this.edit_view_ui_dic.is_reimbursable.getValue() == true ) {\n\t\t\tthis.attachElement( 'pay_stub_entry_account_id' );\n\t\t} else {\n\t\t\tthis.detachElement( 'pay_stub_entry_account_id' );\n\t\t}\n\n\t\tthis.editFieldResize();\n\n\t}\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNjg1OS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0EsSUFBSTs7QUFFSjtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsMkJBQTJCLENBQUM7QUFDNUIsMEJBQTBCLENBQUM7QUFDM0I7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBLDJCQUEyQixTQUFTLENBQUMsNkJBQTZCO0FBQ2xFO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUk7O0FBRUo7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQSxnQ0FBZ0MsK0JBQStCO0FBQy9ELDZCQUE2QixDQUFDOztBQUU5Qjs7QUFFQTtBQUNBO0FBQ0EsK0JBQStCLHNDQUFzQztBQUNyRSw2QkFBNkIsQ0FBQzs7QUFFOUI7O0FBRUE7QUFDQTs7QUFF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