TimeTrex/interface/html5/dist/my_account-message_control-MessageControlViewController.bundle.js

1 line
131 KiB
JavaScript
Raw Normal View History

2022-12-13 07:10:06 +01:00
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["my_account-message_control-MessageControlViewController"],{4468:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MessageControlViewController\": () => (/* binding */ MessageControlViewController)\n/* harmony export */ });\n/* harmony import */ var linkifyjs_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5853);\n/* harmony import */ var linkifyjs_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(linkifyjs_string__WEBPACK_IMPORTED_MODULE_0__);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\nclass MessageControlViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#message_control_view_container',\n\n\t\t\tobject_type_array: null,\n\n\t\t\tis_request: false,\n\t\t\tis_message: false,\n\n\t\t\tmessages: null,\n\t\t\trequest_api: null,\n\n\t\t\tfolder_id: null,\n\n\t\t\tnavigation_source_data: null,\n\n\t\t\tisReloadViewUI: false,\n\n\t\t\tcurrent_select_message_control_data: null, //current select message control data, set in onViewClick\n\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 = 'MessageControlEditView.html';\n\t\tthis.permission_id = 'message';\n\t\tthis.viewId = 'MessageControl';\n\t\tthis.script_name = 'MessageControlView';\n\t\tthis.table_name_key = 'message_control';\n\t\tthis.context_menu_name = $.i18n._( 'Message' );\n\t\tthis.api = TTAPI.APIMessageControl;\n\t\tthis.request_api = TTAPI.APIRequest;\n\t\tthis.folder_id = 10;\n\t\tthis.event_bus = new TTEventBus({ view_id: this.viewId });\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( 'object_type' );\n\t}\n\n\tbuildSearchFields() {\n\n\t\tsuper.buildSearchFields();\n\n\t\tvar default_args = {};\n\t\tdefault_args.permission_section = 'message';\n\t\tthis.search_fields = [\n\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Employee' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'user_id',\n\t\t\t\tdefault_args: default_args,\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._( 'Type' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tmultiple: true,\n\t\t\t\tfield: 'object_type_id',\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._( 'Subject' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'subject',\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\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\tgetSubViewFilter( filter ) {\n\n\t\tif ( filter.length === 0 ) {\n\t\t\tfilter = {};\n\t\t}\n\n\t\tfilter['folder_id'] = this.folder_id;\n\n\t\treturn filter;\n\t}\n\n\tgetCusto