1 line
24 KiB
JavaScript
1 line
24 KiB
JavaScript
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["company-currency-CurrencyViewController"],{1297:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CurrencyViewController\": () => (/* binding */ CurrencyViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass CurrencyViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#currency_view_container',\n\n\t\t\tstatus_array: null,\n\t\t\tiso_codes_array: null,\n\t\t\tround_decimal_places_array: null,\n\t\t\tsub_currency_rate_view_controller: 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 = 'CurrencyEditView.html';\n\t\tthis.permission_id = 'currency';\n\t\tthis.viewId = 'Currency';\n\t\tthis.script_name = 'CurrencyView';\n\t\tthis.table_name_key = 'currency';\n\t\tthis.context_menu_name = $.i18n._( 'Currencies' );\n\t\tthis.navigation_label = $.i18n._( 'Currency' );\n\t\tthis.api = TTAPI.APICurrency;\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tinitOptions() {\n\t\tvar $this = this;\n\n\t\tthis.initDropDownOption( 'status' );\n\t\tthis.initDropDownOption( 'round_decimal_places', 'round_decimal_places' );\n\t\tthis.api.getISOCodesArray( '', false, false, {\n\t\t\tonResult: function( res ) {\n\t\t\t\tres = res.getResult();\n\t\t\t\tres = Global.buildRecordArray( res );\n\t\t\t\t$this.basic_search_field_ui_dic['iso_code'].setSourceData( res );\n\t\t\t\t$this.iso_codes_array = res;\n\n\t\t\t}\n\t\t} );\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_currency': { 'label': $.i18n._( 'Currency' ) },\n\t\t\t'tab_rates': {\n\t\t\t\t'label': $.i18n._( 'Rates' ),\n\t\t\t\t'init_callback': 'initSubCurrencyRateView',\n\t\t\t\t'display_on_mass_edit': false\n\t\t\t},\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.APICurrency,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_currency',\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_currency = this.edit_view_tab.find( '#tab_currency' );\n\n\t\tvar tab_currency_column1 = tab_currency.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_currency_column1 );\n\n\t\tvar form_item_input;\n\t\tvar widgetContainer;\n\n\t\t//Status\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'status_id' } );\n\t\tform_item_input.setSourceData( $this.status_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Status' ), form_item_input, tab_currency_column1, '' );\n\n\t\t// ISO Currency\n\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'iso_code' } );\n\t\tform_item_input.setSourceData( $this.iso_codes_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'ISO Currency' ), form_item_input, tab_currency_column1 );\n\n\t\t//Name\n\t\tform_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_currency_column1 );\n\n\t\tform_item_input.parent().width( '45%' );\n\n\t\t// Base Currency\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'is_base' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Base Currency' ), form_item_input, tab_currency_column1 );\n\n\t\t// Conversion Rate\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT_INPUT );\n\t\tform_item_input.TTextInput( { field: 'conversion_rate', width: 114 } );\n\n\t\twidgetContainer = $( '<div class=\\'\\'></div>' );\n\t\tvar conversion_rate_clarification_box = $( '<span id=\\'conversion_rate_clarification_box\\'></span>' );\n\n\t\twidgetContainer.append( form_item_input );\n\t\twidgetContainer.append( conversion_rate_clarification_box );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Conversion Rate' ), [form_item_input], tab_currency_column1, '', widgetContainer, false, true );\n\n\t\t// Default Currency\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'is_default' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Default Currency' ), form_item_input, tab_currency_column1 );\n\n\t\t// Auto Update\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.CHECKBOX );\n\t\tform_item_input.TCheckbox( { field: 'auto_update' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Auto Update' ), form_item_input, tab_currency_column1 );\n\n\t\t// Decimal Places\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'round_decimal_places' } );\n\t\tform_item_input.setSourceData( $this.round_decimal_places_array );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Decimal Places' ), form_item_input, tab_currency_column1, '' );\n\t}\n\n\tremoveEditView() {\n\t\tsuper.removeEditView();\n\n\t\tthis.sub_currency_rate_view_controller = null;\n\t}\n\n\tinitSubCurrencyRateView() {\n\t\tvar $this = this;\n\n\t\tif ( !this.current_edit_record.id ) {\n\t\t\tTTPromise.resolve( 'BaseViewController', 'onTabShow' ); //Since search() isn't called in this case, and we just display the \"Please Save This Record ...\" message, resolve the promise.\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.sub_currency_rate_view_controller ) {\n\t\t\tthis.sub_currency_rate_view_controller.buildContextMenu( true );\n\t\t\tthis.sub_currency_rate_view_controller.setDefaultMenu();\n\t\t\t$this.sub_currency_rate_view_controller.parent_key = 'currency_id';\n\t\t\t$this.sub_currency_rate_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_currency_rate_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_currency_rate_view_controller.initData();\n\t\t\treturn;\n\t\t}\n\n\t\tGlobal.loadScript( 'views/company/currency/CurrencyRateViewController.js', function() {\n\t\t\tvar tab = $this.edit_view_tab.find( '#tab_rates' );\n\t\t\tvar firstColumn = tab.find( '.first-column-sub-view' );\n\t\t\tGlobal.trackView( 'Sub' + 'CurrencyRate' + 'View', LocalCacheData.current_doing_context_action );\n\t\t\tCurrencyRateViewController.loadSubView( firstColumn, beforeLoadView, afterLoadView );\n\t\t} );\n\n\t\tfunction beforeLoadView() {\n\n\t\t}\n\n\t\tfunction afterLoadView( subViewController ) {\n\t\t\t$this.sub_currency_rate_view_controller = subViewController;\n\t\t\t$this.sub_currency_rate_view_controller.parent_key = 'currency_id';\n\t\t\t$this.sub_currency_rate_view_controller.parent_value = $this.current_edit_record.id;\n\t\t\t$this.sub_currency_rate_view_controller.parent_edit_record = $this.current_edit_record;\n\t\t\t$this.sub_currency_rate_view_controller.parent_view_controller = $this;\n\t\t\t$this.sub_currency_rate_view_controller.initData();\n\n\t\t}\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._( 'Status' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'status_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\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\tmultiple: true,\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\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'ISO Currency' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'iso_code',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\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\tif ( target.getField() == 'conversion_rate' ) {\n\t\t\tthis.setConversionRateExampleText( target.getValue(), this.edit_view_ui_dic.iso_code.getValue() );\n\t\t}\n\t\tsuper.onFormItemChange( target, doNotValidate );\n\t}\n\n\tinitEditView( editId, noRefreshUI ) {\n\t\tsuper.initEditView();\n\t\tthis.setConversionRateExampleText( this.edit_view_ui_dic.conversion_rate.getValue(), this.edit_view_ui_dic.iso_code.getValue() );\n\t}\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTI5Ny5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUk7O0FBRUo7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDJCQUEyQixDQUFDO0FBQzVCLDBCQUEwQixDQUFDO0FBQzNCOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxJQUFJO0FBQ0o7O0FBRUE7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQSxxQkFBcUIsU0FBUyxDQUFDLHVCQUF1QjtBQUN0RDtBQUNBLGFBQWEsQ0FBQztBQUNkO0FBQ0E7QUFDQSxJQUFJO0FBQ0o7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBSTs7QUFFSjs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0EsK0JBQStCLHFCQUFxQjtBQUNwRDtBQUNBLDZCQUE2QixDQUFDOztBQUU5Qjs7QUFFQTtBQUNBLCtCQUErQixvQkFBb0I7QUFDbkQ7QUFDQSw2QkFBNkIsQ0FBQzs7QUFFOUI7QUFDQTs7QUFFQSxn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