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aAAc,MACd,OAAQ,MACR,UAAW,MACX,OAAQ,MACR,UAAW,MACX,OAAQ,MACR,YAAa,MACb,eAAgB,MAChB,UAAW,MACX,OAAQ,MACR,UAAW,MACX,aAAc,MACd,gBAAiB,MACjB,OAAQ,MACR,UAAW,MACX,UAAW,MACX,aAAc,MACd,UAAW,KACX,aAAc,KACd,UAAW,MACX,aAAc,MACd,UAAW,MACX,aAAc,OAIf,SAASC,EAAeC,GACvB,IAAIC,EAAKC,EAAsBF,GAC/B,OAAOG,EAAoBF,EAC5B,CACA,SAASC,EAAsBF,GAC9B,IAAIG,EAAoBC,EAAEN,EAAKE,GAAM,CACpC,IAAIK,EAAI,IAAIC,MAAM,uBAAyBN,EAAM,KAEjD,MADAK,EAAEE,KAAO,mBACHF,CACP,CACA,OAAOP,EAAIE,EACZ,CACAD,EAAeS,KAAO,WACrB,OAAOC,OAAOD,KAAKV,EACpB,EACAC,EAAeW,QAAUR,EACzBS,EAAOC,QAAUb,EACjBA,EAAeE,GAAK,K","sources":["webpack://hellohouston/./app/javascript/controllers/ sync \\.js$","webpack://hellohouston/./app/javascript/controllers/activity_reporting_controller.js","webpack://hellohouston/./app/javascript/controllers/add_choices_controller.js","webpack://hellohouston/./app/javascript/controllers/amenities/favourite_material_controller.js","webpack://hellohouston/./app/javascript/controllers/amenities/import_controller.js","webpack://hellohouston/./app/javascript/controllers/amenities/search_controller.js","webpack://hellohouston/./app/javascript/controllers/amenities/toggle_hidden_custom_fields_controller.js","webpack://hellohouston/./app/javascript/controllers/asset_trees/drag_and_drop_controller.js","webpack://hellohouston/./app/javascript/controllers/asset_trees/duplicate_controller.js","webpack://hellohouston/./app/javascript/controllers/asset_trees/structure_controller.js","webpack://hellohouston/./app/javascript/controllers/close_modal_controller.js","webpack://hellohouston/./app/javascript/controllers/companies/parameters_controller.js","webpack://hellohouston/./app/javascript/controllers/contracts/filter_amenities_controller.js","webpack://hellohouston/./app/javascript/controllers/contracts/filter_units_controller.js","webpack://hellohouston/./app/javascript/controllers/contracts/form_controller.js","webpack://hellohouston/./app/javascript/controllers/custom_field_to_amenity_controller.js","webpack://hellohouston/./app/javascript/controllers/custom_fields/form_fields_controller.js","webpack://hellohouston/./app/javascript/controllers/dashboard_controller.js","webpack://hellohouston/./app/javascript/controllers/datatables/filter_toggle_controller.js","webpack://hellohouston/./app/javascript/controllers/documents/label_filter_controller.js","webpack://hellohouston/./app/javascript/controllers/exclusif_form_controller.js","webpack://hellohouston/./app/javascript/controllers/existingreports_controller.js","webpack://hellohouston/./app/javascript/controllers/expertise_controller.js","webpack://hellohouston/./app/javascript/controllers/export/export_controller.js","webpack://hellohouston/./app/javascript/controllers/form_templates/question_ordering_controller.js","webpack://hellohouston/./app/javascript/controllers/forms/inputs_controller.js","webpack://hellohouston/./app/javascript/controllers/forms/select_all_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/agenda_paginate_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/agenda_task_list_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/assign_internaly_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/assign_to_prov_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/offdays_edit_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/offdays_new_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/paginate_to_dispatch_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/plan_uncreated_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/sidebar_toggle_controller.js","webpack://hellohouston/./app/javascript/controllers/fullcalendar/submit-cancel-controller.js","webpack://hellohouston/./app/javascript/controllers/imports/bepharbel_controller.js","webpack://hellohouston/./app/javascript/controllers/imports/vandeputte_controller.js","webpack://hellohouston/./app/javascript/controllers/imports/vincent_logistics_controller.js","webpack://hellohouston/./app/javascript/controllers/invoice_contacts/default_contact_controller.js","webpack://hellohouston/./app/javascript/controllers/jschoice_controller.js","webpack://hellohouston/./app/javascript/controllers/launch_mobiscroll_controller.js","webpack://hellohouston/./app/javascript/controllers/login_controller.js","webpack://hellohouston/./app/javascript/controllers/machine_stops/export_controller.js","webpack://hellohouston/./app/javascript/controllers/mail_parameters/toggle_controller.js","webpack://hellohouston/./app/javascript/controllers/maintenance/add_all_controller.js","webpack://hellohouston/./app/javascript/controllers/maintenance/control_controller.js","webpack://hellohouston/./app/javascript/controllers/maintenance/plan_maintenances_controller.js","webpack://hellohouston/./app/javascript/controllers/material_locations/ancestry_controller.js","webpack://hellohouston/./app/javascript/controllers/material_locations/form_controller.js","webpack://hellohouston/./app/javascript/controllers/material_locations/remove_user_controller.js","webpack://hellohouston/./app/javascript/controllers/material_orders/invoicing_data_controller.js","webpack://hellohouston/./app/javascript/controllers/material_orders/location_form_controller.js","webpack://hellohouston/./app/javascript/controllers/material_orders/manage_lines_controller.js","webpack://hellohouston/./app/javascript/controllers/material_quantities/last_check_controller.js","webpack://hellohouston/./app/javascript/controllers/material_quotations/prepare_lines_controller.js","webpack://hellohouston/./app/javascript/controllers/material_request_controller.js","webpack://hellohouston/./app/javascript/controllers/material_requests/create_controller.js","webpack://hellohouston/./app/javascript/controllers/materials/add_favourite_controller.js","webpack://hellohouston/./app/javascript/controllers/materials/export_usages_controller.js","webpack://hellohouston/./app/javascript/controllers/materials/import_controller.js","webpack://hellohouston/./app/javascript/controllers/materials/location_quantity_controller.js","webpack://hellohouston/./app/javascript/controllers/materials/remove_favourite_controller.js","webpack://hellohouston/./app/javascript/controllers/materials/search_controller.js","webpack://hellohouston/./app/javascript/controllers/materials/take_from_stock_controller.js","webpack://hellohouston/./app/javascript/controllers/measurment_location_controller.js","webpack://hellohouston/./app/javascript/controllers/measurment_rules_controller.js","webpack://hellohouston/./app/javascript/controllers/profile_pic_controller.js","webpack://hellohouston/./app/javascript/controllers/qr_codes/scan_controller.js","webpack://hellohouston/./app/javascript/controllers/react_component_load_controller.js","webpack://hellohouston/./app/javascript/controllers/remote_modal_controller.js","webpack://hellohouston/./app/javascript/controllers/remove_user_from_conv_controller.js","webpack://hellohouston/./app/javascript/controllers/report_types/activate_controller.js","webpack://hellohouston/./app/javascript/controllers/report_types/edit_controller.js","webpack://hellohouston/./app/javascript/controllers/report_types/permissions_controller.js","webpack://hellohouston/./app/javascript/controllers/report_types/report_fields_controller.js","webpack://hellohouston/./app/javascript/controllers/report_types/responsible_mode_controller.js","webpack://hellohouston/./app/javascript/controllers/reports/assign_task_from_report_form_controller.js","webpack://hellohouston/./app/javascript/controllers/reports/filter_emp_mgr_reports_controller.js","webpack://hellohouston/./app/javascript/controllers/reports/generate_pdf_controller.js","webpack://hellohouston/./app/javascript/controllers/reports/used_equipments_controller.js","webpack://hellohouston/./app/javascript/controllers/secret_field_controller.js","webpack://hellohouston/./app/javascript/controllers/select_unit_equip_controller.js","webpack://hellohouston/./app/javascript/controllers/statistics_controller.js","webpack://hellohouston/./app/javascript/controllers/submit-cancel-mobiscroll-controller.js","webpack://hellohouston/./app/javascript/controllers/table_display/column_order_controller.js","webpack://hellohouston/./app/javascript/controllers/table_display/columns_selector_controller.js","webpack://hellohouston/./app/javascript/controllers/table_display/delete_table_controller.js","webpack://hellohouston/./app/javascript/controllers/table_display/filters_selector_controller.js","webpack://hellohouston/./app/javascript/controllers/table_display/qr_code_controller.js","webpack://hellohouston/./app/javascript/controllers/table_display/search_controller.js","webpack://hellohouston/./app/javascript/controllers/technician_tasklist_controller.js","webpack://hellohouston/./app/javascript/controllers/todos/period_to_todo_controller.js","webpack://hellohouston/./app/javascript/controllers/todos/stop_ongoing_task_controller.js","webpack://hellohouston/./app/javascript/controllers/toggle_mobile_menu_controller.js","webpack://hellohouston/./app/javascript/controllers/unit_filters_controller.js","webpack://hellohouston/./app/javascript/controllers/units/search_controller.js","webpack://hellohouston/./app/javascript/controllers/users/allocations_controller.js","webpack://hellohouston/./app/javascript/controllers/users/reset_password_controller.js","webpack://hellohouston/./app/javascript/controllers/usertime_controller.js","webpack://hellohouston/./app/javascript/packs/application.js","webpack://hellohouston/./app/javascript/src/config/i18n.js","webpack://hellohouston/./node_modules/moment/locale/ sync ^\\.\\/.*$"],"sourcesContent":["var map = {\n\t\"./activity_reporting_controller.js\": 18744,\n\t\"./add_choices_controller.js\": 45576,\n\t\"./amenities/favourite_material_controller.js\": 68743,\n\t\"./amenities/import_controller.js\": 78023,\n\t\"./amenities/search_controller.js\": 872,\n\t\"./amenities/toggle_hidden_custom_fields_controller.js\": 69397,\n\t\"./asset_trees/drag_and_drop_controller.js\": 29835,\n\t\"./asset_trees/duplicate_controller.js\": 98332,\n\t\"./asset_trees/structure_controller.js\": 91356,\n\t\"./close_modal_controller.js\": 55578,\n\t\"./companies/parameters_controller.js\": 36512,\n\t\"./contracts/filter_amenities_controller.js\": 47678,\n\t\"./contracts/filter_units_controller.js\": 56358,\n\t\"./contracts/form_controller.js\": 36090,\n\t\"./custom_field_to_amenity_controller.js\": 81056,\n\t\"./custom_fields/form_fields_controller.js\": 72164,\n\t\"./dashboard_controller.js\": 36708,\n\t\"./datatables/filter_toggle_controller.js\": 32919,\n\t\"./documents/label_filter_controller.js\": 46626,\n\t\"./exclusif_form_controller.js\": 6548,\n\t\"./existingreports_controller.js\": 83068,\n\t\"./expertise_controller.js\": 89813,\n\t\"./export/export_controller.js\": 93543,\n\t\"./form_templates/question_ordering_controller.js\": 80608,\n\t\"./forms/inputs_controller.js\": 69727,\n\t\"./forms/select_all_controller.js\": 8896,\n\t\"./fullcalendar/agenda_paginate_controller.js\": 68344,\n\t\"./fullcalendar/agenda_task_list_controller.js\": 1719,\n\t\"./fullcalendar/assign_internaly_controller.js\": 35306,\n\t\"./fullcalendar/assign_to_prov_controller.js\": 56369,\n\t\"./fullcalendar/offdays_edit_controller.js\": 66569,\n\t\"./fullcalendar/offdays_new_controller.js\": 24281,\n\t\"./fullcalendar/paginate_to_dispatch_controller.js\": 72742,\n\t\"./fullcalendar/plan_uncreated_controller.js\": 6267,\n\t\"./fullcalendar/sidebar_toggle_controller.js\": 36179,\n\t\"./fullcalendar/submit-cancel-controller.js\": 69233,\n\t\"./imports/bepharbel_controller.js\": 12336,\n\t\"./imports/vandeputte_controller.js\": 13717,\n\t\"./imports/vincent_logistics_controller.js\": 50954,\n\t\"./invoice_contacts/default_contact_controller.js\": 41932,\n\t\"./jschoice_controller.js\": 13940,\n\t\"./launch_mobiscroll_controller.js\": 80788,\n\t\"./login_controller.js\": 47379,\n\t\"./machine_stops/export_controller.js\": 69962,\n\t\"./mail_parameters/toggle_controller.js\": 80159,\n\t\"./maintenance/add_all_controller.js\": 61197,\n\t\"./maintenance/control_controller.js\": 58095,\n\t\"./maintenance/plan_maintenances_controller.js\": 34744,\n\t\"./material_locations/ancestry_controller.js\": 91362,\n\t\"./material_locations/form_controller.js\": 78647,\n\t\"./material_locations/remove_user_controller.js\": 7925,\n\t\"./material_orders/invoicing_data_controller.js\": 74699,\n\t\"./material_orders/location_form_controller.js\": 17282,\n\t\"./material_orders/manage_lines_controller.js\": 48921,\n\t\"./material_quantities/last_check_controller.js\": 12925,\n\t\"./material_quotations/prepare_lines_controller.js\": 35567,\n\t\"./material_request_controller.js\": 2897,\n\t\"./material_requests/create_controller.js\": 99807,\n\t\"./materials/add_favourite_controller.js\": 15522,\n\t\"./materials/export_usages_controller.js\": 61714,\n\t\"./materials/import_controller.js\": 78262,\n\t\"./materials/location_quantity_controller.js\": 60792,\n\t\"./materials/remove_favourite_controller.js\": 66361,\n\t\"./materials/search_controller.js\": 69949,\n\t\"./materials/take_from_stock_controller.js\": 71708,\n\t\"./measurment_location_controller.js\": 10911,\n\t\"./measurment_rules_controller.js\": 17143,\n\t\"./profile_pic_controller.js\": 2974,\n\t\"./qr_codes/scan_controller.js\": 53498,\n\t\"./react_component_load_controller.js\": 18960,\n\t\"./remote_modal_controller.js\": 37104,\n\t\"./remove_user_from_conv_controller.js\": 51362,\n\t\"./report_types/activate_controller.js\": 12732,\n\t\"./report_types/edit_controller.js\": 42959,\n\t\"./report_types/permissions_controller.js\": 96945,\n\t\"./report_types/report_fields_controller.js\": 94035,\n\t\"./report_types/responsible_mode_controller.js\": 5777,\n\t\"./reports/assign_task_from_report_form_controller.js\": 98038,\n\t\"./reports/filter_emp_mgr_reports_controller.js\": 96026,\n\t\"./reports/generate_pdf_controller.js\": 75506,\n\t\"./reports/prescreening_controller.js\": 33345,\n\t\"./reports/used_equipments_controller.js\": 48245,\n\t\"./secret_field_controller.js\": 705,\n\t\"./select_unit_equip_controller.js\": 89152,\n\t\"./statistics_controller.js\": 13805,\n\t\"./submit-cancel-mobiscroll-controller.js\": 10754,\n\t\"./table_display/column_order_controller.js\": 53005,\n\t\"./table_display/columns_selector_controller.js\": 31013,\n\t\"./table_display/delete_table_controller.js\": 9618,\n\t\"./table_display/filters_selector_controller.js\": 72181,\n\t\"./table_display/qr_code_controller.js\": 98605,\n\t\"./table_display/search_controller.js\": 72118,\n\t\"./technician_tasklist_controller.js\": 57290,\n\t\"./todos/period_to_todo_controller.js\": 78970,\n\t\"./todos/stop_ongoing_task_controller.js\": 37156,\n\t\"./toggle_mobile_menu_controller.js\": 83429,\n\t\"./unit_filters_controller.js\": 90070,\n\t\"./units/search_controller.js\": 30608,\n\t\"./users/allocations_controller.js\": 67472,\n\t\"./users/reset_password_controller.js\": 28364,\n\t\"./usertime_controller.js\": 79514,\n\t\"controllers/activity_reporting_controller.js\": 18744,\n\t\"controllers/add_choices_controller.js\": 45576,\n\t\"controllers/amenities/favourite_material_controller.js\": 68743,\n\t\"controllers/amenities/import_controller.js\": 78023,\n\t\"controllers/amenities/search_controller.js\": 872,\n\t\"controllers/amenities/toggle_hidden_custom_fields_controller.js\": 69397,\n\t\"controllers/asset_trees/drag_and_drop_controller.js\": 29835,\n\t\"controllers/asset_trees/duplicate_controller.js\": 98332,\n\t\"controllers/asset_trees/structure_controller.js\": 91356,\n\t\"controllers/close_modal_controller.js\": 55578,\n\t\"controllers/companies/parameters_controller.js\": 36512,\n\t\"controllers/contracts/filter_amenities_controller.js\": 47678,\n\t\"controllers/contracts/filter_units_controller.js\": 56358,\n\t\"controllers/contracts/form_controller.js\": 36090,\n\t\"controllers/custom_field_to_amenity_controller.js\": 81056,\n\t\"controllers/custom_fields/form_fields_controller.js\": 72164,\n\t\"controllers/dashboard_controller.js\": 36708,\n\t\"controllers/datatables/filter_toggle_controller.js\": 32919,\n\t\"controllers/documents/label_filter_controller.js\": 46626,\n\t\"controllers/exclusif_form_controller.js\": 6548,\n\t\"controllers/existingreports_controller.js\": 83068,\n\t\"controllers/expertise_controller.js\": 89813,\n\t\"controllers/export/export_controller.js\": 93543,\n\t\"controllers/form_templates/question_ordering_controller.js\": 80608,\n\t\"controllers/forms/inputs_controller.js\": 69727,\n\t\"controllers/forms/select_all_controller.js\": 8896,\n\t\"controllers/fullcalendar/agenda_paginate_controller.js\": 68344,\n\t\"controllers/fullcalendar/agenda_task_list_controller.js\": 1719,\n\t\"controllers/fullcalendar/assign_internaly_controller.js\": 35306,\n\t\"controllers/fullcalendar/assign_to_prov_controller.js\": 56369,\n\t\"controllers/fullcalendar/offdays_edit_controller.js\": 66569,\n\t\"controllers/fullcalendar/offdays_new_controller.js\": 24281,\n\t\"controllers/fullcalendar/paginate_to_dispatch_controller.js\": 72742,\n\t\"controllers/fullcalendar/plan_uncreated_controller.js\": 6267,\n\t\"controllers/fullcalendar/sidebar_toggle_controller.js\": 36179,\n\t\"controllers/fullcalendar/submit-cancel-controller.js\": 69233,\n\t\"controllers/imports/bepharbel_controller.js\": 12336,\n\t\"controllers/imports/vandeputte_controller.js\": 13717,\n\t\"controllers/imports/vincent_logistics_controller.js\": 50954,\n\t\"controllers/invoice_contacts/default_contact_controller.js\": 41932,\n\t\"controllers/jschoice_controller.js\": 13940,\n\t\"controllers/launch_mobiscroll_controller.js\": 80788,\n\t\"controllers/login_controller.js\": 47379,\n\t\"controllers/machine_stops/export_controller.js\": 69962,\n\t\"controllers/mail_parameters/toggle_controller.js\": 80159,\n\t\"controllers/maintenance/add_all_controller.js\": 61197,\n\t\"controllers/maintenance/control_controller.js\": 58095,\n\t\"controllers/maintenance/plan_maintenances_controller.js\": 34744,\n\t\"controllers/material_locations/ancestry_controller.js\": 91362,\n\t\"controllers/material_locations/form_controller.js\": 78647,\n\t\"controllers/material_locations/remove_user_controller.js\": 7925,\n\t\"controllers/material_orders/invoicing_data_controller.js\": 74699,\n\t\"controllers/material_orders/location_form_controller.js\": 17282,\n\t\"controllers/material_orders/manage_lines_controller.js\": 48921,\n\t\"controllers/material_quantities/last_check_controller.js\": 12925,\n\t\"controllers/material_quotations/prepare_lines_controller.js\": 35567,\n\t\"controllers/material_request_controller.js\": 2897,\n\t\"controllers/material_requests/create_controller.js\": 99807,\n\t\"controllers/materials/add_favourite_controller.js\": 15522,\n\t\"controllers/materials/export_usages_controller.js\": 61714,\n\t\"controllers/materials/import_controller.js\": 78262,\n\t\"controllers/materials/location_quantity_controller.js\": 60792,\n\t\"controllers/materials/remove_favourite_controller.js\": 66361,\n\t\"controllers/materials/search_controller.js\": 69949,\n\t\"controllers/materials/take_from_stock_controller.js\": 71708,\n\t\"controllers/measurment_location_controller.js\": 10911,\n\t\"controllers/measurment_rules_controller.js\": 17143,\n\t\"controllers/profile_pic_controller.js\": 2974,\n\t\"controllers/qr_codes/scan_controller.js\": 53498,\n\t\"controllers/react_component_load_controller.js\": 18960,\n\t\"controllers/remote_modal_controller.js\": 37104,\n\t\"controllers/remove_user_from_conv_controller.js\": 51362,\n\t\"controllers/report_types/activate_controller.js\": 12732,\n\t\"controllers/report_types/edit_controller.js\": 42959,\n\t\"controllers/report_types/permissions_controller.js\": 96945,\n\t\"controllers/report_types/report_fields_controller.js\": 94035,\n\t\"controllers/report_types/responsible_mode_controller.js\": 5777,\n\t\"controllers/reports/assign_task_from_report_form_controller.js\": 98038,\n\t\"controllers/reports/filter_emp_mgr_reports_controller.js\": 96026,\n\t\"controllers/reports/generate_pdf_controller.js\": 75506,\n\t\"controllers/reports/prescreening_controller.js\": 33345,\n\t\"controllers/reports/used_equipments_controller.js\": 48245,\n\t\"controllers/secret_field_controller.js\": 705,\n\t\"controllers/select_unit_equip_controller.js\": 89152,\n\t\"controllers/statistics_controller.js\": 13805,\n\t\"controllers/submit-cancel-mobiscroll-controller.js\": 10754,\n\t\"controllers/table_display/column_order_controller.js\": 53005,\n\t\"controllers/table_display/columns_selector_controller.js\": 31013,\n\t\"controllers/table_display/delete_table_controller.js\": 9618,\n\t\"controllers/table_display/filters_selector_controller.js\": 72181,\n\t\"controllers/table_display/qr_code_controller.js\": 98605,\n\t\"controllers/table_display/search_controller.js\": 72118,\n\t\"controllers/technician_tasklist_controller.js\": 57290,\n\t\"controllers/todos/period_to_todo_controller.js\": 78970,\n\t\"controllers/todos/stop_ongoing_task_controller.js\": 37156,\n\t\"controllers/toggle_mobile_menu_controller.js\": 83429,\n\t\"controllers/unit_filters_controller.js\": 90070,\n\t\"controllers/units/search_controller.js\": 30608,\n\t\"controllers/users/allocations_controller.js\": 67472,\n\t\"controllers/users/reset_password_controller.js\": 28364,\n\t\"controllers/usertime_controller.js\": 79514\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 97461;","import { Controller } from \"@hotwired/stimulus\"\nimport moment from 'moment-timezone';\nimport { momentTimezone } from '@mobiscroll/javascript';\nexport default class extends Controller {\n\tstatic targets = [\"userid\", \"unitid\", \"amenityid\", \"amenitytypeid\", \"userchoices\", \"daterange\", \"offset\", \"timelist\", \"hoursgraph\"]\n\n\tinitialize() {\n\t\tmomentTimezone.moment = moment;\n this.cal = mobiscroll.datepicker(\"#date-picker\", {\n display: 'inline',\n touchUi: true,\n controls: ['calendar','time'],\n stepMinute: 30,\n selectMultiple: false,\n dateFormat: 'DD/MM/YYYY',\n timeFormat: 'HH:mm',\n\t\t\tselect: 'range',\n stepMinute: 30,\n\t\t\tshowRangeLabels: true,\n\t\t\tfirstDay: 1,\n dataTimezone: 'utc',\n displayTimezone: 'local',\n timezonePlugin: momentTimezone\n });\n\t}\n\n\tgreet() {\n\t\tif (this.daterangeTarget.value && this.from && this.to) {\n\n\t\t\tthis.getActivityData()\n\t\t}\n\t}\n\n\tget user_id() {\n\t\t// return the value of all options in the userchoicesTarget\n\t\treturn this.useridTarget.value\n\t}\n\n\tget unit_id() {\n\t\treturn this.unitidTarget.value\n\t}\n\n\tget amenity_id() {\n\t\treturn this.amenityidTarget.value\n\t}\n\n\tget amenity_type_id() {\n\t\treturn this.amenitytypeidTarget.value\n\t}\n\n\tget from() {\n\t\t// split the date range into two parts\n\t\tconst dates = this.daterangeTarget.value.split('-')\n\t\treturn dates[0]\n\t}\n\n\tget to() {\n\t\tconst dates = this.daterangeTarget.value.split('-')\n\t\treturn dates[1]\n\t}\n\n\tget offset() {\n\t\treturn document.getElementById(\"timeoffset\")\n\t}\n\n\tget timelist() {\n\t\treturn this.timelistTarget\n\t}\n\n\t// create a function to make a request to the server to get the todo list for a user\n\n\n\tgetActivityData() {\n\n\t\tfetch(`/companies/activity_data?from=${this.from}&to=${this.to}&offset=${this.offset.value}&user_id=${this.user_id}&unit_id=${this.unit_id}&amenity_id=${this.amenity_id}&amenity_type_id=${this.amenity_type_id}`, {\n\t\t\tmethod: 'GET',\n\t\t\theaders: { \"Content-Type\": \"application/json\" }\n\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(data => {\n\t\t\t\tthis.hoursgraphTarget.innerHTML = ''\n\t\t\t\tlet canvas = document.createElement('canvas')\n\t\t\t\tcanvas.classList.add('chart')\n\t\t\t\tthis.hoursgraphTarget.appendChild(canvas)\n\t\t\t\tlet chart = new Chart(canvas, {\n\t\t\t\t\ttype: 'bar',\n\t\t\t\t\tdata: data,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tscales: {\n\t\t\t\t\t\t\ty: {\n\t\t\t\t\t\t\t\tbeginAtZero: true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n\n\tdisplayGraphs() {\n\n\t\tif (this.daterangeTarget.value) {\n this.getTaskList(this.taskTypeTarget.value, this.unitTarget.value, this.amenityTarget.value, this.amenityTypeTarget.value, this.from, this.to)\n\t\t}\n\t}\n\n\tget from() {\n\t\t// split the date range into two parts\n\t\tconst dates = this.daterangeTarget.value.split('-')\n\t\treturn dates[0]\n\t}\n\n\tget to() {\n\t\tconst dates = this.daterangeTarget.value.split('-')\n\t\treturn dates[1]\n\t}\n\n\tgetTaskList(task_type, unit, amenity, amenity_type, from, to) {\n fetch(`/task_list?task_type=${task_type}&unit=${unit}&amenity=${amenity}&amenity_type=${amenity_type}&from=${from}&to=${to}`,\n\t\t\t{\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: { \"Content-Type\": \"application/json\" }\n\t\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(data => {\n\t\t\t\tthis.showTaskList(data)\n /* this.showTaskGraph(task_list)\n this.showCumulativeTaskGraph(task_list)\n this.showCumulativeCostGraph(task_list)\n this.showCumulativeTimeGraph(task_list) */\n\t\t\t})\n }\n\n\tshowTaskList(task_list) {\n\t\tthis.taskListTarget.innerHTML = \"\"\n\t\ttask_list.forEach(line => {\n\t\t\tlet row = document.createElement('tr')\n\t\t\tlet td1 = document.createElement('td')\n\t\t\tlet td2 = document.createElement('td')\n\t\t\tlet td3 = document.createElement('td')\n\t\t\tlet td4 = document.createElement('td')\n\t\t\tlet td5 = document.createElement('td')\n\t\t\tlet td6 = document.createElement('td')\n\t\t\tlet td7 = document.createElement('td')\n\t\t\t// NOOOO\n\t\t\ttd1.innerHTML = line.start_date\n\t\t\ttd2.innerHTML = line.task_number\n\t\t\ttd2.classList.add(...line.logoclass.split(' '))\n\t\t\ttd3.innerHTML = line.title\n\t\t\ttd4.innerHTML = line.unit_name\n\t\t\ttd5.innerHTML = line.amenity_name\n\t\t\ttd6.innerHTML = line.amenity_type_name\n\t\t\ttd7.innerHTML = line.total_cost.cents / 100\n\n\t\t\trow.appendChild(td1)\n\t\t\trow.appendChild(td2)\n\t\t\trow.appendChild(td3)\n\t\t\trow.appendChild(td4)\n\t\t\trow.appendChild(td5)\n\t\t\trow.appendChild(td6)\n\t\t\trow.appendChild(td7)\n\n\t\t\tthis.taskListTarget.appendChild(row)\n\t\t}\n\n\t\t)\n\t}\n\n\n\tgetHoursGraph(userid) {\n\t\t// fetch the todo list for the user\n\t\tfetch(`/users/${userid.slice(5)}/get_hours_graph?from=${this.from}&to=${this.to}`,\n\t\t\t{\n\t\t\t\tmethod: 'GET',\n\t\t\t\theaders: { \"Content-Type\": \"application/json\" }\n\t\t\t})\n\t\t\t.then(response => response.json())\n\t\t\t.then(data => {\n\t\t\t\t// clear the todo list\n\t\t\t\tthis.hoursgraphTarget.innerHTML = ''\n\t\t\t\tlet canvas = document.createElement('canvas')\n\t\t\t\tcanvas.classList.add('chart')\n\t\t\t\tthis.hoursgraphTarget.appendChild(canvas)\n\t\t\t\tlet chart = new Chart(canvas, {\n\t\t\t\t\ttype: 'bar',\n\t\t\t\t\tdata: data,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tscales: {\n\t\t\t\t\t\t\ty: {\n\t\t\t\t\t\t\t\tbeginAtZero: true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\t)\n\t}\n}\n\n\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n static targets = [\n 'choices',\n 'newchoice',\n 'button',\n 'inputfield',\n 'replytype',\n 'newchoices',\n 'existingchoices',\n 'extrachoices',\n 'multiplechoice',\n 'measurmenttype'\n ]\n\n get inputField() { return this.inputfieldTarget }\n\n showfieldform() {\n if (this.replytypeTarget.value === 'multiple_choice' || this.replytypeTarget.value === 'select') {\n this.multiplechoiceTarget.classList.remove('hidden')\n const values = JSON.stringify(Array.from(this.multiplechoiceTarget.querySelectorAll('.value')).map((value) => value.innerText))\n this.inputField.value = values\n }\n else if (this.replytypeTarget.value === 'measurment') {\n this.multiplechoiceTarget.classList.add('hidden')\n this.extrachoicesTarget.innerHTML = ''\n this.existingchoicesTarget.innerHTML = ''\n const values = JSON.stringify(Array.from(this.existingchoicesTarget.querySelectorAll('.value')).map((value) => value.innerText))\n this.inputField.value = values\n this.measurmenttypeTarget.classList.remove('hidden')\n }\n else {\n this.multiplechoiceTarget.classList.add('hidden')\n this.extrachoicesTarget.innerHTML = ''\n this.existingchoicesTarget.innerHTML = ''\n const values = JSON.stringify(Array.from(this.multiplechoiceTarget.querySelectorAll('.value')).map((value) => value.innerText))\n this.inputField.value = values\n }\n }\n\n showBtn() {\n this.newchoiceTarget.value.length > 0\n ? this.buttonTarget.classList.remove('hidden')\n : this.buttonTarget.classList.add('hidden')\n }\n\n addValue() {\n const item = `\n
  • \n\t\t\t\t${this.newchoiceTarget.value}\n\t\t\t\t\n\t\t\t
  • \n `\n this.extrachoicesTarget.insertAdjacentHTML('beforeend', item)\n\n this.newchoiceTarget.value = ''\n this.buttonTarget.classList.add('hidden')\n\n const values = JSON.stringify(Array.from(this.multiplechoiceTarget.querySelectorAll('.value')).map((value) => value.innerText))\n this.inputField.value = values\n }\n\n remove(event) {\n event.target.parentNode.remove()\n const values = JSON.stringify(Array.from(this.multiplechoiceTarget.querySelectorAll('.value')).map((value) => value.innerText))\n this.inputField.value = values\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['list']\n\n addMaterialToAmenity(event) {\n const materialId = event.currentTarget.dataset.materialId\n this.triggerFetch(materialId, this.amenityId)\n }\n\n triggerFetch(materialId, amenityId) {\n const data = {\n material_to_amenity: {\n material_id: materialId,\n amenity_id: amenityId\n }\n }\n fetch('/material_to_amenities.json', {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'POST',\n body: JSON.stringify(data)\n }).then(response => response.json())\n .then((data) => {\n this.listTarget.insertAdjacentHTML('afterbegin', `\n
  • \n
    \n
    \n ${data.material.name}\n
    \n
    \n ${data.material.brand}\n
    \n
    \n
    \n \n \n \n
    \n
  • \n `\n )\n })\n }\n\n get amenityId() { return this.listTarget.dataset.amenityId }\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nimport XLSX from 'xlsx'\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n static targets = ['file_input', 'importBtn', 'table', 'tableHeader', 'tableData', 'progress', 'progressWrapper', 'company', 'importNumber', 'deleteBtn']\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n get materialFields() {\n return [\n {'field_name': 'none', 'translation': `${i18n.t('shared.ignore') }`, 'required': false},\n {'field_name': 'amenity_name', 'translation': 'amenity_name', 'required': true},\n {'field_name': 'amenity_description', 'translation': 'amenity_description', 'required': false},\n {'field_name': 'amenity_internal_identifier', 'translation': 'amenity_internal_identifier', 'required': false},\n {'field_name': 'amenity_brand', 'translation': 'amenity_brand', 'required': false},\n {'field_name': 'amenity_model', 'translation': 'amenity_model', 'required': false},\n {'field_name': 'amenity_installation_date', 'translation': 'amenity_installation_date', 'required': false},\n {'field_name': 'amenity_quantity', 'translation': 'amenity_quantity', 'required': false},\n {'field_name': 'amenity_serial_number', 'translation': 'amenity_serial_number', 'required': false},\n {'field_name': 'amenity_price_cents', 'translation': 'amenity_price_htva', 'required': false},\n {'field_name': 'unit_name', 'translation': 'root unit name', 'required': true},\n {'field_name': 'sub_unit_name', 'translation': 'sub unit name', 'required': false},\n {'field_name': 'sub_sub_unit_name', 'translation': 'sub sub unit name', 'required': false},\n {'field_name': 'sub_sub_sub_unit_name', 'translation': 'sub sub sub unit name', 'required': false},\n {'field_name': 'amenity_type_name', 'translation': 'amenity_type name', 'required': false},\n {'field_name': 'custom_free_text', 'translation': 'custom free text', 'required': false},\n {'field_name': 'custom_multi_choice', 'translation': 'custom multi_choice', 'required': false},\n {'field_name': 'custom_boolean', 'translation': 'custom boolean', 'required': false},\n {'field_name': 'custom_date', 'translation': 'custom date', 'required': false}\n ]\n }\n\n get requiredFields() {\n return this.materialFields.filter((field) => !!field['required'])\n }\n\n async prepare_import(event) {\n this.tableDataTarget.innerHTML = ''\n this.tableHeaderTarget.innerHTML = ''\n await this.read_file(event)\n\n const selectTr = document.createElement('tr')\n const headerTr = document.createElement('tr')\n Object.keys(this.json[0]).forEach((key) => {\n const selectTh = document.createElement('th')\n const fieldSelector = document.createElement('select')\n fieldSelector.classList.add('field-selector')\n fieldSelector.id = `select-${key}`\n this.materialFields.forEach((field) => {\n const opt = document.createElement('option')\n opt.value = field['field_name']\n opt.text = field['translation']\n fieldSelector.add(opt)\n selectTh.appendChild(fieldSelector)\n })\n\n selectTr.appendChild(selectTh)\n\n const th = document.createElement('th')\n th.innerHTML = key\n headerTr.appendChild(th)\n })\n this.tableHeaderTarget.appendChild(selectTr)\n this.tableHeaderTarget.appendChild(headerTr)\n this.json.slice(0, 5).forEach((row) => {\n const tr = document.createElement('tr')\n Object.keys(row).forEach((key) => {\n const td = document.createElement('td')\n td.innerHTML = row[key]\n tr.appendChild(td)\n })\n this.tableDataTarget.appendChild(tr)\n }\n )\n }\n\n async read_file(event) {\n const file = event.target.files[0]\n const data = await file.arrayBuffer()\n const workbook = XLSX.read(data)\n const sheet = workbook.Sheets[workbook.SheetNames[0]]\n this.json = XLSX.utils.sheet_to_json(sheet)\n }\n\n import () {\n const ok_for_import = this.checkForRequiredFields()\n if (ok_for_import) {\n this.importData()\n }\n else {\n alert('Please select a field for each requiered column')\n }\n }\n\n checkForRequiredFields () {\n const selectFields = this.element.querySelectorAll('select')\n const fields = []\n selectFields.forEach((field) => {\n fields.push(field.value)\n })\n const requiredFieldList = this.requiredFields.map((field) => field['field_name'])\n requiredFieldList.forEach ((field) => {\n if (!fields.includes(field)) {\n return false\n }\n })\n return true\n }\n\n importData () {\n const selectFields = this.element.querySelectorAll('.field-selector')\n const fieldsMatching = []\n this.importBtnTarget.classList.add('hidden')\n selectFields.forEach((field) => {\n fieldsMatching.push({'table_field': field.value, 'file_field': field.id.replace('select-','')})\n })\n const data = this.json\n fetch ('/admin/imports.json', {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n job_folder: 'amenities',\n fields_matching: fieldsMatching,\n data: data,\n company_id: this.companyTarget.value\n })\n })\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id\n const jobProviderId = data.job.job_provider_id\n this.progressTarget.classList.remove('hidden')\n this.progressTarget.textContent = `${i18n.t('shared.processing')}`\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000)\n })\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/admin/imports/status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n const percentage = data.percentage\n const importNumberValue = data.import_number\n this.progressTarget.textContent = `${i18n.t('shared.processing')} ${percentage}%`\n if(data.status == 'error') {\n this.stopCheckJobStatus()\n }else if(data.status === 'complete') {\n this.stopCheckJobStatus()\n this.progressTarget.textContent = `${i18n.t('shared.import_number')} ${importNumberValue} - ${i18n.t('shared.processing_completed')}`\n this.deleteBtnTarget.classList.remove('hidden')\n this.deleteBtnTarget.href = `/imports/${importNumberValue}`\n }\n })\n }\n\n stopCheckJobStatus() {\n if(this.timer) {\n clearInterval(this.timer)\n }\n }\n\n disconnect() {\n this.stopCheckJobStatus()\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n static targets = ['query', 'resultsDiv']\n\n search() {\n if (this.queryTarget.value.length > 2) {\n fetch(`/amenities/rep_search?q=${this.queryTarget.value}`, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n this.resultsDivTarget.innerHTML = ''\n data.response.results.forEach(line => {\n this.resultsDivTarget.insertAdjacentHTML('beforeend', `\n \n
  • \n
    \n
    \n ${line.name}\n
    \n
    \n ${line.address}\n
    \n
    \n
  • \n
    \n `)\n })\n })\n }\n else\n {\n this.resultsDivTarget.innerHTML = ''\n }\n }\n\n}\n\n\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['group', 'icon']\n\n toggleHidden() {\n this.hiddenData.forEach(item => item.classList.toggle('hidden'))\n this.iconTarget.classList.toggle('fa-chevron-right')\n this.iconTarget.classList.toggle('fa-chevron-down')\n }\n\n get hiddenData() {\n return this.groupTarget.querySelectorAll('li')\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\n\nexport default class extends Controller {\n\n startDrag(e) {\n this.sourceRow = e.target\n this.rowType = this.sourceAmenityId ? 'amenity' : 'unit'\n }\n\n enterRow(e) {\n e.preventDefault()\n e.target.closest('tr').classList.add('drag-bg')\n }\n\n leaveRow(e) {\n e.target.closest('tr').classList.remove('drag-bg')\n }\n\n dropRow(e) {\n e.preventDefault()\n this.targetRow = e.target.closest('tr')\n this.targetRow.classList.remove('drag-bg')\n\n if (!this.validRequest()) { return }\n\n if (this.sourceAmenityId) {\n fetch(`/amenities/${this.sourceAmenityId}/update_ancestry`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'POST',\n body: JSON.stringify({ parent_amenity_id: this.targetAmenityId, parent_unit_id: this.targetUnitId })\n })\n .then(response => response.json())\n .then((data) => {\n if (data.errors) { return alert(data.errors) }\n if (data.response.parent !== null) { this.removeParentToggle(data.response.parent) }\n\n const newRow = this.treeStructureController.buildAmenityRow(data.response.amenity)\n this.updateView(newRow)\n })\n } else if (this.sourceUnitId) {\n fetch(`/units/${this.sourceUnitId}/update_ancestry`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'POST',\n body: JSON.stringify({ parent_unit_id: this.targetUnitId })\n })\n .then(response => response.json())\n .then((data) => {\n if (data.errors) { return alert(data.errors) }\n if (data.response.parent !== null) { this.removeParentToggle(data.response.parent) }\n\n const newRow = this.treeStructureController.buildUnitRow(data.response.unit)\n this.updateView(newRow)\n })\n }\n }\n\n validRequest() {\n if (this.sourceAmenityId !== undefined && this.sourceAmenityId === this.targetAmenityId) {\n return false\n }\n if (!this.sourceAmenityId && (this.sourceUnitId === this.targetUnitId)) {\n return false\n }\n if (!this.sourceAmenityId && this.targetAmenityId) {\n alert(i18n.t('shared.you_are_not_allowed_to_do_that_action'))\n return false\n }\n if (!confirm(i18n.t('actions.are_you_sure'))) { return false }\n\n return true\n }\n\n removeParentToggle(parent) {\n const parentToggle = document.getElementById(`${parent.type}-${parent.id}`).querySelector('.unit-list-collapse')\n parentToggle.classList.remove('hover-pointer')\n parentToggle.classList.add('text-white')\n }\n\n updateView(newRow) {\n this.sourceRow.remove()\n this.targetRow.insertAdjacentHTML('afterend', newRow)\n if (this.targetRow.querySelector('.unit-list-collapse') && this.targetRow.querySelector('.unit-list-collapse').classList.contains('text-white')) {\n this.targetRow.querySelector('.unit-list-collapse').remove()\n this.targetRow.querySelector('td > div').insertAdjacentHTML('afterbegin', this.treeToggle())\n }\n if (this.targetRow.querySelector('.fa-angle-right')) {\n this.targetRow.querySelector('.unit-list-collapse').click()\n }\n }\n\n treeToggle() {\n return `\n asset-trees--structure#${this.rowType === 'amenity' ? 'hideAmenityChildren' : 'hideUnitChildren'}\">\n `\n }\n\n set sourceRow(row) { this._sourceRow = row }\n set targetRow(row) { this._targetRow = row }\n set rowType(type) { this._rowType = type }\n\n get sourceRow() { return this._sourceRow }\n get targetRow() { return this._targetRow }\n get rowType() { return this._rowType }\n\n get sourceAmenityId() { return this.sourceRow.dataset.amenity }\n get sourceUnitId() { return this.sourceRow.dataset.unit }\n\n get targetAmenityId() { return this.targetRow.dataset.amenity }\n get targetUnitId() { return this.targetRow.dataset.unit }\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n get treeStructureController() {\n return this.application.getControllerForElementAndIdentifier(this.targetRow, 'asset-trees--structure')\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\n\nexport default class extends Controller {\n static targets = ['form', 'download', 'progress']\n\n duplicate() {\n var modelName = this.assetType\n var modelId = this.formTarget.dataset.modelId\n fetch(`/${modelName}/${modelId}/duplicate.json`, {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(this.formParams)\n })\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id\n const jobProviderId = data.job.job_provider_id\n this.progressTarget.textContent = `${i18n.t('shared.processing')}`\n this.progressTarget.classList.remove('hidden')\n this.formTarget.classList.add('hidden')\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000)\n })\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/export_status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n const percentage = data.percentage\n this.progressTarget.textContent = `${i18n.t('shared.processing')} ${percentage}%`\n if (data.status == 'error') {\n this.stopCheckJobStatus()\n } else if (data.status === 'complete') {\n this.stopCheckJobStatus()\n this.progressTarget.innerHTML = `\n

    \n ${i18n.t('shared.processing_completed')}\n

    \n \n ${i18n.t('actions.see')}\n \n `\n }\n })\n }\n\n stopCheckJobStatus() {\n if (this.timer) { clearInterval(this.timer) }\n }\n\n disconnect() {\n this.stopCheckJobStatus()\n }\n\n get assetType() {\n return this.formTarget.dataset.modelName\n }\n\n get formParams() {\n return {\n name: document.getElementById('duplicate_name')?.value,\n internal_identifier: document.getElementById('duplicate_internal_identifier')?.value,\n serial_number: document.getElementById('duplicate_serial_number')?.value,\n contracts: this.convertBoolean(document.getElementById('duplicate_contracts')?.checked),\n materials: this.convertBoolean(document.getElementById('duplicate_materials')?.checked),\n providers: this.convertBoolean(document.getElementById('duplicate_providers')?.checked),\n measurments: this.convertBoolean(document.getElementById('duplicate_measurments')?.checked),\n users: this.convertBoolean(document.getElementById('duplicate_users')?.checked),\n surfaces: this.convertBoolean(document.getElementById('duplicate_surfaces')?.checked),\n maintenances: this.convertBoolean(document.getElementById('duplicate_maintenances')?.checked),\n children: this.convertBoolean(document.getElementById('duplicate_children')?.checked),\n }\n }\n\n convertBoolean(bool) {\n return bool ? '1' : '0'\n }\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\n\nexport default class extends Controller {\n static targets = ['parentLine', 'developBtn']\n\n showUnitChildren() {\n this.developBtnTarget.dataset.action = 'click->asset-trees--structure#hideUnitChildren'\n this.developBtnTarget.classList.remove('fa-angle-right')\n this.developBtnTarget.classList.add('fa-angle-down')\n fetch(`/units/${this.unitId}/unit_amenities.json`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n if (data != '' && data != null && data.length > 0) {\n data.reverse().forEach((amenity) => {\n this.parentLineTarget.insertAdjacentHTML('afterend', this.buildAmenityRow(amenity))\n })\n }\n })\n .then(() => {\n fetch(`/units/${this.unitId}/children_units.json`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n if (data != '' && data != null && data.length > 0) {\n data.reverse().forEach((unit) => {\n this.parentLineTarget.insertAdjacentHTML('afterend', this.buildUnitRow(unit))\n })\n }\n })\n })\n }\n\n showAmenityChildren() {\n this.developBtnTarget.dataset.action = 'click->asset-trees--structure#hideAmenityChildren'\n this.developBtnTarget.classList.remove('fa-angle-right')\n this.developBtnTarget.classList.add('fa-angle-down')\n fetch(`/amenities/${this.amenityId}/children.json`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n if (data != '' && data != null && data.length > 0) {\n data.reverse().forEach((amenity) => {\n this.parentLineTarget.insertAdjacentHTML('afterend', this.buildAmenityRow(amenity))\n })\n }\n })\n }\n\n showLocationChildren() {\n this.developBtnTarget.dataset.action = 'click->asset-trees--structure#hideLocationChildren'\n this.developBtnTarget.classList.remove('fa-angle-right')\n this.developBtnTarget.classList.add('fa-angle-down')\n fetch(`/material_locations/${this.locationId}/children.json`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n if (data != '' && data != null && data.length > 0) {\n data.reverse().forEach((location) => {\n this.parentLineTarget.insertAdjacentHTML('afterend', this.buildLocationRow(location))\n })\n }\n })\n }\n\n hideUnitChildren() {\n Array.from(document.querySelector('#unit_structure_table').querySelectorAll('tr'))\n .forEach((line) => {\n if (line.dataset.unitAncestry.split('/').includes(this.unitId)) {\n line.remove()\n }\n })\n this.developBtnTarget.dataset.action = 'click->asset-trees--structure#showUnitChildren'\n this.developBtnTarget.classList.add('fa-angle-right')\n this.developBtnTarget.classList.remove('fa-angle-down')\n }\n\n hideAmenityChildren() {\n Array.from(document.querySelector('#unit_structure_table').querySelectorAll('tr.amenity'))\n .forEach((line) => {\n if (line.dataset.amenityAncestry.split('/').includes(this.amenityId)) {\n line.remove()\n }\n })\n this.developBtnTarget.dataset.action = 'click->asset-trees--structure#showAmenityChildren'\n this.developBtnTarget.classList.add('fa-angle-right')\n this.developBtnTarget.classList.remove('fa-angle-down')\n }\n\n hideLocationChildren() {\n Array.from(document.querySelector('#structure_table').querySelectorAll('tr'))\n .forEach((line) => {\n if (line.dataset.locationAncestry.split('/').includes(this.locationId)) {\n line.remove()\n }\n })\n this.developBtnTarget.dataset.action = 'click->asset-trees--structure#showLocationChildren'\n this.developBtnTarget.classList.add('fa-angle-right')\n this.developBtnTarget.classList.remove('fa-angle-down')\n }\n\n buildAmenityRow(amenity) {\n let toggle = ''\n if (amenity.has_children) {\n toggle = `asset-trees--structure#showAmenityChildren\">`\n } else {\n toggle = ''\n }\n\n return `\n asset-trees--drag-and-drop#startDrag\n dragover->asset-trees--drag-and-drop#enterRow\n drop->asset-trees--drag-and-drop#dropRow\n dragleave->asset-trees--drag-and-drop#leaveRow\">\n \n
    \n ${toggle}\n ${amenity.name} ${amenity.internal_identifier ? `(${amenity.internal_identifier})` : ''}\n
    \n \n \n \n ${amenity.responsible == null ? '' : amenity.responsible}\n \n \n
    \n \n
    \n \n
    \n
    \n ${this.amenityDropdownBtn(amenity)}\n
    \n \n \n `\n }\n\n amenityDropdownBtn(amenity) {\n let duplicateOption = ''\n if (amenity.beta_access) {\n duplicateOption = `\n \n
  • \n ${i18n.t('actions.duplicate')}\n
  • \n
    \n `\n }\n\n return `\n
    \n
    \n \n
    \n \n
    \n `\n }\n\n buildLocationRow(location) {\n let toggle = ''\n if (location.has_children) {\n toggle = `asset-trees--structure#showLocationChildren\">`\n } else {\n toggle = ''\n }\n\n let users = ''\n if (location.restricted_access) {\n users = `\n \n ${location.users.map(user => `

    ${user.username}

    `)}\n \n `\n }\n\n return `\n \n \n
    \n ${toggle}\n ${location.name}\n
    \n \n ${users}\n \n
    \n ${this.locationDropdownBtn(location)}\n
    \n \n \n `\n }\n\n locationDropdownBtn(location) {\n return `\n
    \n
    \n \n
    \n \n
    \n `\n }\n\n buildUnitRow(unit) {\n let toggle = ''\n if (unit.has_children || unit.has_amenities) {\n toggle = `asset-trees--structure#showUnitChildren\">`\n } else {\n toggle = ''\n }\n\n return `\n asset-trees--drag-and-drop#startDrag\n dragover->asset-trees--drag-and-drop#enterRow\n drop->asset-trees--drag-and-drop#dropRow\n dragleave->asset-trees--drag-and-drop#leaveRow\">\n \n
    \n ${toggle}\n ${unit.name}\n
    \n \n ${unit.alt_name || ''}\n \n ${unit.managers.map(manager => `

    ${manager}

    `)}\n \n \n
    \n \n
    \n \n
    \n
    \n ${this.unitDropdownBtn(unit)}\n
    \n \n \n `\n }\n\n unitDropdownBtn(unit) {\n let duplicateOption = ''\n if (unit.beta_access) {\n duplicateOption = `\n \n
  • \n ${i18n.t('actions.duplicate')}\n
  • \n
    \n `\n }\n\n return `\n
    \n
    \n \n
    \n \n
    \n `\n }\n\n get depth() { return this.parentLineTarget.dataset.depth }\n get unitId() { return this.parentLineTarget.dataset.unit }\n get amenityId() { return this.parentLineTarget.dataset.amenity }\n get locationId() { return this.parentLineTarget.dataset.location }\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n close(event) {\n event.target.closest('.modal-content').querySelector('.btn-close')\n .click()\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n static targets = ['id', 'responsibleBtn', 'deadlineBtn', 'defaultCostBtn']\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n get companyId() {\n return this.idTarget.dataset.id\n }\n\n toggle(event) {\n let button\n if (event.target.tagName == 'I') {\n button = event.target.parentElement\n } else {\n button = event.target\n }\n const parameter = button.dataset.parameter\n const value = button.dataset.value\n document.querySelectorAll(`[data-parameter=\"${parameter}\"]`).forEach((element) => {\n if (element.dataset.value == value) {\n element.classList.add('active')\n } else {\n element.classList.remove('active')\n }\n })\n\n fetch(`/companies/${this.companyId}`, {\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': this.csrfToken },\n body: JSON.stringify({ company: { [parameter]: value } })\n })\n\n }\n\n toggle_roles(event) {\n const role = event.target.dataset.role\n const selected_value = event.target.dataset.value\n const field = event.target.dataset.field\n if (role && selected_value && field) {\n fetch(`/companies/${this.companyId}/update_role_permissions`, {\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify({\n role: role,\n value: selected_value == 'true' ? true : false,\n field: field\n }),\n method: 'PATCH',\n }).then(response => response.json())\n .then(_data => {\n event.target.closest('.parameter-select')\n .querySelectorAll(`button[data-role=\"${role}\"]`)\n .forEach(element => {\n if (element.dataset.value == selected_value) {\n element.classList.add('active')\n } else {\n element.classList.remove('active')\n }\n })\n })\n }\n }\n\n\n responsible_select() {\n let params = []\n document.querySelectorAll('.parameter-select').forEach((element) => {\n params.push([`${element.id}_id`, element.value])\n\n })\n // transform an array of arrays into an object that can be used in the fetch body\n\n const parameters = Object.fromEntries(params)\n fetch(`/companies/${this.companyId}`, {\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': this.csrfToken },\n body: JSON.stringify({ company: parameters })\n })\n .then(response => response.json())\n .then((data) => {\n if (data.message == 'ok') {\n this.btn_to_saved(this.responsibleBtnTarget)\n }\n })\n }\n\n\n set_default_deadline() {\n const deadline = document.getElementById('default_deadline_days').value * 86400 + document.getElementById('default_deadline_hours').value * 3600\n fetch(`/companies/${this.companyId}`, {\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': this.csrfToken },\n body: JSON.stringify({ company: { default_deadline: deadline } })\n })\n .then(response => response.json())\n .then((data) => {\n if (data.message == 'ok') {\n this.btn_to_saved(this.deadlineBtnTarget)\n }\n })\n }\n\n set_default_costs() {\n let params = []\n document.querySelectorAll('.parameter-costs').forEach((element) => {\n params.push([`${element.id}`, element.value * 100])\n\n })\n // transform an array of arrays into an object that can be used in the fetch body\n\n const parameters = Object.fromEntries(params)\n fetch(`/companies/${this.companyId}`, {\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': this.csrfToken },\n body: JSON.stringify({ company: parameters })\n })\n .then(response => response.json())\n .then((data) => {\n if (data.message == 'ok') {\n this.btn_to_saved(this.defaultCostBtnTarget)\n }\n })\n }\n\n btn_to_save(event) {\n const btnId = event.params.btnid\n const action = event.params.action\n const btn = document.getElementById(btnId)\n btn.innerHTML = i18n.t('actions.save')\n btn.classList.remove('btn-success')\n btn.classList.add('btn-outline-primary')\n btn.dataset.action = `click->companies--parameters#${action}`\n }\n\n btn_to_saved(btn) {\n btn.innerHTML = i18n.t('shared.changed_saved')\n btn.classList.add('btn-success')\n btn.classList.remove('btn-outline-primary')\n btn.dataset.action = ''\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = [\n 'unit',\n 'amenityType',\n 'amenityList',\n 'totalCount',\n 'addAll',\n 'paginate'\n ]\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n get contractId() { return this.amenityListTarget.getAttribute('data-contract')}\n\n connect() {\n this.getAmenities()\n }\n\n getAmenities(event) {\n var page_nb = ''\n if (event) {\n event.preventDefault()\n page_nb = event.target.dataset.page\n }\n fetch(`/contracts/${this.contractId}/get_unlinked_amenities.json?unit_id=${this.unitTarget.value}&amenity_type_id=${this.amenityTypeTarget.value}&page=${page_nb}`,\n {\n headers: {'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken },\n method: 'GET'\n }\n ).then(response => response.json())\n .then(data => {\n this.amenityListTarget.innerHTML = ''\n \n this.totalCountTarget.innerHTML = data.total_count\n this.paginateTarget.innerHTML = ''\n\n var pages_count = Math.ceil(data.total_count / 50)\n if (pages_count > 1)\n {\n var pages = []\n for (var i = 1; i <= pages_count; i++) {\n pages.push(i)\n }\n pages.forEach(page => {\n var li = document.createElement('li')\n li.classList.add('page-item')\n var div = document.createElement('div')\n div.classList.add(\"page-link\")\n div.innerText = page\n if ((page == page_nb) || (page_nb == '' && page == 1))\n { li.classList.add('active') }\n if (page != page_nb)\n { \n li.setAttribute('data-action', 'click->contracts--filter-amenities#getAmenities')\n li.setAttribute('data-page', page)\n div.setAttribute('data-action', 'click->contracts--filter-amenities#getAmenities')\n div.setAttribute('data-page', page)\n }\n li.appendChild(div)\n this.paginateTarget.appendChild(li)\n })\n }\n\n this.addAllTarget.setAttribute('data-ids', data.amenities.map(amenity => amenity.id).join(','))\n \n data.amenities.forEach(amenity => {\n var row = document.createElement('tr')\n var btn = document.createElement('td')\n var name = document.createElement('td')\n var amenity_type = document.createElement('td')\n var brand = document.createElement('td')\n var serial_number = document.createElement('td')\n var unit_name = document.createElement('td')\n\n btn.innerHTML = `
    contracts--filter-amenities#addToContract\" data-id=${amenity.id}>Add`\n name.innerHTML = amenity.name\n amenity_type.innerHTML = amenity.amenity_type_name\n brand.innerHTML = amenity.brand\n serial_number.innerHTML = amenity.serial_number\n unit_name.innerHTML = amenity.unit_name\n\n row.appendChild(btn)\n row.appendChild(name)\n row.appendChild(amenity_type)\n row.appendChild(brand)\n row.appendChild(serial_number)\n row.appendChild(unit_name)\n\n this.amenityListTarget.appendChild(row)\n\n \n\n })\n })\n }\n\n addToContract(event) {\n fetch(`/contract_to_amenities.json?`,\n {\n headers: {'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken },\n method: 'POST',\n body: JSON.stringify({ contract_to_amenity: { contract_id: this.contractId, amenity_id: event.target.dataset.id } })\n }\n ).then(response => response.json())\n .then(data => {\n \n \n const linkedAmenities = document.querySelector('#amenities_linked_to_contract')\n var row = document.createElement('tr')\n var name = document.createElement('td')\n var brand = document.createElement('td')\n var amenity_type = document.createElement('td')\n var unit = document.createElement('td')\n var btn = document.createElement('td')\n\n name.innerHTML = event.target.parentElement.parentElement.children[1].innerHTML\n brand.innerHTML = event.target.parentElement.parentElement.children[3].innerHTML\n amenity_type.innerHTML = event.target.parentElement.parentElement.children[2].innerHTML\n unit.innerHTML = event.target.parentElement.parentElement.children[5].innerHTML\n btn.innerHTML = `\n \n \n `\n\n row.appendChild(name)\n row.appendChild(brand)\n row.appendChild(amenity_type)\n row.appendChild(unit)\n row.appendChild(btn)\n\n linkedAmenities.appendChild(row)\n\n document.getElementById('amenities-linked-table').classList.remove(\"hidden\")\n document.getElementById('no-amenities-linked').classList.add(\"hidden\")\n\n event.target.parentElement.parentElement.remove()\n this.totalCountTarget.innerHTML = parseInt(this.totalCountTarget.innerHTML) - 1\n })\n }\n\n addAllToContract() {\n fetch(`/contract_to_amenities.json?`,\n {\n headers: {'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken },\n method: 'POST',\n body: JSON.stringify({ contract_to_amenity: { contract_id: this.contractId, equipment_list: this.addAllTarget.dataset.ids } })\n }\n ).then(response => response.json())\n .then(data => {\n\n document.getElementById('amenities-linked-table').classList.remove(\"hidden\")\n document.getElementById('no-amenities-linked').classList.add(\"hidden\")\n window.location.reload()\n })\n }\n}","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = [\n 'unit',\n 'unitList',\n 'totalCount',\n 'addAll',\n 'paginate'\n ]\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n get contractId() { return this.unitListTarget.getAttribute('data-contract') }\n\n connect() {\n this.getUnits()\n }\n\n getUnits(event) {\n var page_nb = ''\n if (event) {\n event.preventDefault()\n page_nb = event.target.dataset.page\n }\n fetch(`/contracts/${this.contractId}/get_unlinked_units.json?page=${page_nb}`,\n {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'GET'\n }\n ).then(response => response.json())\n .then(data => {\n this.unitListTarget.innerHTML = ''\n this.totalCountTarget.innerHTML = data.total_count\n this.paginateTarget.innerHTML = ''\n\n var pages_count = Math.ceil(data.total_count / 50)\n if (pages_count > 1) {\n var pages = []\n for (var i = 1; i <= pages_count; i++) {\n pages.push(i)\n }\n pages.forEach(page => {\n var li = document.createElement('li')\n li.classList.add('page-item')\n var div = document.createElement('div')\n div.classList.add('page-link')\n div.innerText = page\n if ((page == page_nb) || (page_nb == '' && page == 1)) { li.classList.add('active') }\n if (page != page_nb) {\n li.setAttribute('data-action', 'click->contracts--filter-units#getUnits')\n li.setAttribute('data-page', page)\n div.setAttribute('data-action', 'click->contracts--filter-units#getUnits')\n div.setAttribute('data-page', page)\n }\n li.appendChild(div)\n this.paginateTarget.appendChild(li)\n })\n }\n\n this.addAllTarget.setAttribute('data-ids', data.units.map(unit => unit.id).join(','))\n\n data.units.forEach(unit => {\n var row = document.createElement('tr')\n var btn = document.createElement('td')\n var name = document.createElement('td')\n var address = document.createElement('td')\n\n name.innerHTML = unit.name\n address.innerHTML = unit.address\n btn.innerHTML = `\n
    contracts--filter-units#addToContract\" data-id=${unit.id}>\n Add\n \n `\n row.appendChild(btn)\n row.appendChild(name)\n row.appendChild(address)\n\n this.unitListTarget.appendChild(row)\n })\n })\n }\n\n addToContract(event) {\n fetch('/contract_to_units.json?',\n {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'POST',\n body: JSON.stringify({ contract_to_unit: { contract_id: this.contractId, unit_id: event.target.dataset.id } })\n }\n ).then(response => response.json())\n .then(data => {\n const linkedUnits = document.querySelector('#units_linked_to_contract')\n var row = document.createElement('tr')\n var name = document.createElement('td')\n var address = document.createElement('td')\n var btn = document.createElement('td')\n\n name.innerHTML = event.target.parentElement.parentElement.children[1].innerHTML\n address.innerHTML = event.target.parentElement.parentElement.children[2].innerHTML\n btn.innerHTML = `\n \n \n \n `\n row.appendChild(name)\n row.appendChild(address)\n row.appendChild(btn)\n\n linkedUnits.appendChild(row)\n\n document.getElementById('units-linked-table').classList.remove('hidden')\n document.getElementById('no-units-linked').classList.add('hidden')\n\n event.target.parentElement.parentElement.remove()\n this.totalCountTarget.innerHTML = parseInt(this.totalCountTarget.innerHTML) - 1\n })\n }\n\n addAllToContract() {\n fetch('/contract_to_units.json?',\n {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'POST',\n body: JSON.stringify({ contract_to_unit: { contract_id: this.contractId, unit_list: this.addAllTarget.dataset.ids } })\n }\n ).then(response => response.json())\n .then(_data => {\n document.getElementById('units-linked-table').classList.remove('hidden')\n document.getElementById('no-units-linked').classList.add('hidden')\n window.location.reload()\n })\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = [\n 'selectTypeBtn',\n 'createTypeBtn',\n 'typeSelection',\n 'typeCreation',\n 'typeSelectionInput',\n 'typeCreationInput',\n 'autoRenewal',\n 'renewalDurationInput'\n ]\n\n connect() {\n if (this.typeSelectionInputTarget.value !== '') { this.typeSelectionTarget.classList.remove('hidden') }\n this.checkSubmit()\n this.checkAutoRenew()\n }\n\n get submitBtn() {\n return document.getElementById('submit-button')\n }\n\n revealTypeSelection() {\n this.typeCreationInputTarget.value = ''\n this.typeSelectionTarget.classList.remove('hidden')\n this.selectTypeBtnTarget.classList.remove('btn-outline-primary')\n this.selectTypeBtnTarget.classList.add('btn-primary')\n\n this.typeCreationTarget.classList.add('hidden')\n this.createTypeBtnTarget.classList.add('btn-outline-primary')\n this.createTypeBtnTarget.classList.remove('btn-primary')\n }\n\n revealTypeCreation() {\n this.typeSelectionInputTarget.value = ''\n this.typeSelectionTarget.classList.add('hidden')\n this.selectTypeBtnTarget.classList.add('btn-outline-primary')\n this.selectTypeBtnTarget.classList.remove('btn-primary')\n\n this.typeCreationTarget.classList.remove('hidden')\n this.createTypeBtnTarget.classList.remove('btn-outline-primary')\n this.createTypeBtnTarget.classList.add('btn-primary')\n }\n\n checkSubmit() {\n const formSubmitable = this.checkTypeValuePresence()\n if (formSubmitable) {\n this.submitBtn.disabled = false\n } else {\n this.submitBtn.disabled = true\n }\n }\n\n checkTypeValuePresence() {\n if (this.typeSelectionInputTarget.value !== '') { return true }\n if (this.typeCreationInputTarget.value !== '') { return true }\n return false\n }\n\n checkAutoRenew() {\n if (this.autoRenewalTarget.checked) {\n this.renewalDurationInputTarget.classList.remove('hidden')\n } else {\n this.renewalDurationInputTarget.classList.add('hidden')\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { i18n } from '../src/config/i18n.js'\n\nexport default class extends Controller {\n static targets = [\n 'customFieldId',\n 'amenityTypeList',\n 'amenityTypeIds',\n // 'mandatory'\n ]\n\n get amenityTypeIds() { return Array.from(this.amenityTypeIdsTarget.querySelectorAll('option')).map((option) => option.value) }\n\n addLink() {\n fetch(`/custom_fields/${this.customFieldIdTarget.id}/add_link?am_type_ids=${this.amenityTypeIds}`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n this.amenityTypeListTarget.innerHTML = ''\n data.forEach(amenityType => {\n const item = `\n
  • \n ${amenityType.name}\n
    custom-field-to-amenity#removeLink\">\n ${i18n.t('actions.delete')}\n
    \n
  • \n `\n this.amenityTypeListTarget.insertAdjacentHTML('beforeend', item)\n })\n })\n }\n\n removeLink(event) {\n const item = event.currentTarget.parentNode\n if (confirm(`${i18n.t('actions.are_you_sure')}`)) {\n fetch(`/custom_fields/${this.customFieldIdTarget.id}/remove_link?amenity_type=${event.currentTarget.id}`,\n {\n method: 'DELETE',\n headers: {\n 'Accept': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(_ => item.remove())\n }\n }\n\n get csrfToken() { return document.head.querySelector(\"meta[name='csrf-token']\").getAttribute(\"content\") }\n\n}\n","import Choices from 'choices.js'\nimport { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['modelType', 'fieldsList']\n\n showCustomFields() {\n fetch(`/${this.modelType}/${this.modelTypeTarget.value}/custom_fields`,\n {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n this.fieldsListTarget.innerHTML = ''\n for (const [key, values] of Object.entries(data)) {\n if (key !== '') {\n this.fieldsListTarget.insertAdjacentHTML('beforeend', `
    ${key}
    `)\n }\n if (values !== null) {\n values.forEach(field => {\n let classes = ''\n if (key !== '') { classes = 'ms-3' }\n if (field.reply_type === 'multiple_choice') { classes = `${classes} js-choice-container-large` }\n\n var newInputDiv = `\n
    \n \n
    \n `\n this.fieldsListTarget.insertAdjacentHTML('beforeend', newInputDiv)\n\n switch (field.reply_type) {\n case 'free_text':\n this.createFreeTextField(field)\n break\n case 'multiple_choice':\n this.createMultipleChoiceField(field)\n break\n case 'true_false':\n this.createBooleanField(field)\n break\n case 'date':\n this.createDateField(field)\n break\n case 'date_time':\n this.createDateTimeField(field)\n break\n case 'number':\n this.createNumberField(field)\n break\n }\n })\n }\n }\n })\n }\n\n createFreeTextField(field) {\n const newTextField = `\n \n `\n this.fieldsListTarget.lastElementChild.insertAdjacentHTML('beforeend', newTextField)\n }\n\n createMultipleChoiceField(field) {\n const newMultipleChoiceField = `\n \n `\n this.fieldsListTarget.lastElementChild.insertAdjacentHTML('beforeend', newMultipleChoiceField)\n\n const selectChoices = []\n field.choice.forEach((option) => {\n selectChoices.push({\n value: option,\n label: option\n })\n })\n\n const selector = document.getElementById(`field-${field.id}`)\n const choice = new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n\n choice.setChoices(\n selectChoices,\n 'value',\n 'label',\n false\n )\n }\n\n createBooleanField(field) {\n const newBooleanField = `\n
    \n \n
    \n `\n this.fieldsListTarget.lastElementChild.insertAdjacentHTML('beforeend', newBooleanField)\n }\n\n createDateField(field) {\n const newDateField = `\n \n `\n this.fieldsListTarget.lastElementChild.insertAdjacentHTML('beforeend', newDateField)\n }\n\n createDateTimeField(field) {\n const newDateTimeField = `\n \n `\n this.fieldsListTarget.lastElementChild.insertAdjacentHTML('beforeend', newDateTimeField)\n }\n\n createNumberField(field) {\n const newNumberField = `\n \n `\n this.fieldsListTarget.lastElementChild.insertAdjacentHTML('beforeend', newNumberField)\n }\n\n get modelType() { return this.modelTypeTarget.dataset.pluralizedModelType }\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['page']\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n connect() {\n fetch('/users/update_preferences.json', {\n method: 'PATCH',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n preferences: {\n dashboard: {\n graph: this.pageTarget.dataset.page\n }\n }\n })\n })\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['filters', 'button', 'icon']\n\n connect() {\n this.buttonTarget.addEventListener('click', () => this.toggleFilters())\n }\n\n toggleFilters() {\n this.filtersTarget.classList.toggle('hidden')\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['list', 'filters']\n\n filter(event) {\n this.listTarget.querySelectorAll('li.hidden').forEach((li) => {\n li.classList.remove('hidden')\n })\n event.target.classList.toggle('active')\n if (event.target.classList.contains('active')) {\n event.target.style.borderColor = `${event.target.dataset.color}`\n } else {\n event.target.style.borderColor = `${event.target.dataset.color}66`\n }\n let active_filters_values = Array.from(this.filtersTarget.querySelectorAll('.active')).map((filter) => filter.dataset.label)\n active_filters_values.forEach((filter) => {\n this.listTarget.querySelectorAll('li:not(.hidden)').forEach((li) => {\n if (!(li.dataset.labels.includes(filter))) {\n li.classList.add('hidden')\n }\n })\n })\n }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n static targets = [\"controllerDiv\", \"inputs\", \"buttons\"]\n\n showChoice(event) {\n const choice = event.target.dataset.inputChoice\n this.inputsTarget.querySelectorAll(\".exclusif_input\").forEach((input) => {\n if (input.tagName === 'SELECT') {}\n else {\n input.value = \"\";\n }\n })\n // write a function to loop through a div's children and add or remove a class\n\n\n Array.from(this.inputsTarget.children).forEach((div) => {\n if (div.id != choice) {\n div.classList.add(\"hidden\")\n }\n else {\n div.classList.remove(\"hidden\")\n }\n })\n Array.from(this.buttonsTarget.children).forEach((button) => {\n button.classList.remove(\"active\")\n })\n event.target.classList.add(\"active\")\n }\n\n}","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['reportlist']\n\n getreports() {\n if ((this.amenityId === null || this.amenityId === '') && (this.unitId === null || this.unitId === '')) {\n this.reportlist.innerHTML = ''\n return\n }\n if (this.reportlist) {\n fetch(`/reports/get_existing_reports?amenity_id=${this.amenityId}&unit_id=${this.unitId}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n this.reportlist.innerHTML = ''\n data.forEach(report => {\n this.reportlist.insertAdjacentHTML('beforeend', `\n \n
    \n
    \n ${report.title}\n
    \n
    \n ${report.created_at} |\n ${report.expertise ? ` ${report.expertise}
    ` : ''}\n ${report.unit ? ` ${report.unit}
    ` : ''}\n ${report.amenity ? ` ${report.amenity}
    ` : ''}\n ${report.username}
    \n ${report.responsible}
    \n ${report.description}\n
    \n
    \n
    \n `\n )\n })\n })\n }\n }\n\n setUnitId(event) {\n this.unitId = event.target.value\n this.getreports()\n }\n\n setAmenityId(event) {\n this.amenityId = event.target.value\n this.getreports()\n }\n\n get unitId() {\n return this._unitId\n }\n\n set unitId(newId) {\n this._unitId = newId\n }\n\n get amenityId() {\n return this._amenityId\n }\n\n set amenityId(newId) {\n this._amenityId = newId\n }\n\n get reportlist() {\n return this.reportlistTarget\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n\n static targets = [\n \"line\"\n ]\n get csrfToken() { return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\") }\n\n unlinkUser(event) {\n var user_id = this.lineTarget.dataset.user;\n var expertise_id = this.lineTarget.dataset.expertise;\n fetch (`/expertises/${expertise_id}/unlink_user.json?user_id=${user_id}`, {\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken\n },\n method: \"PATCH\",\n })\n .then(response => response.json())\n .then(data => {\n this.lineTarget.remove()\n })\n }\n\n unlinkProvider(event) {\n var provider_id = this.lineTarget.dataset.provider;\n var expertise_id = this.lineTarget.dataset.expertise;\n fetch (`/expertises/${expertise_id}/unlink_provider.json?provider_id=${provider_id}`, {\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken\n },\n method: \"PATCH\",\n })\n .then(response => response.json())\n .then(data => {\n this.lineTarget.remove()\n })\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n static targets = ['download', 'progress', 'progressWrapper']\n\n export() {\n var fetchUrl = this.progressTarget.dataset.fetchurl\n var params = this.progressTarget.dataset.reqparams\n fetch(`${fetchUrl}?${params}`)\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id\n const jobProviderId = data.job.job_provider_id\n this.progressTarget.classList.remove('hidden')\n this.progressTarget.textContent = `${i18n.t('shared.processing')}`\n this.downloadTarget.classList.add('hidden')\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000)\n })\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/export_status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n const percentage = data.percentage\n let percentageText = ''\n if (percentage) {\n percentageText = `(${percentage}%)`\n }\n this.progressTarget.textContent = `${i18n.t('shared.processing')} ${percentageText}`\n if(data.status == 'error') {\n this.stopCheckJobStatus()\n } else if(data.status === 'complete') {\n this.stopCheckJobStatus()\n this.progressTarget.textContent = `${i18n.t('shared.processing_completed')}`\n this.progressTarget.insertAdjacentHTML('afterend', `${i18n.t('shared.file_sent_to_your_email_address')}`)\n }\n })\n }\n\n stopCheckJobStatus() {\n if(this.timer) {\n clearInterval(this.timer)\n }\n }\n\n disconnect() {\n this.stopCheckJobStatus()\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n startDrag(e) {\n this.sourceRow = e.target\n\n e.dataTransfer.setData('text', e.target.id)\n e.dataTransfer.effectAllowed = 'move'\n }\n\n enterRow(e) {\n e.preventDefault()\n e.dataTransfer.dropEffect = 'move'\n\n if (document.getElementById('sourceRowCopy')) { return }\n\n const sourceRowCopy = this.sourceRow.cloneNode(true)\n sourceRowCopy.classList.add('table-primary')\n sourceRowCopy.id = 'sourceRowCopy'\n e.target.closest('tr').after(sourceRowCopy)\n }\n\n leaveRow() {\n document.getElementById('sourceRowCopy').remove()\n }\n\n dropRow(e) {\n e.preventDefault()\n document.getElementById('sourceRowCopy').remove()\n\n const data = e.dataTransfer.getData('text')\n const targetRow = e.target.closest('tr')\n targetRow.after(document.getElementById(data))\n\n const questionOrder = Array.from(this.element.querySelectorAll('tbody > tr')).map((row) => row.dataset.questionId)\n\n fetch(`/form_templates/${this.templateId}/reorder_questions.json`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'PATCH',\n body: JSON.stringify({ order: questionOrder })\n })\n .then(response => response.json())\n .then((data) => {\n if (data.errors) { return alert(data.errors) }\n })\n }\n\n set sourceRow(row) { this._sourceRow = row }\n\n get sourceRow() { return this._sourceRow }\n get templateId() { return this.element.dataset.templateId }\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = [\n 'selectBtn',\n 'createBtn',\n 'selection',\n 'creation',\n 'selectionInput',\n 'creationInput',\n 'inputType'\n ]\n\n connect() {\n if (this.selectionInputTarget.value !== '') {\n this.selectionTarget.classList.remove('hidden')\n this.selectBtnTarget.classList.remove('btn-outline-primary')\n this.selectBtnTarget.classList.add('btn-primary')\n }\n this.checkSubmit()\n }\n\n revealSelection() {\n this.creationInputTarget.value = ''\n this.inputTypeTarget.value = 'selection'\n this.selectionTarget.classList.remove('hidden')\n this.selectBtnTarget.classList.remove('btn-outline-primary')\n this.selectBtnTarget.classList.add('btn-primary')\n\n this.creationTarget.classList.add('hidden')\n this.createBtnTarget.classList.add('btn-outline-primary')\n this.createBtnTarget.classList.remove('btn-primary')\n\n this.checkSubmit()\n }\n\n revealCreation() {\n this.selectionInputTarget.value = ''\n this.inputTypeTarget.value = 'creation'\n this.selectionTarget.classList.add('hidden')\n this.selectBtnTarget.classList.add('btn-outline-primary')\n this.selectBtnTarget.classList.remove('btn-primary')\n\n this.creationTarget.classList.remove('hidden')\n this.createBtnTarget.classList.remove('btn-outline-primary')\n this.createBtnTarget.classList.add('btn-primary')\n\n this.checkSubmit()\n }\n\n checkSubmit() {\n const formSubmitable = this.checkValuePresence()\n this.submitBtn.disabled = !formSubmitable\n }\n\n checkValuePresence() {\n var check = false\n if (this.selectionInputTarget.value !== '') { check = true }\n if (this.creationInputTarget.value !== '') { check = true }\n return check\n }\n\n get submitBtn() {\n return document.getElementById('submit-button')\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = [\n 'selectAllBtn',\n 'checkBoxes'\n ]\n\n toggleSelectAll() {\n if (this.selectAllBtnTarget.checked) {\n this.inputs.forEach((input) => input.checked = true)\n } else {\n this.inputs.forEach((input) => input.checked = false)\n }\n }\n\n get inputs() {\n return this.checkBoxesTarget.querySelectorAll('input[type=\"checkbox\"]')\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n// import { FullCalender } from '@fullcalendar/core';\nimport { Draggable } from '@fullcalendar/interaction'\n// import * as $ from 'jquery/dist/jquery'\nexport default class extends Controller {\n\n static targets = [\n 'taskList',\n 'pageDiv',\n 'lateTasks',\n 'location',\n 'responsible',\n 'expertise',\n 'performer'\n ]\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n connect() {\n this.calendarEl = window.calendar\n if (this.lateTasksTarget) {\n new Draggable(this.lateTasksTarget, {\n itemSelector: '.notif-item',\n eventData: function (eventEl) {\n return {\n extendedProps: {\n status_color: eventEl.dataset.colorstatus,\n location: eventEl.dataset.location,\n logo_class: eventEl.dataset.logoclass,\n elemid: eventEl.dataset.todoid,\n to_do_id: eventEl.dataset.todoid,\n task_type: eventEl.dataset.type,\n amenity: eventEl.dataset.amenity,\n unitId: eventEl.dataset.unitid,\n userId: eventEl.dataset.userid\n },\n title: eventEl.dataset.title\n }\n }\n })\n }\n const nav = this.pageDivTarget.querySelector('nav')\n if (nav) {\n var ul = document.createElement('ul')\n ul.classList.add('pagination')\n nav.appendChild(ul)\n\n this.pageDivTarget.querySelectorAll('span').forEach((span) => {\n var li = document.createElement('li')\n li.innerHTML = span.innerHTML\n ul.appendChild(li)\n if (li.querySelector('a')) {\n var link = li.querySelector('a')\n var nextPage = link.getAttribute('href').split('page=')[1]\n link.setAttribute('data-page', nextPage)\n link.removeAttribute('href')\n link.classList.add('page-link')\n link.setAttribute('data-action', 'click->fullcalendar--agenda-paginate#goToPage')\n switch (link.innerText) {\n case 'first':\n link.innerHTML = ``\n break\n case 'prev':\n link.innerHTML = ``\n break\n case 'next':\n link.innerHTML = ``\n break\n case 'last':\n link.innerHTML = ``\n break\n default:\n break\n }\n\n }\n else {\n var link2 = document.createElement('a')\n link2.classList.add('page-link')\n link2.innerHTML = li.innerHTML\n link2.removeAttribute('href')\n li.innerHTML = ''\n li.appendChild(link2)\n }\n li.classList.add('page-item')\n if (span.classList.contains('current')) {\n li.classList.add('active')\n }\n span.remove()\n })\n }\n }\n\n goToPage(event) {\n const nextPage = event.target.getAttribute('data-page')\n const company = this.taskListTarget.dataset.company\n const method = this.taskListTarget.dataset.list\n const unit_id = this.locationTarget.value\n const responsible_id = this.responsibleTarget.value\n const expertise_id = this.expertiseTarget.value\n const performer_id = this.performerTarget.value\n var unitText = ''\n var responsibleText = ''\n var expertiseText = ''\n var performerText = ''\n if (unit_id) {\n unitText = `&unit_id=${unit_id}`\n }\n if (responsible_id) {\n responsibleText = `&responsible_id=${responsible_id}`\n }\n if (expertise_id) {\n expertiseText = `&expertise_id=${expertise_id}`\n }\n if (performer_id) {\n performerText = `&performer_id=${performer_id}`\n }\n fetch(`/companies/${company}/${method}.json?page=${nextPage}${unitText}${responsibleText}${expertiseText}${performerText}`,\n {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'GET'\n }\n ).then(response => response.json())\n .then(data => {\n this.taskListTarget.innerHTML = ''\n data.forEach(todo => {\n var li = document.createElement('li')\n li.classList.add('list-group-item')\n li.classList.add('list-group-item-action')\n li.classList.add('notif-item')\n li.classList.add('agenda_task_list_item')\n li.dataset.type = 'to_do_item'\n li.dataset.todoid = todo.id\n li.dataset.location = todo.location\n li.dataset.expertise = todo.expertise_id\n li.dataset.responsible = todo.responsible_id\n li.dataset.logoclass = todo.logo_class\n li.dataset.colorstatus = todo.status_color\n li.dataset.title = todo.title\n li.dataset.amenity = todo.amenity\n li.dataset.root = todo.root_unit_id\n li.dataset.duration = todo.duration\n var link = document.createElement('a')\n link.setAttribute('href', `/openModal?div=view-task-content&modal=to_do_items%2Fedit_in_calendar&modal_id=view-task-btn&task_type=ToDoItem&to_do_item=${todo.id}`)\n link.setAttribute('data-remote', 'true')\n var div_1 = document.createElement('div')\n div_1.classList.add('card_content')\n var div_2 = document.createElement('div')\n div_2.classList.add('card_title')\n div_2.innerHTML = ` ${todo.title}`\n var div_3 = document.createElement('div')\n div_3.classList.add('card_address', 'simple_text')\n if (todo.report_priority_name) {\n div_3.insertAdjacentHTML('beforeend', ` ${todo.report_priority_name} | `)\n }\n div_3.insertAdjacentHTML('beforeend', ` ${todo.display_todo_date}
    \n ${todo.location}\n | ${todo.amenity}
    `)\n if (todo.responsible) {\n div_3.insertAdjacentHTML('beforeend', ` ${todo.responsible}`)\n }\n\n div_1.appendChild(div_2)\n div_1.appendChild(div_3)\n link.appendChild(div_1)\n li.appendChild(link)\n this.taskListTarget.appendChild(li)\n })\n\n fetch(`/companies/${company}/${method}.html?page=${nextPage}${unitText}`,\n {\n headers: {\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'GET'\n })\n .then(response => response.text())\n .then(html => {\n const fragment = document\n .createRange()\n .createContextualFragment(html)\n this.pageDivTarget.innerHTML = ''\n this.pageDivTarget.appendChild(fragment)\n this.createDraggable()\n this.connect()\n })\n })\n }\n\n createDraggable() {\n new Draggable(this.taskListTarget, {\n itemSelector: '.notif-item',\n eventData: function (eventEl) {\n return {\n extendedProps: {\n status_color: eventEl.dataset.colorstatus,\n location: eventEl.dataset.location,\n logo_class: eventEl.dataset.logoclass,\n todoid: eventEl.dataset.todoid,\n task_type: eventEl.dataset.type,\n amenity: eventEl.dataset.amenity\n },\n title: eventEl.dataset.title\n }\n }\n })\n window.calendar.render()\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n static targets = [\n 'location',\n 'taskDiv',\n 'lateCounter',\n 'unassignedCounter',\n 'unassignedDiv',\n 'lateDiv'\n ]\n\n filter() {\n const filterLocation = this.locationTarget.value\n if (filterLocation) {\n Array.from(this.taskDivTarget.querySelectorAll('.agenda_task_list_item')).forEach((task) => {\n if (task.getAttribute('data-root') == filterLocation) {\n task.classList.remove('hidden')\n }\n else {\n task.classList.add('hidden') \n }\n })\n }\n else {\n Array.from(this.taskDivTarget.querySelectorAll('.agenda_task_list_item')).forEach((task) => {\n task.classList.remove('hidden')\n })\n }\n const lateCount = this.lateDivTarget.querySelectorAll('li:not(.hidden).agenda_task_list_item').length\n const unassignedCount = this.unassignedDivTarget.querySelectorAll('li:not(.hidden).agenda_task_list_item').length\n this.lateCounterTarget.innerText = lateCount\n this.unassignedCounterTarget.innerText = unassignedCount\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n\n static targets = [\n 'userids',\n 'employeeids',\n 'dates',\n 'addBtn'\n ]\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n assign(event) {\n var userids = Array.from(this.useridsTarget.options).map(option => option.value)\n var employeeids = Array.from(this.employeeidsTarget.options).map(option => option.value)\n var dates = this.datesTarget.value\n var todo_id = event.target.dataset.todo\n var addBtn = this.addBtnTarget\n var closeBtn = addBtn.closest('.modal').querySelector('.btn-close')\n fetch(`/add_days_to_todo.json?userids=${userids}&employeeids=${employeeids}&dates=${dates}&to_do_item_id=${todo_id}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(() => {\n \n if (closeBtn) {\n closeBtn.click()\n }\n if (window.calendar) {\n window.calendar.refetchEvents()\n }\n })\n }\n}","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n\n static targets = [\n 'userids',\n 'dates',\n 'addBtn'\n ]\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n assign(event) {\n var userids = Array.from(this.useridsTarget.options).map(option => option.value)\n var dates = this.datesTarget.value\n var todo_id = event.target.dataset.todo\n var addBtn = this.addBtnTarget\n var closeBtn = addBtn.closest('.modal').querySelector('.btn-close')\n \n fetch(`/add_days_to_todo_provider.json?userids=${userids}&dates=${dates}&to_do_item_id=${todo_id}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(() => {\n if (closeBtn) {\n closeBtn.click()\n }\n if (window.calendar) {\n window.calendar.refetchEvents()\n }\n })\n }\n}","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n\n static targets = [\n 'type',\n 'start',\n 'stop',\n 'saveBtn',\n 'deleteBtn'\n\n ]\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n get closeBtn() { return this.saveBtnTarget.closest('.modal').querySelector('.btn-close') }\n\n edit(event) {\n var offday_id = event.target.dataset.offday\n var start = this.startTarget.value\n var stop = this.stopTarget.value\n var type_id = this.typeTarget.value\n \n fetch(`/offdays/${offday_id}`, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify({ start: start, stop: stop, dayoff_type_id: type_id })\n\n })\n .then(response => response.json())\n .then(() => {\n if (this.closeBtn) {\n this.closeBtn.click()\n }\n if (window.calendar) {\n window.calendar.refetchEvents()\n }\n })\n }\n\n delete(event) {\n var offday_id = event.target.dataset.offday\n \n fetch(`/offdays/${offday_id}`, {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(() => {\n if (this.closeBtn) {\n this.closeBtn.click()\n }\n if (window.calendar) {\n window.calendar.refetchEvents()\n }\n })\n }\n}","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n\n static targets = [\n 'dates',\n 'type',\n 'addBtn'\n ]\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n add(event) {\n var user_id = event.target.dataset.user\n var dates = this.datesTarget.value\n var type_id = this.typeTarget.value\n var addBtn = this.addBtnTarget\n var closeBtn = addBtn.closest('.modal').querySelector('.btn-close')\n fetch(`/offdays.json?user_id=${user_id}&dates=${dates}&dayoff_type_id=${type_id}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(() => {\n if (closeBtn) {\n closeBtn.click()\n }\n if (window.calendar) {\n window.calendar.refetchEvents()\n }\n })\n }\n}","import { Controller } from '@hotwired/stimulus'\n// import { FullCalender } from '@fullcalendar/core';\nimport { Draggable } from '@fullcalendar/interaction'\n// import * as $ from 'jquery/dist/jquery'\nexport default class extends Controller {\n\n static targets = [\n 'taskList',\n 'pageDiv',\n 'newReports',\n 'location',\n 'responsible',\n 'expertise',\n 'performer'\n ]\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n connect() {\n this.calendarEl = window.calendar\n this.Draggable = FullCalendar.Draggable\n new Draggable(this.newReportsTarget, {\n itemSelector: '.notif-item',\n eventData: function (eventEl) {\n return {\n extendedProps: {\n status_color: eventEl.dataset.colorstatus,\n location: eventEl.dataset.location,\n logo_class: eventEl.dataset.logoclass,\n elemid: eventEl.dataset.elemid,\n to_do_id: eventEl.dataset.todoid,\n task_type: eventEl.dataset.type,\n amenity: eventEl.dataset.amenity,\n task_number: eventEl.dataset.tasknumber,\n unitId: eventEl.dataset.unitid,\n userId: eventEl.dataset.userid\n },\n title: eventEl.dataset.title\n }\n }\n })\n const nav = this.pageDivTarget.querySelector('nav')\n if (nav) {\n var ul = document.createElement('ul')\n ul.classList.add('pagination')\n nav.appendChild(ul)\n\n this.pageDivTarget.querySelectorAll('span').forEach((span) => {\n var li = document.createElement('li')\n li.innerHTML = span.innerHTML\n ul.appendChild(li)\n if (li.querySelector('a')) {\n var link = li.querySelector('a')\n var nextPage = link.getAttribute('href').split('page=')[1]\n link.setAttribute('data-page', nextPage)\n link.removeAttribute('href')\n link.classList.add('page-link')\n link.setAttribute('data-action', 'click->fullcalendar--paginate-to-dispatch#goToPage')\n switch (link.innerText) {\n case 'first':\n link.innerHTML = ``\n break\n case 'prev':\n link.innerHTML = ``\n break\n case 'next':\n link.innerHTML = ``\n break\n case 'last':\n link.innerHTML = ``\n break\n default:\n break\n }\n }\n else {\n var link_2 = document.createElement('a')\n link_2.classList.add('page-link')\n link_2.innerHTML = li.innerHTML\n link_2.removeAttribute('href')\n li.innerHTML = ''\n li.appendChild(link_2)\n }\n li.classList.add('page-item')\n if (span.classList.contains('current')) {\n li.classList.add('active')\n }\n span.remove()\n })\n }\n }\n\n goToPage(event) {\n const nextPage = event.target.getAttribute('data-page')\n const company = this.taskListTarget.dataset.company\n const method = this.taskListTarget.dataset.list\n const unit_id = this.locationTarget.value\n const responsible_id = this.responsibleTarget.value\n const expertise_id = this.expertiseTarget.value\n const performer_id = this.performerTarget.value\n var unitText = ''\n var responsibleText = ''\n var expertiseText = ''\n var performerText = ''\n if (unit_id) {\n unitText = `&unit_id=${unit_id}`\n }\n if (responsible_id) {\n responsibleText = `&responsible_id=${responsible_id}`\n }\n if (expertise_id) {\n expertiseText = `&expertise_id=${expertise_id}`\n }\n if (performer_id) {\n performerText = `&performer_id=${performer_id}`\n }\n fetch(`/companies/${company}/${method}.json?page=${nextPage}${unitText}${responsibleText}${expertiseText}${performerText}`,\n {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'GET'\n }\n ).then(response => response.json())\n .then(data => {\n this.taskListTarget.innerHTML = ''\n data.forEach(todo => {\n var li = document.createElement('li')\n li.classList.add('list-group-item')\n li.classList.add('list-group-item-action')\n li.classList.add('notif-item')\n li.classList.add('agenda_task_list_item')\n li.dataset.type = todo.type\n li.dataset.todoid = todo.id\n li.dataset.elemid = todo.elemid\n li.dataset.location = todo.location\n li.dataset.expertise = todo.expertise_id\n li.dataset.responsible = todo.responsible_id\n li.dataset.logoclass = todo.logo_class\n li.dataset.colorstatus = todo.status_color\n li.dataset.title = todo.title\n li.dataset.amenity = todo.amenity\n li.dataset.root = todo.root_unit_id\n li.dataset.created_since = todo.created_since\n var link = document.createElement('a')\n if (todo.type == 'to_do_item') {\n link.setAttribute('href', `/openModal?div=view-task-content&modal=to_do_items%2Fedit_in_calendar&modal_id=view-task-btn&task_type=ToDoItem&to_do_item=${todo.id}`)\n }\n else if (todo.type == 'report') {\n link.setAttribute('href', `/openModal?div=view-report-content&modal=reports%2Fpartials%2Freport_modal_on_side_calendar&modal_id=view-report-btn&info=show_see_btn&report=${todo.id}`)\n }\n link.setAttribute('data-remote', 'true')\n var div_1 = document.createElement('div')\n div_1.classList.add('card_content')\n var div_2 = document.createElement('div')\n div_2.classList.add('card_title')\n div_2.innerHTML = ` ${todo.title}`\n var div_3 = document.createElement('div')\n div_3.classList.add('card_address', 'simple_text')\n if (todo.report_priority_name) {\n div_3.insertAdjacentHTML('beforeend', ` ${todo.report_priority_name} | `)\n }\n if (todo.responsible) {\n div_3.insertAdjacentHTML('beforeend', ` ${todo.responsible}`)\n }\n div_3.insertAdjacentHTML('beforeend', ` ${todo.display_todo_date}
    \n ${todo.location}\n | ${todo.amenity}
    `)\n div_3.insertAdjacentHTML('beforeend', ` ${todo.created_since}`)\n\n div_1.appendChild(div_2)\n div_1.appendChild(div_3)\n link.appendChild(div_1)\n li.appendChild(link)\n this.taskListTarget.appendChild(li)\n })\n\n fetch(`/companies/${company}/${method}.html?page=${nextPage}${unitText}${responsibleText}${expertiseText}`,\n {\n headers: {\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'GET'\n })\n .then(response => response.text())\n .then(html => {\n const fragment = document\n .createRange()\n .createContextualFragment(html)\n this.pageDivTarget.innerHTML = ''\n this.pageDivTarget.appendChild(fragment)\n this.createDraggable()\n this.connect()\n })\n })\n }\n\n createDraggable() {\n var check = new Draggable(this.taskListTarget, {\n itemSelector: '.notif-item',\n eventData: function (eventEl) {\n return {\n extendedProps: {\n status_color: eventEl.getAttribute('data-colorstatus'),\n location: eventEl.getAttribute('data-location'),\n logo_class: eventEl.getAttribute('data-logoclass'),\n todoid: eventEl.getAttribute('data-todoid'),\n task_type: eventEl.getAttribute('data-type'),\n amenity: eventEl.getAttribute('data-amenity')\n },\n title: eventEl.getAttribute('data-title')\n }\n }\n })\n window.calendar.render()\n }\n\n}\n","import Choices from 'choices.js'\nimport { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n static targets = [\n 'addBtn',\n 'btnProviders',\n 'btnTechnicians',\n 'date',\n 'notify',\n 'providerid',\n 'providers',\n 'providerUsers',\n 'technicians',\n 'userid'\n ]\n\n showTechnicians() {\n this.techniciansTarget.classList.remove('hidden')\n this.providersTarget.classList.add('hidden')\n\n this.useridTarget.dataset.usethis = true\n this.provideridTarget.dataset.usethis = false\n\n this.btnTechniciansTarget.classList.remove('btn-outline-primary')\n this.btnTechniciansTarget.classList.add('btn-primary')\n this.btnProvidersTarget.classList.remove('btn-primary')\n this.btnProvidersTarget.classList.add('btn-outline-primary')\n\n this.useridTarget.required = true\n this.provideridTarget.required = false\n }\n\n showProviders() {\n this.providersTarget.classList.remove('hidden')\n this.techniciansTarget.classList.add('hidden')\n\n this.provideridTarget.dataset.usethis = true\n this.useridTarget.dataset.usethis = false\n\n this.btnProvidersTarget.classList.remove('btn-outline-primary')\n this.btnProvidersTarget.classList.add('btn-primary')\n this.btnTechniciansTarget.classList.remove('btn-primary')\n this.btnTechniciansTarget.classList.add('btn-outline-primary')\n\n this.useridTarget.required = false\n this.provideridTarget.required = true\n }\n\n // Create & populate the provider user selector\n showProviderUsers() {\n const providerid = this.provideridTarget.value\n\n fetch(`/service_providers/search_users.json?provider=${providerid}`)\n .then(response => response.json())\n .then(data => {\n const selectChoices = []\n data.response.results.forEach((result) => {\n selectChoices.push({\n value: result.id,\n label: result.name\n })\n })\n\n this.providerUsersTarget.innerHTML = ''\n this.buildUserSelector()\n\n const selector = document.getElementById('providerUserSelector')\n const providerUserSelector = new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n selector.addEventListener('change', (e) => this.setProviderUserId(e))\n\n providerUserSelector.setChoices(\n selectChoices,\n 'value',\n 'label',\n false\n )\n })\n }\n\n // Handle form submission\n assign(event) {\n let assignation = null\n let userid = null\n\n if (this.useridTarget && this.useridTarget.dataset.usethis == 'true') {\n assignation = 'internal'\n userid = this.useridTarget.value\n }\n\n if (this.provideridTarget && this.provideridTarget.dataset.usethis == 'true') {\n assignation = 'external'\n userid = null\n }\n\n const addBtn = this.addBtnTarget\n const closeBtn = addBtn.closest('.modal').querySelector('.btn-close')\n const date = this.dateTarget.value\n const maintenance_id = event.target.dataset.maintenance\n const notify = this.notifyTarget.value\n const original_date = event.target.dataset.date\n const task_id = event.target.dataset.taskId\n\n fetch('/maintenances.json', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify({\n // data: {\n auto_assign: false,\n date: date,\n maintenance_id: maintenance_id,\n notify: notify,\n original_date: original_date,\n user: userid,\n [`task-${task_id}`]: userid ? userid : this.providerUserId,\n [`assignation-${task_id}`]: assignation\n // }\n })\n })\n .then(response => response.json())\n .then(() => {\n if (closeBtn) {\n closeBtn.click()\n }\n if (window.calendar) {\n window.calendar.refetchEvents()\n }\n })\n }\n\n // Build HTML base for the provider user selector\n buildUserSelector() {\n this.providerUsersTarget.innerHTML = `\n
    \n \n \n
    \n `\n }\n\n // Save the provider user ID\n setProviderUserId(event) {\n this.providerUserId = event.currentTarget.value\n }\n\n set providerUserId(newId) { this._providerUserId = newId }\n get providerUserId() { return this._providerUserId }\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"sidebar\", \"button\", \"nav\", \"list\", \"calendar\"]\n\n connect() {\n this.buttonTarget.addEventListener('click', () => this.toggleSidebar())\n }\n\n toggleSidebar() {\n this.updateButtonContent()\n this.sidebarTarget.classList.toggle('col-3')\n this.sidebarTarget.classList.toggle('col-1')\n this.calendarTarget.classList.toggle('col-sm-9')\n this.calendarTarget.classList.toggle('col-sm-11')\n this.navTarget.classList.toggle('hidden')\n this.listTarget.classList.toggle('hidden')\n this.sidebarTarget.dataset.expanded = this.sidebarTarget.dataset.expanded === \"0\"\n ? \"1\"\n : \"0\"\n }\n\n updateButtonContent() {\n this.buttonTarget.innerHTML = this.sidebarTarget.dataset.expanded === \"0\"\n ? `${window.i18n.t('actions.hide')}`\n : `${window.i18n.t('actions.show')}`\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n \n\n connect() {\n document.getElementById('drop-task').querySelectorAll('button.btn-close').forEach((elem) => {\n elem.onclick = function() {\n window.calendar.refetchEvents()\n window.calendar.render()\n // location.reload()\n }\n })\n }\n\n cancel(event) {\n document.getElementById('drop-task').querySelectorAll('button.btn-close').forEach((elem) => {\n elem.click()\n })\n window.calendar.getEventById(event.target.dataset.eventid).remove()\n }\n\n submit() {\n if (document.querySelector('.mandatory_expected_date')) {\n if (document.querySelector('.mandatory_expected_date').value != '') {\n document.getElementById('drop-task').querySelectorAll('button.btn-close').forEach((elem) => {\n elem.click()\n })\n }\n }\n else {\n document.getElementById('drop-task').querySelectorAll('button.btn-close').forEach((elem) => {\n elem.click()\n })\n }\n }\n} ","import { Controller } from \"@hotwired/stimulus\"\n// import { i18n } from '../../components/config/i18n.js'\nimport XLSX from 'xlsx'\nexport default class extends Controller {\n\tstatic targets = [\"file_input\", \"importBtn\", \"table\", \"tableHeader\", \"tableData\", \"progress\", \"progressWrapper\", \"company\", \"importNumber\", \"deleteBtn\", 'job']\n\n get csrfToken() { return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\") }\n\n get jobName() { return this.jobTarget.getAttribute('data-job') }\n\n get jobFolder() { return this.jobTarget.getAttribute('data-folder') }\n\n get materialFields() {\n switch (this.jobName) {\n case 'ImportMaintenanceJob':\n this.delete_first = false\n return this.importMaintenanceJob\n default:\n return []\n }\n }\n\n get importMaintenanceJob() {\n return [\n {\"field_name\":'none', \"translation\":`${window.i18n.t('shared.ignore') }`, \"required\": false},\n {\"field_name\":'control_name', \"translation\":`control_name`, \"required\": true},\n {\"field_name\":'frequence', \"translation\":`frequence`, \"required\": true},\n {\"field_name\":'interval', \"translation\":`interval`, \"required\": true},\n {\"field_name\":'amenity_internal_identifier', \"translation\":`amenity_internal_identifier`, \"required\": true},\n {\"field_name\":'start_month', \"translation\":`start_month`, \"required\": true},\n {\"field_name\":'form_question', \"translation\":`form_question`, \"required\": true},\n ]\n }\n\n connect() {\n console.log(\"import_controller connected\")\n console.log(\"jobName\", this.jobName)\n console.log(\"materialFields\", this.materialFields)\n }\n\n get requiredFields() {\n return this.materialFields.filter((field) => !!field['required'])\n }\n\n async prepare_import(event) {\n this.tableDataTarget.innerHTML = '';\n this.tableHeaderTarget.innerHTML = '';\n await this.read_file(event)\n\n const selectTr = document.createElement('tr');\n const headerTr = document.createElement('tr');\n Object.keys(this.json[0]).forEach((key) => {\n const selectTh = document.createElement('th');\n const fieldSelector = document.createElement('select');\n fieldSelector.classList.add('field-selector');\n fieldSelector.id = `select-${key}`;\n this.materialFields.forEach((field) => {\n const opt = document.createElement('option')\n opt.value = field['field_name']\n opt.text = field['translation']\n fieldSelector.add(opt)\n selectTh.appendChild(fieldSelector)\n })\n\n selectTr.appendChild(selectTh);\n\n const th = document.createElement('th');\n th.innerHTML = key;\n headerTr.appendChild(th);\n })\n this.tableHeaderTarget.appendChild(selectTr);\n this.tableHeaderTarget.appendChild(headerTr);\n this.json.slice(0, 10).forEach((row) => {\n const tr = document.createElement('tr');\n Object.keys(this.json[0]).forEach((key) => {\n const td = document.createElement('td');\n\n td.innerHTML = row[key];\n tr.appendChild(td);\n })\n this.tableDataTarget.appendChild(tr);\n }\n )\n }\n\n async read_file(event) {\n const file = event.target.files[0];\n const data = await file.arrayBuffer();\n const workbook = XLSX.read(data);\n const sheet = workbook.Sheets[workbook.SheetNames[0]];\n this.json = XLSX.utils.sheet_to_json(sheet);\n }\n\n import () {\n const ok_for_import = this.checkForRequiredFields()\n if (ok_for_import) {\n this.importData()\n }\n else {\n alert('Please select a field for each requiered column');\n }\n }\n\n checkForRequiredFields () {\n const selectFields = this.element.querySelectorAll('select')\n const fields = []\n selectFields.forEach((field) => {\n fields.push(field.value)\n })\n const requiredFieldList = this.requiredFields.map((field) => field['field_name'])\n requiredFieldList.forEach ((field) => {\n if (!fields.includes(field)) {\n return false;\n }\n })\n return true;\n }\n\n importData () {\n const selectFields = this.element.querySelectorAll('.field-selector')\n const fieldsMatching = []\n this.importBtnTarget.classList.add(\"hidden\");\n selectFields.forEach((field) => {\n fieldsMatching.push({\"table_field\": field.value, \"file_field\": field.id.replace('select-','')})\n })\n const data = this.json\n console.log(\"fields_matching :\",fieldsMatching)\n fetch ('/admin_import.json', {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({job_folder: this.jobFolder, import_job: this.jobName, fields_matching: fieldsMatching, data: data, company_id: this.companyTarget.value, delete_first_line: this.delete_first})\n })\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id;\n const jobProviderId = data.job.job_provider_id;\n this.progressTarget.classList.remove(\"hidden\");\n this.progressTarget.textContent = `${window.i18n.t('shared.processing')}`;\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000);\n });\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/import_status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n const percentage = data.percentage;\n const importNumberValue = data.import_number;\n this.progressTarget.textContent = `${window.i18n.t('shared.processing')} ${percentage}%`;\n if(data.status == \"error\") {\n this.stopCheckJobStatus();\n }else if(data.status === \"complete\") {\n this.stopCheckJobStatus()\n this.progressTarget.textContent = `${window.i18n.t('shared.import_number')} ${importNumberValue} - ${window.i18n.t('shared.processing_completed')}`;\n this.deleteBtnTarget.classList.remove(\"hidden\");\n this.deleteBtnTarget.href = `/imports/${importNumberValue}`\n }\n })\n }\n\n stopCheckJobStatus() {\n if(this.timer) {\n clearInterval(this.timer);\n }\n }\n\n disconnect() {\n this.stopCheckJobStatus();\n }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { i18n } from '../../src/config/i18n.js'\nimport XLSX from 'xlsx'\nexport default class extends Controller {\n\tstatic targets = [\"file_input\", \"importBtn\", \"table\", \"tableHeader\", \"tableData\", \"progress\", \"progressWrapper\", \"company\", \"importNumber\", \"deleteBtn\", 'job', 'parentData']\n\n get csrfToken() { return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\") }\n\n get jobName() { return this.jobTarget.getAttribute('data-job') }\n\n get jobFolder() { return this.jobTarget.getAttribute('data-folder') }\n\n get parentDataType() { \n if (this.hasParentDataTarget) {\n return this.parentDataTarget.getAttribute('data-type')\n }\n else {\n return null\n }\n }\n \n\n get materialFields() {\n switch (this.jobName) {\n case 'ImportServiceProvidersJob':\n this.delete_first = true\n return this.importServiceProvidersJob\n case 'ImportServiceProviderContactsJob':\n this.delete_first = false\n return this.importServiceProviderContactsJob\n case 'ImportMaterialsJob':\n this.delete_first = true\n return this.importMaterialsJob\n case 'ImportMaterialLocationsJob':\n this.delete_first = false\n return this.importMaterialLocationsJob\n case 'ImportMaterialQuantitiesJob':\n this.delete_first = false\n return this.importMaterialQuantitiesJob\n case 'ImportMaterialSupplierPricesAndSuppliersJob':\n this.delete_first = false\n return this.importMaterialSupplierPricesAndSuppliersJob\n case 'UpdateAmenityParentsJob':\n this.delete_first = true\n return this.updateAmenityParentsJob\n case 'ImportMaterialOrdersJob':\n this.delete_first = false\n return this.importMaterialOrdersJob\n case 'ImportMaterialOrderLinesJob':\n this.delete_first = false\n return this.importMaterialOrderLinesJob\n case 'ImportUnitsJob':\n this.delete_first = true\n return this.importUnitsJob\n case 'ImportMaterialToAmenitiesJob':\n this.delete_first = false\n return this.importMaterialToAmenitiesJob\n \n \n case 'ImportGammeJob':\n this.delete_first = false\n return this.importGammeJob\n case 'ImportCheckListJob':\n this.delete_first = false\n return this.importCheckListJob\n case 'ImportPreventifJob':\n this.delete_first = false\n return this.importPreventifJob\n\n default:\n return []\n }\n }\n\n get importServiceProvidersJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'provider_name', 'translation': 'provider_name', 'required': true},\n {'field_name': 'address_1', 'translation': 'address_1', 'required': false},\n {'field_name': 'address_2', 'translation': 'address_2', 'required': false},\n {'field_name': 'zip_code', 'translation': 'zip_code', 'required': false},\n {'field_name': 'city', 'translation': 'city', 'required': false},\n {'field_name': 'county', 'translation': 'county', 'required': false},\n {'field_name': 'phone', 'translation': 'phone', 'required': false},\n {'field_name': 'mobile', 'translation': 'mobile', 'required': false},\n {'field_name': 'email', 'translation': 'email', 'required': false},\n {'field_name': 'fax', 'translation': 'fax', 'required': false},\n {'field_name': 'vat_number', 'translation': 'vat_number', 'required': false},\n {'field_name': 'comment', 'translation': 'comment', 'required': false},\n {'field_name': 'terms_and_conditions', 'translation': 'terms_and_conditions', 'required': false},\n {'field_name': 'internal_identifier', 'translation': 'internal_identifier', 'required': false},\n {'field_name': 'code', 'translation': 'code', 'required': false},\n {'field_name': 'currency', 'translation': 'currency', 'required': false},\n {'field_name': 'preferred_locale', 'translation': 'preferred_locale', 'required': false},\n ]\n }\n\n get importMaterialLocationsJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'name', 'translation': 'name', 'required': true},\n {'field_name': 'internal_identifier', 'translation': 'internal_identifier', 'required': false}\n ]\n }\n\n get importMaterialsJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'name', 'translation': 'name', 'required': true},\n {'field_name': 'internal_ref', 'translation': 'internal_ref', 'required': false},\n {'field_name': 'internal_identifier', 'translation': 'internal_identifier', 'required': false},\n {'field_name': 'description_1', 'translation': 'description_1', 'required': false},\n {'field_name': 'unit_price', 'translation': 'unit_price', 'required': false},\n {'field_name': 'description_2', 'translation': 'description_2', 'required': false},\n {'field_name': 'loc_1', 'translation': 'loc_1', 'required': false},\n {'field_name': 'loc_2', 'translation': 'loc_2', 'required': false},\n {'field_name': 'material_category', 'translation': 'material_category', 'required': false},\n {'field_name': 'material_category_internal_identifier', 'translation': 'material_category_internal_identifier', 'required': false},\n {'field_name': 'packaging', 'translation': 'packaging', 'required': false},\n {'field_name': 'brand', 'translation': 'brand', 'required': false},\n {'field_name': 'bar_code', 'translation': 'bar_code', 'required': false},\n {'field_name': 'maker_reference', 'translation': 'maker_reference', 'required': false},\n {'field_name': 'supplier', 'translation': 'supplier', 'required': false},\n {'field_name': 'supplier_ref', 'translation': 'supplier_ref', 'required': false},\n {'field_name': 'low_lvl_alarm', 'translation': 'low_lvl_alarm', 'required': false},\n ]\n }\n\n get importMaterialQuantitiesJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'internal_ref', 'translation': 'internal_ref', 'required': true},\n {'field_name': 'material_location', 'translation': 'material_location', 'required': true},\n {'field_name': 'material_location_internal_identifier', 'translation': 'material_location_internal_identifier', 'required': true},\n {'field_name': 'quantity', 'translation': 'quantity', 'required': true},\n {'field_name': 'low_lvl_alarm', 'translation': 'low_lvl_alarm', 'required': false},\n ]\n }\n\n get importMaterialSupplierPricesAndSuppliersJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'material_internal_ref', 'translation': 'material_internal_ref', 'required': true},\n {'field_name': 'supplier_internal_ref', 'translation': 'supplier_internal_ref', 'required': true},\n {'field_name': 'supplier_price', 'translation': 'supplier_price', 'required': true},\n {'field_name': 'supplier_price_currency', 'translation': 'supplier_price_currency', 'required': false},\n {'field_name': 'supplier_material_ref', 'translation': 'supplier_material_ref', 'required': false},\n {'field_name': 'last_date', 'translation': 'last_date', 'required': false},\n {'field_name': 'description', 'translation': 'description', 'required': false}\n ]\n }\n\n get updateAmenityParentsJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'amenity_ref', 'translation': 'amenity_ref', 'required': true},\n {'field_name': 'parent_ref', 'translation': 'parent_ref', 'required': false},\n {'field_name': 'provider_ref', 'translation': 'provider_ref', 'required': false},\n {'field_name': 'brand_ref', 'translation': 'brand_ref', 'required': false},\n ]\n }\n\n get importMaterialOrdersJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'internal_identifier', 'translation': 'internal_identifier', 'required': false},\n {'field_name': 'number', 'translation': 'number', 'required': false},\n {'field_name': 'supplier_ref', 'translation': 'supplier_ref', 'required': true},\n {'field_name': 'delivery_date', 'translation': 'delivery_date', 'required': false},\n {'field_name': 'description', 'translation': 'description', 'required': false},\n {'field_name': 'archived', 'translation': 'archived', 'required': false},\n ]\n }\n\n get importMaterialOrderLinesJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'order_ref', 'translation': 'order_ref', 'required': false},\n {'field_name': 'material_internal_id', 'translation': 'material_internal_id', 'required': false},\n {'field_name': 'quantity_ordered', 'translation': 'quantity_ordered', 'required': true},\n {'field_name': 'unit_price', 'translation': 'unit_price', 'required': false},\n {'field_name': 'exchange_rate', 'translation': 'exchange_rate', 'required': false},\n {'field_name': 'remarks', 'translation': 'remarks', 'required': false},\n {'field_name': 'material_description', 'translation': 'material_description', 'required': false},\n ]\n }\n\n get importUnitsJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'name', 'translation': 'name', 'required': true},\n {'field_name': 'alt_name', 'translation': 'alt_name', 'required': false},\n {'field_name': 'description', 'translation': 'description', 'required': false},\n {'field_name': 'internal_identifier', 'translation': 'internal_identifier', 'required': false},\n {'field_name': 'transport_cents', 'translation': 'transport_cents', 'required': false},\n {'field_name': 'parent_ref', 'translation': 'parent_ref', 'required': false},\n ]\n }\n \n get importMaterialToAmenitiesJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'amenity_internal_identifier', 'translation': 'amenity_internal_identifier', 'required': false},\n {'field_name': 'material_internal_ref', 'translation': 'material_internal_ref', 'required': false}\n ]\n }\n\n get importGammeJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'gamme', 'translation': 'gamme', 'required': true},\n {'field_name': 'libelle', 'translation': 'libelle', 'required': true},\n {'field_name': 'consigne', 'translation': 'consigne', 'required': true},\n {'field_name': 'description', 'translation': 'description', 'required': true},\n {'field_name': 'duree', 'translation': 'duree', 'required': true},\n {'field_name': 'frequence', 'translation': 'frequence', 'required': true},\n {'field_name': 'interval', 'translation': 'interval', 'required': true},\n {'field_name': 'fixed_date', 'translation': 'fixed_date', 'required': true},\n {'field_name': 'suspended', 'translation': 'suspended', 'required': true},\n {'field_name': 'linked', 'translation': 'linked', 'required': true}\n ]\n }\n \n get importCheckListJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'gamme', 'translation': 'gamme', 'required': true},\n {'field_name': 'question', 'translation': 'question', 'required': true},\n {'field_name': 'order', 'translation': 'order', 'required': true}\n ]\n }\n \n get importPreventifJob() {\n return [\n {'field_name': 'none', 'translation': 'ignorer', 'required': false},\n {'field_name': 'frequence', 'translation': 'frequence', 'required': true},\n {'field_name': 'gamme', 'translation': 'gamme', 'required': true},\n {'field_name': 'asset', 'translation': 'asset', 'required': true},\n {'field_name': 'DteDernier', 'translation': 'DteDernier', 'required': true},\t\n {'field_name': 'DteProchain', 'translation': 'DteProchain', 'required': true},\t\n {'field_name': 'CmptDernier', 'translation': 'CmptDernier', 'required': true},\t\n {'field_name': 'CmptProchain', 'translation': 'CmptProchain', 'required': true},\t\n {'field_name': 'Nombre', 'translation': 'Nombre', 'required': true},\t\n {'field_name': 'linked', 'translation': 'linked', 'required': true},\t\n {'field_name': 'Suspendu', 'translation': 'Suspendu', 'required': true}\n ]\n }\n\n\n\n\n connect() {\n console.log(\"import_controller connected\")\n console.log(\"jobName\", this.jobName)\n console.log(\"materialFields\", this.materialFields)\n }\n\n get requiredFields() {\n return this.materialFields.filter((field) => !!field['required'])\n }\n\n async prepare_import(event) {\n this.tableDataTarget.innerHTML = '';\n this.tableHeaderTarget.innerHTML = '';\n await this.read_file(event)\n\n const selectTr = document.createElement('tr');\n const headerTr = document.createElement('tr');\n Object.keys(this.json[0]).forEach((key) => {\n const selectTh = document.createElement('th');\n const fieldSelector = document.createElement('select');\n fieldSelector.classList.add('field-selector');\n fieldSelector.id = `select-${key}`;\n this.materialFields.forEach((field) => {\n const opt = document.createElement('option')\n opt.value = field['field_name']\n opt.text = field['translation']\n fieldSelector.add(opt)\n selectTh.appendChild(fieldSelector)\n })\n\n selectTr.appendChild(selectTh);\n\n const th = document.createElement('th');\n th.innerHTML = key;\n headerTr.appendChild(th);\n })\n this.tableHeaderTarget.appendChild(selectTr);\n this.tableHeaderTarget.appendChild(headerTr);\n this.json.slice(0, 10).forEach((row) => {\n const tr = document.createElement('tr');\n Object.keys(this.json[0]).forEach((key) => {\n const td = document.createElement('td');\n\n td.innerHTML = row[key];\n tr.appendChild(td);\n })\n this.tableDataTarget.appendChild(tr);\n }\n )\n }\n\n async read_file(event) {\n const file = event.target.files[0];\n const data = await file.arrayBuffer();\n const workbook = XLSX.read(data);\n const sheet = workbook.Sheets[workbook.SheetNames[0]];\n this.json = XLSX.utils.sheet_to_json(sheet);\n }\n\n import () {\n const ok_for_import = this.checkForRequiredFields()\n if (ok_for_import) {\n this.importData()\n }\n else {\n alert('Please select a field for each requiered column');\n }\n }\n\n checkForRequiredFields () {\n const selectFields = this.element.querySelectorAll('select')\n const fields = []\n selectFields.forEach((field) => {\n fields.push(field.value)\n })\n const requiredFieldList = this.requiredFields.map((field) => field['field_name'])\n requiredFieldList.forEach ((field) => {\n if (!fields.includes(field)) {\n return false;\n }\n })\n return true;\n }\n\n importData () {\n const selectFields = this.element.querySelectorAll('.field-selector')\n const fieldsMatching = []\n this.importBtnTarget.classList.add(\"hidden\");\n selectFields.forEach((field) => {\n fieldsMatching.push({\"table_field\": field.value, \"file_field\": field.id.replace('select-','')})\n })\n const data = this.json\n console.log(\"fields_matching :\",fieldsMatching)\n fetch ('/admin_import.json', {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({job_folder: this.jobFolder, import_job: this.jobName, fields_matching: fieldsMatching, data: data, company_id: this.companyTarget.value, delete_first_line: this.delete_first, parent_data_type: this.parentDataType})\n })\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id;\n const jobProviderId = data.job.job_provider_id;\n this.progressTarget.classList.remove(\"hidden\");\n this.progressTarget.textContent = `${i18n.t('shared.processing')}`;\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000);\n });\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/import_status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n const percentage = data.percentage;\n const importNumberValue = data.import_number;\n this.progressTarget.textContent = `${i18n.t('shared.processing')} ${percentage}%`;\n if(data.status == \"error\") {\n this.stopCheckJobStatus();\n }else if(data.status === \"complete\") {\n this.stopCheckJobStatus()\n this.progressTarget.textContent = `${i18n.t('shared.import_number')} ${importNumberValue} - ${i18n.t('shared.processing_completed')}`;\n this.deleteBtnTarget.classList.remove(\"hidden\");\n this.deleteBtnTarget.href = `/imports/${importNumberValue}`\n }\n })\n }\n\n stopCheckJobStatus() {\n if(this.timer) {\n clearInterval(this.timer);\n }\n }\n\n disconnect() {\n this.stopCheckJobStatus();\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nimport XLSX from 'xlsx'\n\nexport default class extends Controller {\n static targets = ['file_input', 'importBtn', 'table', 'tableHeader', 'tableData', 'progress', 'progressWrapper', 'company', 'importNumber', 'deleteBtn', 'job']\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n get jobName() { return this.jobTarget.getAttribute('data-job') }\n\n get jobFolder() { return this.jobTarget.getAttribute('data-folder') }\n\n connect() {\n console.log('import_controller connected')\n console.log('jobName', this.jobName)\n }\n\n async prepare_import(event) {\n this.tableDataTarget.innerHTML = ''\n this.tableHeaderTarget.innerHTML = ''\n await this.read_file(event)\n }\n\n async read_file(event) {\n const file = event.target.files[0]\n const data = await file.arrayBuffer()\n const workbook = XLSX.read(data)\n const sheet = workbook.Sheets[workbook.SheetNames[0]]\n this.json = XLSX.utils.sheet_to_json(sheet)\n\n }\n\n import() {\n const data = this.json\n fetch('/admin_import.json', {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n job_folder: this.jobFolder,\n import_job: this.jobName,\n data: data,\n company_id: this.companyTarget.value,\n })\n })\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id\n const jobProviderId = data.job.job_provider_id\n this.progressTarget.classList.remove('hidden')\n this.progressTarget.textContent = `${window.i18n.t('shared.processing')}`\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000)\n })\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/import_status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n const percentage = data.percentage\n const importNumberValue = data.import_number\n this.progressTarget.textContent = `${window.i18n.t('shared.processing')} ${percentage}%`\n if (data.status == 'error') {\n this.stopCheckJobStatus()\n } else if (data.status === 'complete') {\n this.stopCheckJobStatus()\n this.progressTarget.textContent = `${window.i18n.t('shared.import_number')} ${importNumberValue} - ${window.i18n.t('shared.processing_completed')}`\n this.deleteBtnTarget.classList.remove('hidden')\n this.deleteBtnTarget.href = `/imports/${importNumberValue}`\n }\n })\n }\n\n stopCheckJobStatus() {\n if (this.timer) {\n clearInterval(this.timer)\n }\n }\n\n disconnect() {\n this.stopCheckJobStatus()\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['defaultColumn']\n\n selectDefaultContact(e) {\n const contactId = e.currentTarget.closest('td').dataset.invoiceContactId\n const companyId = this.element.dataset.companyId\n\n fetch(`/companies/${companyId}`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'PATCH',\n body: JSON.stringify({ company: { default_invoice_contact_id: contactId } })\n })\n .then(response => response.json())\n .then(data => {\n if (data.errors) { return alert(data.errors) }\n\n this.element.querySelectorAll('td.default-column').forEach((element) => {\n const elementId = element.dataset.invoiceContactId\n\n if (elementId === contactId) {\n element.innerHTML = ''\n } else {\n element.innerHTML = 'invoice-contacts--default-contact#selectDefaultContact\">'\n }\n })\n })\n }\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n}\n","import Choices from 'choices.js'\nimport { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n connect() {\n if (this.element.querySelector('.js-choice')) {\n this.element.querySelectorAll('.js-choice').forEach((selector) => {\n new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n })\n }\n\n if (this.element.querySelector('.js-choice-original-order')) {\n this.element.querySelectorAll('.js-choice-original-order').forEach((selector) => {\n new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n allowHTML: true,\n itemSelectText: ' ',\n shouldSort: false,\n searchResultLimit: 10\n })\n })\n }\n\n if (this.element.querySelector('.js-choice-text')) {\n this.element.querySelectorAll('.js-choice-text').forEach((input) => {\n new Choices(input, {\n maxItemCount: 1,\n duplicateItemsAllowed: false,\n allowHTML: true,\n addItemText: 'Press Enter to add'\n })\n })\n }\n\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n// import mobiscroll from '@mobiscroll/javascript'\nimport DateTime from 'datatables.net-datetime'\nimport moment from 'moment-timezone'\nimport { momentTimezone } from '@mobiscroll/javascript'\nexport default class extends Controller {\n static targets = ['input']\n\n connect() {\n var method = this.inputTarget.dataset.script\n switch (method) {\n case 'mobiscrollDate':\n this.mobiscrollDate(this.inputTarget)\n break\n case 'mobiscrollDateClick':\n this.mobiscrollDateClick(this.inputTarget)\n break\n case 'mobiscrollDateTime':\n this.mobiscrollDateTime(this.inputTarget)\n break\n case 'mobiscrollDateRange':\n this.mobiscrollDateRange(this.inputTarget)\n break\n case 'mobiscrollTimeRange':\n this.mobiscrollTimeRange(this.inputTarget)\n break\n case 'mobiscrollDateTimeFull':\n this.mobiscrollDateTimeFull(this.inputTarget)\n break\n case 'mobiscrollTimeRangeClick':\n this.mobiscrollTimeRangeClick(this.inputTarget)\n break\n case 'mobiscrollDateRangeClick':\n this.mobiscrollDateRangeClick(this.inputTarget)\n break\n default:\n }\n }\n\n show() {\n var method = this.inputTarget.dataset.script\n switch (method) {\n case 'mobiscrollDate':\n this.mobiscrollDate(this.inputTarget)\n break\n case 'mobiscrollDateClick':\n this.mobiscrollDateClick(this.inputTarget)\n break\n case 'mobiscrollDateTime':\n this.mobiscrollDateTime(this.inputTarget)\n break\n case 'mobiscrollDateRange':\n this.mobiscrollDateRange(this.inputTarget)\n break\n case 'mobiscrollTimeRange':\n this.mobiscrollTimeRange(this.inputTarget)\n break\n case 'mobiscrollDateTimeFull':\n this.mobiscrollDateTimeFull(this.inputTarget)\n break\n case 'mobiscrollTimeRangeClick':\n this.mobiscrollTimeRangeClick(this.inputTarget)\n break\n case 'mobiscrollDateRangeClick':\n this.mobiscrollDateRangeClick(this.inputTarget)\n break\n default:\n }\n }\n\n mobiscrollDate(elem) {\n var cal = mobiscroll.datepicker(elem, {\n locale: mobiscroll.locale[document.documentElement.lang],\n display: 'inline',\n touchUi: true,\n controls: ['calendar'],\n selectMultiple: false,\n dateFormat: 'DD/MM/YYYY',\n returnFormat: 'iso8601',\n firstDay: 1,\n defaultSelection: new Date(elem.dataset.start)\n })\n }\n\n mobiscrollDateTime(elem) {\n momentTimezone.moment = moment\n var cal = mobiscroll.datepicker(elem, {\n locale: mobiscroll.locale[document.documentElement.lang],\n display: 'inline',\n touchUi: true,\n controls: ['datetime'],\n stepMinute: 10,\n selectMultiple: false,\n dateFormat: 'DD/MM/YYYY',\n timeFormat: 'HH:mm',\n firstDay: 1,\n defaultSelection: new DateTime(elem.dataset.start),\n dataTimezone: 'utc',\n displayTimezone: 'local',\n timezonePlugin: momentTimezone\n })\n this.element.querySelector(`#${elem.id}-timeoffset`).value = cal.getVal().getTimezoneOffset()\n }\n\n mobiscrollDateRange(elem) {\n var cal = mobiscroll.datepicker(elem, {\n locale: mobiscroll.locale[document.documentElement.lang],\n display: 'inline',\n touchUi: true,\n controls: ['calendar'],\n select: 'range',\n dateFormat: 'DD/MM/YYYY',\n returnFormat: 'iso8601',\n firstDay: 1\n })\n cal.setVal([new Date(elem.dataset.start), new Date(elem.dataset.stop)])\n }\n\n mobiscrollTimeRange(elem) {\n var cal = mobiscroll.datepicker(elem, {\n locale: mobiscroll.locale[document.documentElement.lang],\n display: 'inline',\n touchUi: true,\n controls: ['calendar', 'time'],\n select: 'range',\n timeFormat: 'HH:mm',\n dateFormat: 'DD/MM/YYYY',\n returnFormat: 'iso8601',\n firstDay: 1\n })\n if (elem.dataset.start && elem.dataset.stop) {\n cal.setVal([new Date(elem.dataset.start), new Date(elem.dataset.stop)])\n }\n }\n\n mobiscrollTimeRangeClick(elem) {\n var cal = mobiscroll.datepicker(elem, {\n locale: mobiscroll.locale[document.documentElement.lang],\n touchUi: true,\n controls: ['calendar', 'time'],\n select: 'range',\n timeFormat: 'HH:mm',\n dateFormat: 'DD/MM/YYYY',\n returnFormat: 'iso8601',\n firstDay: 1,\n defaultSelection: [new Date(elem.dataset.defaultStart), new Date(elem.dataset.defaultStop)]\n })\n this.clear(cal)\n if (elem.dataset.start && elem.dataset.stop) {\n // expects ruby DateTime objects for start & stop\n cal.setVal([new Date(elem.dataset.start), new Date(elem.dataset.stop)])\n }\n if (elem.dataset.skipClear === 'true') { return }\n this.addClear()\n }\n\n mobiscrollDateRangeClick(elem) {\n var cal = mobiscroll.datepicker(elem, {\n locale: mobiscroll.locale[document.documentElement.lang],\n touchUi: true,\n controls: ['calendar'],\n select: 'range',\n dateFormat: 'DD/MM/YYYY',\n returnFormat: 'iso8601',\n firstDay: 1\n })\n if (elem.dataset.start && elem.dataset.stop) {\n cal.setVal([new Date(elem.dataset.start), new Date(elem.dataset.stop)])\n }\n if (elem.dataset.skipClear === 'true') { return }\n this.addClear()\n }\n\n mobiscrollDateClick(elem) {\n var cal = mobiscroll.datepicker(elem, {\n locale: mobiscroll.locale[document.documentElement.lang],\n touchUi: true,\n controls: ['calendar'],\n selectMultiple: false,\n dateFormat: 'DD/MM/YYYY',\n returnFormat: 'iso8601',\n firstDay: 1,\n defaultSelection: new Date(elem.dataset.start)\n })\n }\n\n mobiscrollDateTimeFull(elem) {\n momentTimezone.moment = moment\n var cal = mobiscroll.datepicker(elem, {\n locale: mobiscroll.locale[document.documentElement.lang],\n display: 'inline',\n touchUi: true,\n controls: ['datetime'],\n stepMinute: 1,\n selectMultiple: false,\n dateFormat: 'DD/MM/YYYY',\n timeFormat: 'HH:mm',\n firstDay: 1,\n defaultSelection: new DateTime(elem.dataset.start),\n dataTimezone: 'utc',\n displayTimezone: 'local',\n timezonePlugin: momentTimezone\n })\n this.element.querySelector(`#${elem.id}-timeoffset`).value = cal.getVal().getTimezoneOffset()\n }\n\n addClear() {\n this.inputTarget.insertAdjacentHTML('beforebegin', 'launch-mobiscroll#clear\" style=\\'margin-left: 5px; cursor: pointer;\\'>')\n }\n\n clear(event) {\n this.inputTarget.value = ''\n var event = new Event('change')\n this.inputTarget.dispatchEvent(event)\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = [\n 'emailStep',\n 'passwordStep',\n 'email',\n 'password',\n 'spinner',\n 'showEmail',\n 'error',\n 'accessLocked'\n ]\n\n timeout = null\n\n // Check login strategy for company of user\n verifyEmail() {\n if (!this.emailTarget.value) { return }\n if (!this.emailTarget.value.toLowerCase().match(/^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|.(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/)) {\n this.showError(true)\n this.showSpinner(false)\n return\n }\n\n\n if (this.timeout) {\n this.showSpinner(true)\n return\n }\n\n this.timeout = setTimeout(() => {\n this.showSpinner(false)\n this.timeout = null\n }, 1500)\n\n this.showSpinner(true)\n this.showError(false)\n\n fetch(`/users/check_email?email=${this.emailTarget.value}`)\n .then(response => response.json())\n .then(strategy => {\n if (strategy?.error) this.showError(true)\n else if (strategy?.access_locked) this.showAccessLocked(true)\n else if (strategy?.can_create_account) this.showAccountCreation(strategy)\n else this.showLoginStrategy(strategy)\n })\n }\n\n // Show email step (back from password)\n showEmail() {\n this.passwordStepTarget.hidden = true\n this.emailStepTarget.hidden = false\n this.showSpinner(false)\n }\n\n // Go to next step if hitting enter on email field\n checkIfEnter(event) {\n if (event.keyCode === 13 && this.passwordStepTarget.hidden) {\n event.preventDefault()\n this.verifyEmail()\n }\n }\n\n // Show error field\n showError(bool) {\n this.errorTarget.hidden = !bool\n this.showSpinner(false)\n }\n\n showAccessLocked(bool) {\n this.accessLockedTarget.hidden = !bool\n this.showSpinner(false)\n if (document.getElementById('default_alert')) {\n document.getElementById('default_alert').hidden = true\n }\n }\n\n showSpinner(bool) {\n this.spinnerTarget.hidden = !bool\n }\n\n showLoginStrategy(strategy) {\n switch (strategy.method) {\n case 'azure': window.location = `${window.location.toString()}?company=${strategy.subdomain}`; break\n case 'password': this.showPassword(); break\n default: this.showPassword()\n }\n }\n\n showPassword() {\n this.passwordStepTarget.hidden = false\n this.emailStepTarget.hidden = true\n this.showSpinner(false)\n this.passwordTarget.focus()\n }\n\n showAccountCreation(strategy) {\n window.location = `/users/sign_up?email=${this.emailTarget.value}&company_id=${strategy.company}&preferred_locale=${strategy.preferred_locale}`\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n static targets = [\"download\", \"progress\", \"progressWrapper\", \"status\", \"stopType\", \"unit\", \"amenity\", \"restartedAt\"];\n\n export() {\n const status = this.statusTarget.value;\n const stopTypeId = this.stopTypeTarget.value;\n const unitId = this.unitTarget.value;\n const amenityId = this.amenityTarget.value;\n const restartedAt = this.restartedAtTarget.value;\n fetch(`/machine_stops/export?status=${status || ''}&stop_type_id=${stopTypeId || ''}&unit_id=${unitId || ''}&amenity_id=${amenityId || ''}&restarted_at=${restartedAt || ''}`)\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id;\n const jobProviderId = data.job.job_provider_id;\n this.progressTarget.classList.remove(\"hidden\");\n this.progressTarget.textContent = `${i18n.t('shared.processing')}`;\n this.downloadTarget.classList.add(\"hidden\");\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000);\n });\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/export_status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n const percentage = data.percentage;\n this.progressTarget.textContent = `${i18n.t('shared.processing')} ${percentage}%`;\n if (data.status == \"error\") {\n this.stopCheckJobStatus();\n } else if (data.status === \"complete\") {\n this.stopCheckJobStatus()\n this.progressTarget.textContent = `${i18n.t('shared.processing_completed')}`;\n this.progressTarget.insertAdjacentHTML('afterend', `${i18n.t('shared.file_sent_to_your_email_address')}`);\n }\n })\n }\n\n stopCheckJobStatus() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n }\n\n disconnect() {\n this.stopCheckJobStatus();\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n\n static targets = ['id']\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n get mailParameterId() {\n return this.idTarget.dataset.id\n }\n\n toggle(event) {\n const button = event.target.nodeName == 'I' ? event.target.parentElement : event.target\n const parameter = button.dataset.parameter\n const value = button.dataset.value\n document.querySelectorAll(`[data-parameter=\"${parameter}\"]`).forEach((element) => {\n\n if (element.dataset.value == value) {\n element.classList.add('active')\n }\n else\n {\n element.classList.remove('active')\n }\n\n })\n\n fetch(`/mail_parameters/${this.mailParameterId}`, {\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': this.csrfToken },\n body: JSON.stringify({ mail_parameter: { [parameter]: value } })\n })\n\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['assetList', 'table']\n\n addUnits() {\n var list = Array.from(this.tableTarget.querySelectorAll('.unit_list_item')).map((element) => element.dataset.unit)\n this.assetListTarget.value = list\n }\n\n addAmenities() {\n var list = Array.from(this.tableTarget.querySelectorAll('.amenity_list_item')).map((element) => element.dataset.amenity)\n this.assetListTarget.value = list\n }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n\tstatic targets = [\"controlList\"]\n\n\n\tinitialize() {\n\t}\n\n\tget template_id() {\n\t\treturn this.controlListTarget.dataset.templateId\n\t}\n\n get csrfToken() { return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\") }\n\n show(event) {\n event.preventDefault()\n const control = event.currentTarget.dataset.control\n this.controlListTarget.querySelectorAll('tr').forEach((element) => {\n element.classList.remove('tr-active-blue')\n })\n event.currentTarget.parentElement.parentElement.classList.add('tr-active-blue')\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['modalLink', 'formMaintenanceIds', 'duration']\n\n updateMaintenances(e) {\n const ids = this.maintenanceIds.split(',')\n let newIds = []\n\n if (e.target.checked) {\n ids.push(e.target.value)\n newIds = ids.filter((n) => n)\n } else {\n newIds = ids.filter((id) => id !== e.target.value)\n }\n\n this.maintenanceIds = newIds.toString()\n this.modalLinkTarget.innerHTML = newIds.length > 0 ? this.linkToModal : ''\n }\n\n deleteMaintenance(e) {\n const maintenanceId = e.target.parentNode.dataset.id\n const ids = this.formMaintenanceIdsTarget.value.split(',')\n const newIds = ids.filter((id) => id !== maintenanceId)\n\n this.formMaintenanceIdsTarget.value = newIds\n e.target.parentNode.remove()\n }\n\n get linkToModal() {\n return `\n \n
    ${window.i18n.t('maintenance_control.actions.assign_to_one')}
    \n
    \n `\n }\n\n get maintenanceIds() { return this.modalLinkTarget.dataset.maintenanceIds }\n set maintenanceIds(newIds) { this.modalLinkTarget.setAttribute('data-maintenance-ids', newIds) }\n\n}\n","import Choices from 'choices.js'\nimport { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['container', 'input']\n\n connect() {\n const selector = this.element.querySelector('.js-choice-root-ancestry')\n new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n selector.addEventListener('change', (e) => this.updateFilters(e))\n this.nextLevel = 1\n }\n\n updateFilters(e) {\n const selectedinput = e.target.value\n const currentLevel = parseInt(e.target.closest('.ancestry-level').getAttribute('data-level'))\n\n this.deletePreviousSubLevel(currentLevel)\n this.nextLevel = currentLevel + 1\n this.input = selectedinput\n\n if (selectedinput !== '') {\n const choice = this.newChoiceInstance()\n this.populateFilterChoices(selectedinput, choice)\n this.nextLevel += 1\n }\n\n if (selectedinput === '' && currentLevel !== 0) {\n const parentLevel = document.getElementById(`level${currentLevel - 1}`)\n this.input = parentLevel.value\n }\n\n // Manually trigger 'change' event for calendar re-render\n var event = new Event('change')\n this.inputTarget.dispatchEvent(event)\n }\n\n deletePreviousSubLevel(currentLevel) {\n this.element.querySelectorAll('.ancestry-level').forEach(element => {\n if (parseInt(element.getAttribute('data-level')) > currentLevel) {\n element.remove()\n }\n })\n }\n\n newChoiceInstance() {\n const container = this.containerTarget.dataset.containerSize === 'small' ? 'js-choice-container' : 'js-choice-container-large'\n const newSelect = `\n
    \n \n \n
    \n `\n this.element.insertAdjacentHTML('beforeEnd', newSelect)\n\n const selector = this.element.querySelector(`#level${this.nextLevel}`)\n const choice = new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n selector.addEventListener('change', (e) => this.updateFilters(e))\n\n return choice\n }\n\n async populateFilterChoices(selectedinput, choice) {\n const subLevels = []\n const data = await this.fetchSubLevels(selectedinput)\n data.forEach((child) => {\n subLevels.push({\n value: child.id,\n label: child.full_name\n })\n })\n\n choice.setChoices(\n subLevels,\n 'value',\n 'label',\n false\n )\n }\n\n fetchSubLevels(selectedinput) {\n return fetch(`/material_locations/${selectedinput}/children.json`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => data)\n }\n\n\n get input() { return this.inputTarget.value }\n get nextLevel() { return this._nextLevel }\n\n set input(newId) { this.inputTarget.value = newId }\n set nextLevel(value) { this._nextLevel = value }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n\n static targets = [\"accessField\", \"usersField\"]\n\n connect() {\n if (this.accessFieldTarget.checked === true) {\n this.usersFieldTarget.classList.remove('hidden')\n }\n }\n\n toggleUsersField() {\n if (this.accessFieldTarget.checked === true) {\n this.usersFieldTarget.classList.remove('hidden')\n } else {\n this.usersFieldTarget.classList.add('hidden')\n }\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n\n static targets = [\n 'line'\n ]\n get csrfToken() { return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\") }\n\n unlinkUser(event) {\n var user_id = this.lineTarget.dataset.user;\n var material_location_id = this.lineTarget.dataset.location;\n fetch (`/material_locations/${material_location_id}/remove_user?user_id=${user_id}`, {\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken\n },\n method: 'DELETE',\n })\n .then(response => response.json())\n .then(data => {\n this.lineTarget.remove()\n })\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = [ \"invoice_contact\",\n \"name\",\n \"address\",\n \"zip_code\",\n \"city\",\n \"country\",\n \"vat\",\n \"delivery_address\",\n \"delivery_zip_code\",\n \"delivery_city\",\n \"delivery_country\"\n ]\n\n get csrfToken() { return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\") }\n\n updateInvoiceData() {\n const invoice_contact = this.invoice_contactTarget.value\n if (invoice_contact) {\n fetch(`/invoice_contacts/${invoice_contact}.json`,\n {\n method: 'GET',\n headers: {\n \"Content-Type\": \"application/json\",\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n this.nameTarget.value = data.name\n this.addressTarget.value = data.address\n this.zip_codeTarget.value = data.zip_code\n this.cityTarget.value = data.city\n this.countryTarget.value = data.country\n this.vatTarget.value = data.vat_nb\n })\n }\n else {\n this.clearInvoiceData()\n }\n }\n\n clearInvoiceData() {\n this.nameTarget.value = \"\"\n this.addressTarget.value = \"\"\n this.zip_codeTarget.value = \"\"\n this.cityTarget.value = \"\"\n this.countryTarget.value = \"\"\n this.vatTarget.value = \"\"\n }\n\n copyInvoiceAddress() {\n this.delivery_addressTarget.value = this.addressTarget.value\n this.delivery_zip_codeTarget.value = this.zip_codeTarget.value\n this.delivery_cityTarget.value = this.cityTarget.value\n this.delivery_countryTarget.value = this.countryTarget.value\n }\n\n}","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = [\n 'selectTypeBtn',\n 'createTypeBtn',\n 'typeSelection',\n 'typeCreation',\n 'typeSelectionInput',\n 'typeCreationInput',\n 'receivedPrice',\n 'checkBox',\n 'conversion'\n ]\n\n connect() {\n if (this.typeSelectionInputTarget.value !== '') { this.typeSelectionTarget.classList.remove('hidden') }\n this.useAsMaterialPrice()\n this.checkSubmit()\n }\n\n get submitBtn() {\n return document.getElementById('submit-button')\n }\n\n selectExisting() {\n this.typeCreationInputTarget.value = ''\n this.typeCreationTarget.classList.add('hidden')\n this.createTypeBtnTarget.classList.add('btn-outline-primary')\n this.createTypeBtnTarget.classList.remove('btn-primary')\n\n this.typeSelectionInputTarget.value = ''\n this.typeSelectionTarget.classList.add('hidden')\n this.selectTypeBtnTarget.classList.add('btn-outline-primary')\n this.selectTypeBtnTarget.classList.remove('btn-primary')\n\n this.checkSubmit()\n }\n\n revealTypeSelection() {\n this.element.querySelectorAll('.radio_button').forEach((radio) => {\n radio.checked = false\n })\n\n this.typeCreationInputTarget.value = ''\n this.typeSelectionTarget.classList.remove('hidden')\n this.selectTypeBtnTarget.classList.remove('btn-outline-primary')\n this.selectTypeBtnTarget.classList.add('btn-primary')\n\n this.typeCreationTarget.classList.add('hidden')\n this.createTypeBtnTarget.classList.add('btn-outline-primary')\n this.createTypeBtnTarget.classList.remove('btn-primary')\n\n this.checkSubmit()\n }\n\n revealTypeCreation() {\n this.element.querySelectorAll('.radio_button').forEach((radio) => {\n radio.checked = false\n })\n\n this.typeSelectionInputTarget.value = ''\n this.typeSelectionTarget.classList.add('hidden')\n this.selectTypeBtnTarget.classList.add('btn-outline-primary')\n this.selectTypeBtnTarget.classList.remove('btn-primary')\n\n this.typeCreationTarget.classList.remove('hidden')\n this.createTypeBtnTarget.classList.remove('btn-outline-primary')\n this.createTypeBtnTarget.classList.add('btn-primary')\n\n this.checkSubmit()\n }\n\n checkSubmit() {\n const formSubmitable = this.checkTypeValuePresence()\n this.submitBtn.disabled = !formSubmitable\n }\n\n checkTypeValuePresence() {\n var check = false\n if (this.typeSelectionInputTarget.value !== '') { check = true }\n if (this.typeCreationInputTarget.value !== '') { check = true }\n this.element.querySelectorAll('.radio_button').forEach((radio) => {\n if (radio.checked) { check = true }\n })\n return check\n }\n\n useAsMaterialPrice() {\n if (this.supplierCurrency === this.companyCurrency) { return }\n if (this.checkBoxTarget.checked) {\n this.updateDisplay()\n } else {\n this.conversionTarget.innerText = ''\n }\n }\n\n updateDisplay() {\n const valueToConvert = Number.parseFloat(this.receivedPriceTarget.value.replace(',', '.')).toFixed(2)\n fetch(`/exchange_rates/search?currency=${this.supplierCurrency}`,\n {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n const exchange_rate = data.exchange_rate\n let displayText = exchange_rate ? `: ${valueToConvert} ${this.supplierCurrency} ${(valueToConvert * exchange_rate).toFixed(2)} ${this.companyCurrency}`\n : `${this.missingErrorMessage}`\n this.conversionTarget.innerHTML = displayText\n })\n }\n\n get missingErrorMessage() {\n return `\n : ${i18n.t('exchange_rate.error.error_while_converting')}\n `\n }\n\n get supplierCurrency() {\n return this.checkBoxTarget.dataset.supplierCurrency\n }\n\n get companyCurrency() {\n return this.checkBoxTarget.dataset.companyCurrency\n }\n\n get csrfToken() {\n return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['cart', 'orderId', 'totalReceived']\n\n add(event) {\n const mat_id = event.target.getAttribute('data-mat-id')\n const value = event.target.getAttribute('data-quantity')\n fetch(`/material_orders/${this.material_order_id}/add_quantity`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n },\n body: JSON.stringify({ mat_id: mat_id, value: value })\n })\n .then(response => response.json())\n .then(data => {\n var existing_line = document.getElementById(`material_order_line_${data.response.id}`)\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput) {\n tableInput.value = data.response.quantity <= 0 ? '' : data.response.quantity\n }\n if (existing_line && data.response.quantity <= 0) {\n return existing_line.remove()\n }\n this.updateMaterial(data, existing_line)\n })\n }\n\n add_value(event) {\n const mat_id = event.target.getAttribute('data-mat-id')\n const value = event.target.value\n fetch(`/material_orders/${this.material_order_id}/update_quantity`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n },\n body: JSON.stringify({ mat_id: mat_id, value: value })\n })\n .then(response => response.json())\n .then(data => {\n var existing_line = document.getElementById(`material_order_line_${data.response.id}`)\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput && data.response.quantity <= 0) {\n tableInput.value = ''\n }\n if (existing_line && data.response.quantity <= 0) {\n return existing_line.remove()\n }\n this.updateMaterial(data, existing_line)\n })\n }\n\n editMaterial(e) {\n const lineId = e.target.dataset.lineId\n const quantity = document.getElementById('material_order_line_quantity_ordered').value\n const price = document.getElementById('material_order_line_unit_price_ordered').value\n\n fetch(`/material_order_lines/${lineId}`, {\n method: 'PATCH',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n material_order_line: {\n quantity_ordered: quantity,\n unit_price_ordered: price\n }\n })\n })\n .then(response => response.json())\n .then(data => {\n var existing_line = document.getElementById(`material_order_line_${data.response.id}`)\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput) {\n tableInput.value = data.response.quantity <= 0 ? '' : data.response.quantity\n }\n if (existing_line && data.response.quantity <= 0) {\n existing_line.remove()\n document.getElementById('edit-line')\n .querySelector('.btn-close')\n .click()\n return\n }\n this.updateMaterial(data, existing_line)\n document.getElementById('edit-line')\n .querySelector('.btn-close')\n .click()\n })\n }\n\n updateMaterial(data, existing_line) {\n if (existing_line) {\n existing_line.querySelector('.mat_order_quantity').innerText = `${window.i18n.t('material_order.quantity_ordered')}: ${data.response.quantity}`\n existing_line.querySelector('.mat_order_unit_price').innerText = `${window.i18n.t('material.unit_price')}: ${data.response.unit_price}`\n return\n }\n\n this.cart_list.insertAdjacentHTML('beforeend', `\n
  • \n
    \n
    \n ${data.response.material.name}\n \n \n \n
    \n
    \n ${window.i18n.t('material.brand')}: ${data.response.material.brand}\n
    \n
    \n ${window.i18n.t('material_order.quantity_ordered')}: ${data.response.quantity}\n
    \n
    \n ${window.i18n.t('material.unit_price')}: ${data.response.unit_price}\n
    \n
    \n
    \n \n \n \n material-orders--manage-lines#remove\">\n
    \n
  • \n `\n )\n }\n\n remove(event) {\n let lineId = event.target.getAttribute('data-line-id')\n\n if (lineId === null) {\n const matId = event.target.getAttribute('data-mat-id')\n const item = this.cartTarget.querySelector(`.list-group-item [data-mat-id=\"${matId}\"]`)\n lineId = item.getAttribute('data-line-id')\n }\n\n fetch(`/material_order_lines/${lineId}`,\n {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput) { tableInput.value = '' }\n document.getElementById(`material_order_line_${data.response.id}`).remove()\n })\n }\n\n cancel_delivery(event) {\n const material_order_line_id = event.target.getAttribute('data-item-id')\n fetch(`/material_order_lines/${material_order_line_id}/cancel_delivery`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n if (document.getElementById(`delivered-${material_order_line_id}`)) {\n document.getElementById(`delivered-${material_order_line_id}`).innerText = window.i18n.t('material_order.status.cancelled')\n document.getElementById(`missing-${material_order_line_id}`).innerText = window.i18n.t('material_order.status.cancelled')\n document.getElementById(`button-div-${material_order_line_id}`).innerHTML = ''\n document.getElementById(`button-div-${material_order_line_id}`).innerHTML = `\n
    material-orders--manage-lines#reopen\">\n \n
    \n `\n }\n this.checkClosable(data.closable)\n this.checkCancellable(data.cancellable)\n })\n }\n\n reopen(event) {\n const material_order_line_id = event.target.getAttribute('data-item-id')\n fetch(`/material_order_lines/${material_order_line_id}/reopen_delivery`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n if (document.getElementById(`delivered-${material_order_line_id}`)) {\n this.totalReceivedTarget.innerText = data.total_received\n document.getElementById(`delivered-${material_order_line_id}`).innerText = '0.0'\n document.getElementById(`missing-${material_order_line_id}`).innerText = data.line.quantity_ordered\n document.getElementById(`received-total-${material_order_line_id}`).innerText = '0,00'\n document.getElementById(`button-div-${material_order_line_id}`).innerHTML = ''\n document.getElementById(`button-div-${material_order_line_id}`).innerHTML = `\n
    \n \n
    \n \n
    \n
    \n
    material-orders--manage-lines#cancel_delivery\">\n \n
    \n
    \n `\n }\n this.checkClosable(data.closable)\n this.checkCancellable(data.cancellable)\n })\n }\n\n checkClosable(closable) {\n if (closable === true) {\n document.getElementById('fully_delivered').classList.remove('hidden')\n } else {\n document.getElementById('fully_delivered').classList.add('hidden')\n }\n }\n\n checkCancellable(cancellable) {\n if (cancellable === true) {\n document.getElementById('cancel_order').classList.remove('hidden')\n } else {\n document.getElementById('cancel_order').classList.add('hidden')\n }\n }\n\n get material_order_id() {\n return this.orderIdTarget.getAttribute('data-order-id')\n }\n\n get cart_list() {\n return this.cartTarget\n }\n\n get csrfToken() {\n return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n\n static targets = [\"inventoryDate\"]\n\n toggleInventoryDate(e) {\n const quantityid = e.target.value\n if (quantityid === null || quantityid === '') {\n this.inventoryDateTarget.classList.add('hidden')\n } else {\n fetch(`/material_quantities/${quantityid}`,{\n method: 'GET',\n headers: {\n \"Content-Type\": \"application/json\",\n 'X-CSRF_Token': $('meta[name=\"csrf-token\"]').attr('content')\n }\n })\n .then(response => response.json())\n .then(data => {\n this.inventoryDateTarget.classList.remove('hidden')\n this.inventoryDateTarget.innerText = `${i18n.t('material.inventory_taken_on')}: ${data.inventory_date || 'n/a'}`\n })\n }\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['cart', 'quotationId']\n\n\n add(event) {\n const mat_id = event.target.getAttribute('data-mat-id')\n const value = event.target.getAttribute('data-quantity')\n fetch(`/material_quotations/${this.material_quotation_id}/add_quantity`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n },\n body: JSON.stringify({ mat_id: mat_id, value: value })\n })\n .then(response => response.json())\n .then(data => {\n let existing_line = document.getElementById(`material_quotation_line_${data.response.id}`)\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput) {\n tableInput.value = data.response.quantity <= 0 ? '' : data.response.quantity\n }\n if (existing_line && data.response.quantity <= 0) {\n return existing_line.remove()\n }\n this.updateMaterial(data, existing_line)\n })\n }\n\n add_value(event) {\n const mat_id = event.target.getAttribute('data-mat-id')\n const value = event.target.value\n fetch(`/material_quotations/${this.material_quotation_id}/update_quantity`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n },\n body: JSON.stringify({ mat_id: mat_id, value: value })\n })\n .then(response => response.json())\n .then(data => {\n let existing_line = document.getElementById(`material_quotation_line_${data.response.id}`)\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput && data.response.quantity <= 0) {\n tableInput.value = ''\n }\n if (existing_line && data.response.quantity <= 0) {\n return existing_line.remove()\n }\n this.updateMaterial(data, existing_line)\n })\n }\n\n editMaterial(e) {\n const lineId = e.target.dataset.lineId\n const quantity = document.getElementById('material_quotation_line_quantity').value\n\n fetch(`/material_quotation_lines/${lineId}`, {\n method: 'PATCH',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ material_quotation_line: { quantity: quantity } })\n })\n .then(response => response.json())\n .then(data => {\n var existing_line = document.getElementById(`material_quotation_line_${data.response.id}`)\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput) {\n tableInput.value = data.response.quantity <= 0 ? '' : data.response.quantity\n }\n if (existing_line && data.response.quantity <= 0) {\n existing_line.remove()\n document.getElementById('edit-line')\n .querySelector('.btn-close')\n .click()\n return\n }\n this.updateMaterial(data, existing_line)\n document.getElementById('edit-line')\n .querySelector('.btn-close')\n .click()\n })\n }\n\n updateMaterial(data, existing_line) {\n if (existing_line) {\n return existing_line.querySelector('.mat_quantity').innerText = `${window.i18n.t('material.quantity')}: ${data.response.quantity}`\n }\n\n this.cart_list.insertAdjacentHTML('afterbegin', `\n
  • \n
    \n
    \n ${data.response.material.name}\n \n \n \n
    \n
    \n ${window.i18n.t('material.brand')}: ${data.response.material.brand}\n
    \n
    \n ${window.i18n.t('material.quantity')}: ${data.response.quantity}\n
    \n
    \n
    \n \n \n \n material-quotations--prepare-lines#remove\">\n
    \n
  • \n `\n )\n }\n\n remove(event) {\n let lineId = event.target.getAttribute('data-line-id')\n\n if (lineId === null) {\n const matId = event.target.getAttribute('data-mat-id')\n const item = this.cartTarget.querySelector(`.list-group-item [data-mat-id=\"${matId}\"]`)\n lineId = item.getAttribute('data-line-id')\n }\n\n fetch(`/material_quotation_lines/${lineId}`,\n {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput) { tableInput.value = '' }\n document.getElementById(`material_quotation_line_${data.response.id}`).remove()\n })\n }\n\n get material_quotation_id() {\n return this.quotationIdTarget.getAttribute('data-quotation-id')\n }\n\n get cart_list() {\n return this.cartTarget\n }\n\n get csrfToken() {\n return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['cart', 'requestId']\n\n add(event) {\n const mat_id = event.target.getAttribute('data-mat-id')\n const value = event.target.getAttribute('data-quantity')\n fetch(`/material_requests/${this.material_request_id}/add_material`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n },\n body: JSON.stringify({ material_id: mat_id, quantity: value })\n })\n .then(response => response.json())\n .then(data => {\n var existingLine = document.getElementById(`material_request_line_${data.response.id}`)\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput) {\n tableInput.value = data.response.quantity_requested <= 0 ? '' : data.response.quantity_requested\n }\n if (existingLine && data.response.quantity_requested <= 0) {\n return existingLine.remove()\n }\n this.updateMaterial(data, existingLine)\n })\n }\n\n add_value(event) {\n const mat_id = event.target.getAttribute('data-mat-id')\n const value = event.target.value\n fetch(`/material_requests/${this.material_request_id}/update_material`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n },\n body: JSON.stringify({ material_id: mat_id, quantity: value })\n })\n .then(response => response.json())\n .then(data => {\n var existingLine = document.getElementById(`material_request_line_${data.response.id}`)\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material.id}`)\n if (tableInput && data.response.quantity_requested <= 0) {\n tableInput.value = ''\n }\n if (existingLine && data.response.quantity_requested <= 0) {\n return existingLine.remove()\n }\n this.updateMaterial(data, existingLine)\n })\n }\n\n editMaterial(e) {\n const id = e.target.dataset.lineId\n const quantity = document.getElementById('material_request_line_quantity_requested').value\n const name = document.getElementById('material_request_line_material_name')?.value\n const brand = document.getElementById('material_request_line_material_brand')?.value\n const description = document.getElementById('material_request_line_description')?.value\n\n fetch(`/material_request_lines/${id}`, {\n method: 'PATCH',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n material_request_line: {\n quantity_requested: quantity,\n material_name: name,\n material_brand: brand,\n description: description\n }\n })\n })\n .then(response => response.json())\n .then(data => {\n var existing_line = document.getElementById(`material_request_line_${data.response.id}`)\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material?.id}`)\n if (tableInput) {\n tableInput.value = data.response.quantity_requested <= 0 ? '' : data.response.quantity_requested\n }\n if (existing_line && data.response.quantity_requested <= 0) {\n existing_line.remove()\n document.getElementById('edit-line')\n .querySelector('.btn-close')\n .click()\n return\n }\n this.updateMaterial(data, existing_line)\n document.getElementById('edit-line')\n .querySelector('.btn-close')\n .click()\n })\n }\n\n updateMaterial(data, existingLine) {\n if (existingLine) {\n existingLine.querySelector('.mat_order_quantity').innerText = `${window.i18n.t('material.quantity')}: ${data.response.quantity_requested}`\n existingLine.querySelector('.mat_brand').innerText = `${window.i18n.t('material.brand')}: ${data.response.brand}`\n existingLine.querySelector('.mat_name').innerText = `${data.response.name}`\n return\n }\n\n this.cart_list.insertAdjacentHTML('afterbegin', `\n
  • \n
    \n
    \n ${data.response.name}\n
    \n
    \n ${window.i18n.t('material.brand')}: ${data.response.brand}\n
    \n
    \n ${window.i18n.t('material.quantity')}: ${data.response.quantity_requested}\n
    \n
    \n
    \n \n \n \n material-request#remove\">\n
    \n
  • \n `\n )\n }\n\n remove(event) {\n let lineId = event.target.getAttribute('data-line-id')\n\n if (lineId === null) {\n const matId = event.target.getAttribute('data-mat-id')\n const item = this.cartTarget.querySelector(`.list-group-item [data-mat-id=\"${matId}\"]`)\n lineId = item.getAttribute('data-line-id')\n }\n\n fetch(`/material_request_lines/${lineId}`,\n {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n var tableInput = document.getElementById(`material_quantity_input_${data.response.material?.id}`)\n if (tableInput) { tableInput.value = '' }\n document.getElementById(`material_request_line_${data.response.id}`).remove()\n })\n }\n\n reopen(event) {\n const request_line_id = event.target.dataset.lineId\n fetch(`/material_request_lines/${request_line_id}/reopen`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n if (data.response.material_quantity === null) {\n document.getElementById(`line-quantity-${request_line_id}`).innerText = ''\n document.getElementById(`material-quantity-${request_line_id}`).innerText = `${Number(data.response.material.quantity).toFixed(1)}`\n document.getElementById(`button-div-${request_line_id}`).innerHTML = ''\n document.getElementById(`button-div-${request_line_id}`).innerHTML = `\n \n
    \n ${window.i18n.t('material_request.actions.select_location')}\n
    \n
    \n `\n if (document.getElementById('ready-request-btn')) {\n document.getElementById('ready-request-btn').classList.add('hidden')\n }\n }\n })\n }\n\n resetUsage(event) {\n const request_line_id = event.target.dataset.lineId\n fetch(`/material_request_lines/${request_line_id}/reset_usage`,\n {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n document.getElementById(`line-quantity-used-${request_line_id}`).innerText = `${Number(data.response.offer_line.quantity).toFixed(1)}`\n document.getElementById(`material-quantity-${request_line_id}`).innerText = `${Number(data.response.material.quantity).toFixed(1)}`\n document.getElementById(`button-div-${request_line_id}`).innerHTML = ''\n document.getElementById(`button-div-${request_line_id}`).innerHTML = `\n \n
    \n ${window.i18n.t('actions.validate')}\n
    \n
    \n `\n if (document.getElementById('add-to-report-btn')) {\n document.getElementById('add-to-report-btn').classList.add('hidden')\n }\n })\n }\n\n get material_request_id() {\n return this.requestIdTarget.getAttribute('data-request-id')\n }\n\n get cart_list() {\n return this.cartTarget\n }\n\n get inputs() {\n return this.inputsTarget\n }\n\n get csrfToken() {\n return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n\n static targets = [\"controllerDiv\", \"inputs\", \"buttons\", \"button\", \"free\", \"report\", \"charge_number\"]\n\n showChoice(event) {\n const choice = event.target.dataset.inputChoice\n this.inputsTarget.querySelectorAll(\".exclusif_input\").forEach((input) => {\n if (input.tagName === 'SELECT') {}\n else {\n input.value = \"\";\n }\n })\n\n Array.from(this.inputsTarget.children).forEach((div) => {\n if (div.id != choice) {\n div.classList.add(\"hidden\")\n } else {\n div.classList.remove(\"hidden\")\n }\n })\n\n Array.from(this.buttonsTarget.children).forEach((button) => {\n button.classList.remove(\"active\")\n })\n\n event.target.classList.add(\"active\")\n this.checkValidate(choice)\n }\n\n checkInput(event) {\n if (event.target.value != \"\") {\n this.buttonTarget.classList.remove(\"hidden\")\n } else {\n this.buttonTarget.classList.add(\"hidden\")\n }\n }\n\n checkValidate(choice) {\n switch (choice) {\n case 'free':\n if (this.freeTarget.value != \"\") {\n this.buttonTarget.classList.remove(\"hidden\")\n } else {\n this.buttonTarget.classList.add(\"hidden\")\n }\n break;\n case 'report':\n if (this.reportTarget.value != \"\") {\n this.buttonTarget.classList.remove(\"hidden\")\n } else {\n this.buttonTarget.classList.add(\"hidden\")\n }\n break;\n case 'charge_number':\n if (this.charge_numberTarget.value != \"\") {\n this.buttonTarget.classList.remove(\"hidden\")\n } else {\n this.buttonTarget.classList.add(\"hidden\")\n }\n break;\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { i18n } from '../../src/config/i18n.js'\n\nexport default class extends Controller {\n static targets = [\"btn\"]\n\n get csrfToken() { return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\") }\n\n get materialId() {\n return this.btnTarget.dataset.material\n }\n\n get amenityId() {\n return this.btnTarget.dataset.amenity\n }\n\n get favDiv() {\n return document.getElementById('favourite_material_list')\n }\n\n\n addFavourite() {\n fetch(`/amenities/${this.amenityId}/add_material?material_id=${this.materialId}`, {\n method: 'PATCH',\n headers: { \"Content-Type\": \"application/json\", \"X-CSRF-Token\": this.csrfToken }\n })\n .then(response => response.json())\n .then(data => {\n if (data.status == 'success') {\n this.btnTarget.classList.remove('far')\n this.btnTarget.classList.add('fas')\n var description = ''\n var brand = ''\n var material_category = ''\n var responsible = ''\n // var display_location = ''\n\n if (data.material.description)\n {\n description = `${i18n.t('shared.description')}: ${data.material.description}
    `\n }\n if (data.material.brand)\n {\n brand = `${i18n.t('material.brand')}: ${data.material.brand}
    `\n }\n if (data.material.material_category)\n {\n material_category = `${i18n.t('material.category')}: ${data.material_category}
    `\n }\n if (data.responsible)\n {\n responsible = ` ${data.responsible}
    `\n }\n // if (data.location != 'n/a')\n // {\n // display_location = ` ${data.location}
    `\n // }\n\n\n\n this.favDiv.insertAdjacentHTML('afterbegin',\n `
    \n
    \n \n ${data.material.name}\n \n materials--remove-favourite#remove\">\n
    \n\n
    \n
    \n ${ description }\n ${ brand }\n ${ material_category }\n ${ responsible }\n ${i18n.t('material.available_quantity')}: ${data.material.quantity}\n\n
    \n
    \n
    `\n )\n\n\n }\n\n else\n alert('Error')\n\n })\n\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n static targets = ['form', 'startDate', 'endDate', 'download', 'progress', 'progressWrapper']\n\n export() {\n var start = this.startDateTarget.value\n var end = this.endDateTarget.value\n\n if (start === '' || end === '') { return alert(i18n.t('material.error.select_start_and_end')) }\n\n var materialId = this.formTarget.dataset.material\n fetch(`/materials/export_usages?start=${start}&end=${end}&material_id=${materialId}`)\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id\n const jobProviderId = data.job.job_provider_id\n this.formTarget.classList.add('hidden')\n this.progressTarget.classList.remove('hidden')\n this.progressTarget.textContent = `${i18n.t('shared.processing')}`\n this.downloadTarget.classList.add('hidden')\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000)\n })\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/export_status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n const percentage = data.percentage\n this.progressTarget.textContent = `${i18n.t('shared.processing')} ${percentage}%`\n if(data.status == 'error') {\n this.stopCheckJobStatus()\n } else if(data.status === 'complete') {\n this.stopCheckJobStatus()\n this.progressTarget.textContent = `${i18n.t('shared.processing_completed')}`\n this.progressTarget.insertAdjacentHTML('afterend', `${i18n.t('shared.file_sent_to_your_email_address')}`)\n }\n })\n }\n\n stopCheckJobStatus() {\n if(this.timer) {\n clearInterval(this.timer)\n }\n }\n\n disconnect() {\n this.stopCheckJobStatus()\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\nimport XLSX from 'xlsx'\nexport default class extends Controller {\n static targets = ['file_input', 'importBtn', 'table', 'tableHeader', 'tableData', 'progress', 'progressWrapper', 'company', 'importNumber', 'deleteBtn']\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n get materialFields() {\n return [\n {'field_name': 'none', 'translation': `${i18n.t('shared.ignore') }`, 'required': false},\n {'field_name': 'name', 'translation': 'name', 'required': true},\n {'field_name': 'internal_ref', 'translation': 'internal_ref', 'required': false},\n {'field_name': 'internal_identifier', 'translation': 'internal_identifier', 'required': false},\n {'field_name': 'description_1', 'translation': 'description_1', 'required': false},\n {'field_name': 'description_2', 'translation': 'description_2', 'required': false},\n {'field_name': 'brand', 'translation': 'brand', 'required': false},\n {'field_name': 'unit_price', 'translation': 'unit_price', 'required': false},\n {'field_name': 'loc_1', 'translation': 'loc_1', 'required': false},\n {'field_name': 'loc_2', 'translation': 'loc_2', 'required': false},\n {'field_name': 'loc_3', 'translation': 'loc_3', 'required': false},\n {'field_name': 'cat_1', 'translation': 'cat_1', 'required': false},\n {'field_name': 'cat_2', 'translation': 'cat_2', 'required': false},\n {'field_name': 'cat_3', 'translation': 'cat_3', 'required': false},\n {'field_name': 'packaging', 'translation': 'packaging', 'required': false},\n {'field_name': 'supplier_name', 'translation': 'supplier_name', 'required': false},\n {'field_name': 'supplier_ref', 'translation': 'supplier_ref', 'required': false},\n {'field_name': 'supplier_description', 'translation': 'supplier_description', 'required': false},\n {'field_name': 'quantity', 'translation': 'quantity', 'required': false},\n {'field_name': 'low_lvl_alarm', 'translation': 'low_lvl_alarm', 'required': false},\n {'field_name': 'bar_code', 'translation': 'bar_code', 'required': false},\n {'field_name': 'maker_reference', 'translation': 'maker_reference', 'required': false}\n ]\n }\n\n get requiredFields() {\n return this.materialFields.filter((field) => !!field['required'])\n }\n\n async prepare_import(event) {\n this.tableDataTarget.innerHTML = ''\n this.tableHeaderTarget.innerHTML = ''\n await this.read_file(event)\n\n const selectTr = document.createElement('tr')\n const headerTr = document.createElement('tr')\n Object.keys(this.json[0]).forEach((key) => {\n const selectTh = document.createElement('th')\n const fieldSelector = document.createElement('select')\n fieldSelector.classList.add('field-selector')\n fieldSelector.id = `select-${key}`\n this.materialFields.forEach((field) => {\n const opt = document.createElement('option')\n opt.value = field['field_name']\n opt.text = field['translation']\n fieldSelector.add(opt)\n selectTh.appendChild(fieldSelector)\n })\n\n selectTr.appendChild(selectTh)\n\n const th = document.createElement('th')\n th.innerHTML = key\n headerTr.appendChild(th)\n })\n this.tableHeaderTarget.appendChild(selectTr)\n this.tableHeaderTarget.appendChild(headerTr)\n this.json.slice(0, 10).forEach((row) => {\n const tr = document.createElement('tr')\n Object.keys(this.json[0]).forEach((key) => {\n const td = document.createElement('td')\n\n td.innerHTML = row[key]\n tr.appendChild(td)\n })\n this.tableDataTarget.appendChild(tr)\n }\n )\n }\n\n async read_file(event) {\n const file = event.target.files[0]\n const data = await file.arrayBuffer()\n const workbook = XLSX.read(data)\n const sheet = workbook.Sheets[workbook.SheetNames[0]]\n this.json = XLSX.utils.sheet_to_json(sheet)\n }\n\n import () {\n const ok_for_import = this.checkForRequiredFields()\n if (ok_for_import) {\n this.importData()\n }\n else {\n alert('Please select a field for each requiered column')\n }\n }\n\n checkForRequiredFields () {\n const selectFields = this.element.querySelectorAll('select')\n const fields = []\n selectFields.forEach((field) => {\n fields.push(field.value)\n })\n const requiredFieldList = this.requiredFields.map((field) => field['field_name'])\n requiredFieldList.forEach ((field) => {\n if (!fields.includes(field)) {\n return false\n }\n })\n return true\n }\n\n importData () {\n const selectFields = this.element.querySelectorAll('select')\n const fieldsMatching = []\n this.importBtnTarget.classList.add('hidden')\n selectFields.forEach((field) => {\n fieldsMatching.push({'table_field': field.value, 'file_field': field.id.replace('select-','')})\n })\n const data = this.json\n fetch ('/admin/imports.json', {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': this.csrfToken,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n job_folder: 'materials',\n fields_matching: fieldsMatching,\n data: data,\n company_id: this.companyTarget.value\n })\n })\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id\n const jobProviderId = data.job.job_provider_id\n this.progressTarget.classList.remove('hidden')\n this.progressTarget.textContent = `${i18n.t('shared.processing')}`\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000)\n })\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/admin/imports/status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n const percentage = data.percentage\n const importNumberValue = data.import_number\n this.progressTarget.textContent = `${i18n.t('shared.processing')} ${percentage}%`\n if(data.status == 'error') {\n this.stopCheckJobStatus()\n }else if(data.status === 'complete') {\n this.stopCheckJobStatus()\n this.progressTarget.textContent = `${i18n.t('shared.import_number')} ${importNumberValue} - ${i18n.t('shared.processing_completed')}`\n this.deleteBtnTarget.classList.remove('hidden')\n this.deleteBtnTarget.href = `/imports/${importNumberValue}`\n }\n })\n }\n\n stopCheckJobStatus() {\n if(this.timer) {\n clearInterval(this.timer)\n }\n }\n\n disconnect() {\n this.stopCheckJobStatus()\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['totalQuantity']\n\n updateTotal(e) {\n const difference = e.currentTarget.value\n const currentQuantity = this.totalQuantityTarget.dataset.currentQuantity\n\n // Rounding to hide precision errors\n this.totalQuantityTarget.innerText = Math.round((parseFloat(currentQuantity) + parseFloat(difference)) * 100) / 100\n }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"card\"]\n\n get csrfToken() { return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\") }\n\n get materialId() {\n return this.cardTarget.dataset.material\n }\n\n get amenityId() {\n return this.cardTarget.dataset.amenity\n }\n\n \n\n remove() {\n fetch(`/amenities/${this.amenityId}/remove_material?material_id=${this.materialId}`, {\n method: 'PATCH',\n headers: { \"Content-Type\": \"application/json\", \"X-CSRF-Token\": this.csrfToken }\n })\n .then(response => response.json())\n .then(data => {\n if (data.status == 'success') {\n this.cardTarget.remove()\n }\n \n else\n alert('Error')\n \n })\n\n }\n}","import { Controller } from \"@hotwired/stimulus\"\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n\tstatic targets = [\"query\", \"resultsDiv\"]\n\n\tsearch() {\n if (this.queryTarget.value.length > 2) {\n fetch(`/materials/search?q=${this.queryTarget.value}`, {\n method: 'GET',\n headers: { \"Content-Type\": \"application/json\" }\n })\n .then(response => response.json())\n .then(data => {\n this.resultsDivTarget.innerHTML = ''\n data.response.results.forEach(line => {\n this.resultsDivTarget.insertAdjacentHTML('beforeend', `\n \n
  • \n
    \n
    \n ${[line.name, line.internal_ref].filter(Boolean).join(' - ')}\n
    \n
    \n ${i18n.t('material.brand')}: ${line.brand}\n
    \n
    \n ${i18n.t('material.quantity')}: ${line.quantity}\n
    \n
    \n
  • \n
    \n `)\n })\n })\n }\n else\n {\n this.resultsDivTarget.innerHTML = ''\n }\n }\n\n}\n\n\n","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n\n static targets = [\"controllerDiv\", \"inputs\", \"buttons\", \"button\", \"free\", \"report\", \"charge_number\", \"lineType\"]\n\n showChoice(event) {\n const choice = event.target.dataset.inputChoice\n this.inputsTarget.querySelectorAll(\".exclusif_input\").forEach((input) => {\n if (input.tagName === 'SELECT') {}\n else {\n input.value = \"\";\n }\n })\n\n Array.from(this.inputsTarget.children).forEach((div) => {\n if (div.id != choice) {\n div.classList.add(\"hidden\")\n } else {\n div.classList.remove(\"hidden\")\n }\n })\n\n Array.from(this.buttonsTarget.children).forEach((button) => {\n button.classList.remove(\"active\")\n })\n\n event.target.classList.add(\"active\")\n this.lineTypeTarget.value = choice\n this.checkValidate(choice)\n }\n\n checkInput(event) {\n if (event.target.value != \"\") {\n this.buttonTarget.classList.remove(\"hidden\")\n } else {\n this.buttonTarget.classList.add(\"hidden\")\n }\n }\n\n checkValidate(choice) {\n switch (choice) {\n case 'free':\n if (this.freeTarget.value != \"\") {\n this.buttonTarget.classList.remove(\"hidden\")\n } else {\n this.buttonTarget.classList.add(\"hidden\")\n }\n break;\n case 'report':\n if (this.reportTarget.value != \"\") {\n this.buttonTarget.classList.remove(\"hidden\")\n } else {\n this.buttonTarget.classList.add(\"hidden\")\n }\n break;\n case 'charge_number':\n if (this.charge_numberTarget.value != \"\") {\n this.buttonTarget.classList.remove(\"hidden\")\n } else {\n this.buttonTarget.classList.add(\"hidden\")\n }\n break;\n }\n }\n\n closeModal() {\n this.controllerDivTarget.closest('.modal-content').querySelector('.btn-close').click()\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport mapboxgl from '!mapbox-gl';\nexport default class extends Controller {\n connect() {\n const options = {\n enableHighAccuracy: true,\n timeout: 5000,\n maximumAge: 0\n };\n \n \n navigator.geolocation.getCurrentPosition(this.success, this.error, options);\n \n \n }\n\n success(pos) {\n var crd = {longitude: 0, latitude: 0};\n if (document.querySelector('#measurment_value_value').value != '')\n {\n const existing = document.querySelector('#measurment_value_value').value.split(',');\n crd.latitude = existing[0];\n crd.longitude = existing[1];\n document.querySelector('#measurment_value_value').value = crd.latitude + ',' + crd.longitude;\n }\n else \n {\n if (pos)\n {\n crd = pos.coords; \n document.querySelector('#measurment_value_value').value = crd.latitude.toFixed(5) + ',' + crd.longitude.toFixed(5);\n \n }\n }\n\n\n mapboxgl.accessToken = 'pk.eyJ1IjoiYmVydHJhbmRtb3JlbCIsImEiOiJjbGN1Z2o5a3cwbmk1M3dxdG91azJjZmZxIn0.mKd_D3yQCWmGnLC6TAvITw';\n var map = new mapboxgl.Map({\n container: 'map',\n center: [crd.longitude, crd.latitude],\n style: 'mapbox://styles/mapbox/satellite-streets-v11',\n zoom: 15\n });\n map.on('load', function () {\n map.resize();\n });\n map.resize();\n\n // make a marker for each feature and add to the map\n const marker = new mapboxgl.Marker({draggable: true}).setLngLat([crd.longitude, crd.latitude]).addTo(map);\n \n function onDragEnd(){\n const lngLat = marker.getLngLat();\n document.querySelector('#measurment_value_value').value = lngLat.lat.toFixed(5) + ',' + lngLat.lng.toFixed(5);\n }\n\n marker.on('dragend', onDragEnd);\n map.resize();\n }\n\n\n error(err) { \n console.warn(`ERROR(${err.code}): ${err.message}`);\n\n }\n\n\n}","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = [\n 'taskType',\n 'reportFields',\n 'maintenanceFields',\n 'taskTitle',\n 'taskDescription',\n 'maintenancePlan'\n ]\n\n showtasktype() {\n if (this.taskTypeTarget.value === 'maintenance') {\n this.maintenanceFieldsTarget.classList.remove('hidden')\n this.reportFieldsTarget.classList.add('hidden')\n\n // Set required attributes\n this.taskTitleTarget.removeAttribute('required')\n this.taskDescriptionTarget.removeAttribute('required')\n this.maintenancePlanTarget.setAttribute('required', true)\n } else if (this.taskTypeTarget.value === 'report') {\n this.maintenanceFieldsTarget.classList.add('hidden')\n this.reportFieldsTarget.classList.remove('hidden')\n\n // Set required attributes\n this.maintenancePlanTarget.removeAttribute('required')\n this.taskTitleTarget.setAttribute('required', true)\n this.taskDescriptionTarget.setAttribute('required', true)\n } else {\n this.maintenanceFieldsTarget.classList.add('hidden')\n this.reportFieldsTarget.classList.add('hidden')\n\n // Set required attributes\n this.taskTitleTarget.removeAttribute('required')\n this.taskDescriptionTarget.removeAttribute('required')\n this.maintenancePlanTarget.removeAttribute('required')\n }\n }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"object\"]\n\n selectPic(e) {\n let document_id = e.target.getAttribute('data-doc-id')\n fetch(`/${this.controllerName}/${this.objectId}/set_profile_pic?profile_pic_id=${document_id}`,\n {\n method: 'PATCH',\n headers: {\n \"Content-Type\": \"application/json\",\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n this.updateDocumentList(data)\n })\n }\n\n removePic() {\n fetch(`/${this.controllerName}/${this.objectId}/set_profile_pic`,\n {\n method: 'PATCH',\n headers: {\n \"Content-Type\": \"application/json\",\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => {\n this.updateDocumentList(data)\n })\n }\n\n updateDocumentList(data) {\n let previous_pic = document.getElementById(`object_${data.previous_pic_id}`)\n let new_pic = document.getElementById(`object_${data.new_pic_id}`)\n if (previous_pic) {\n previous_pic.querySelector('.fav-btn').innerHTML = `profile-pic#selectPic\" data-doc-id=\"${data.previous_pic_id}}\">`\n }\n if (new_pic) {\n new_pic.querySelector('.fav-btn').innerHTML = `profile-pic#removePic\" data-doc-id=\"${data.new_pic_id}}\">`\n }\n }\n\n get controllerName() {\n return this.objectTarget.dataset.controllerName\n }\n\n get objectId() {\n return this.objectTarget.dataset.objectId\n }\n\n get csrfToken() {\n return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\")\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { Html5Qrcode } from \"html5-qrcode\"\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n\tstatic targets = ['result', 'scanBtn', 'outputData']\n\n switch_format() {\n if (this.scanBtnTarget.dataset.height == 250) {\n this.scanBtnTarget.dataset.height = 50\n }\n else {\n this.scanBtnTarget.dataset.height = 250\n }\n this.scan()\n }\n\n scan() {\n // This method will trigger user permissions\n var height = 250\n if (this.scanBtnTarget.dataset.height) {\n height = this.scanBtnTarget.dataset.height\n }\n\n Html5Qrcode.getCameras().then(devices => {\n if (devices && devices.length) {\n this.scanBtnTarget.classList.add('hidden')\n // var cameraId = devices[0].id;\n const html5QrCode = new Html5Qrcode(/* element id */ \"qr-reader\");\n html5QrCode.start(\n { facingMode: \"environment\" },\n {\n fps: 10, // Optional, frame per seconds for qr code scanning\n qrbox: { width: 250, height: height } // Optional, if you want bounded box UI\n },\n (decodedText, decodedResult) => {\n html5QrCode.stop().then((ignore) => {\n // QR Code scanning is stopped.\n }).catch((err) => {\n // Stop failed, handle it.\n });\n this.showResult(decodedText)\n },\n (errorMessage) => {\n // parse error, ignore it.\n }\n )\n .catch((err) => {\n // Start failed, handle it.\n });\n }\n }).catch(err => {\n // handle err\n });\n }\n\n showResult(res) {\n this.resultTarget.classList.remove('hidden')\n if (res.includes(\"/qrCodeReader?type=unit&qr_code_id\")) {\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `${i18n.t('unit.unit')}: ${res}`);\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `GO`);\n document.getElementById('go_btn').click()\n }\n else if (res.includes(\"/qr?ty=un&qi\")) {\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `${i18n.t('unit.unit')}: ${res}`);\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `GO`);\n document.getElementById('go_btn').click()\n }\n else if (res.includes(\"/qrCodeReader?type=amenity&qr_code_id\")) {\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `${i18n.t('amenity.amenity')}: ${res}`);\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `GO`);\n document.getElementById('go_btn').click()\n }\n else if (res.includes(\"/qr?ty=am&qi\")) {\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `${i18n.t('amenity.amenity')}: ${res}`);\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `GO`);\n document.getElementById('go_btn').click()\n }\n else if (res.includes(\"/qr?ty=mat&qi=\")) {\n fetch(`/materials/search_by_field?field=qr_code_id&value=${res.split(\"/qr?ty=mat&qi=\").at(-1)}`,\n {\n method: 'GET',\n headers: {\n \"Content-Type\": \"application/json\",\n 'X-CSRF_Token': $('meta[name=\"csrf-token\"]').attr('content')\n }\n })\n .then(response => response.json())\n .then(data => {\n if (data.found == \"ok\"){\n if (document.getElementById('scanned_material_form')) {\n document.getElementById('scanned_material_form').classList.remove('hidden')\n this.outputDataTarget.innerHTML = data.object.name\n document.getElementById('material_id').value = data.object.id\n }\n else {\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `\n

    ${i18n.t('material.material')} : ${data.object.name}

    \n

    ${i18n.t('material.category')} : ${data.object.category}

    \n

    ${i18n.t('material.total_quantity')} : ${data.object.quantity}

    \n `)\n\n\n data.object.material_quantities.forEach((material_quantity) => {\n let lastInventoryDate = material_quantity.inventory_date ? `| ${i18n.t('material.inventory_taken_on')}: ${material_quantity.inventory_date}` : ''\n this.outputDataTarget.insertAdjacentHTML('beforeend' , `\n
  • ${material_quantity.location_name} : ${material_quantity.quantity} ${lastInventoryDate}
  • `\n );\n })\n\n this.outputDataTarget.insertAdjacentHTML('beforeend' ,\n `\n \n \n \n \n `\n );\n }\n }\n })\n }\n else {\n $.ajax({\n url : `/search_by_qr_bar_code/`,\n type : 'GET',\n beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name=\"csrf-token\"]').attr('content'))},\n dataType : 'json',\n data: {link: res}\n })\n .then((data) => {\n if (data.link){\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `GO`);\n document.getElementById('go_btn').click()\n }\n else {\n if (data.hh_link == 'ok') {\n if (document.getElementById('scanned_material_form')){\n document.getElementById('scanned_material_form').classList.remove('hidden')\n this.outputDataTarget.innerHTML = data.object.name\n document.getElementById('material_id').value = data.object.id\n }\n else {\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `\n

    ${i18n.t('material.material')} : ${data.object.name}

    \n

    ${i18n.t('material.category')} : ${data.object.category || ' / ' }

    \n

    ${i18n.t('material.quantity')} : ${data.object.quantity}

    \n `\n )\n\n data.object.material_quantities.forEach((material_quantity) => {\n let lastInventoryDate = material_quantity.inventory_date ? `| ${i18n.t('material.inventory_taken_on')}: ${material_quantity.inventory_date}` : ''\n this.outputDataTarget.insertAdjacentHTML('beforeend' , `\n ${material_quantity.location_name} : ${material_quantity.quantity} ${lastInventoryDate}
    `\n );\n })\n\n this.outputDataTarget.insertAdjacentHTML('beforeend' ,\n `\n \n \n \n \n `\n );\n }\n }\n else {\n this.scanBtnTarget.classList.remove('hidden')\n this.outputDataTarget.insertAdjacentHTML('afterbegin' , `${i18n.t('shared.unknown_item_scanned')} : ${res}`);\n }\n }\n })\n }\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n connect() {\n if (this.element.dataset.manualLoad === 'true') {\n window.ReactOnRails.reactOnRailsPageLoaded()\n }\n }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { Modal } from \"bootstrap\"\n\nexport default class extends Controller {\n\tconnect() {\n\t\tthis.modal = new Modal(this.element)\n\t\tthis.modal.show()\n\t}\n\n\thideBeforeRender(event) {\n\t\tif (this.isOpen()) {\n\t\t\tevent.preventDefault()\n\t\t\tthis.element.addEventListener('hidden.bs.modal', event.detail.resume)\n\t\t\tthis.modal.hide()\n\t\t}\n\t}\n\n\tisOpen() {\n\t\treturn this.element.classList.contains(\"show\")\n\t}\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n\n get csrfToken() { return document.head.querySelector(\"meta[name='csrf-token']\").getAttribute(\"content\") }\n\n removeUser(event) {\n const linkId = event.currentTarget.dataset.link\n const conversationId = event.currentTarget.dataset.conversation\n // this.link = document.querySelector(\"#\" + linkId)\n fetch(`/conversations/${conversationId}/remove_user?link=${linkId}`, \n {\n method: 'DELETE',\n headers: {\n \"Accept\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken\n }\n })\n .then((response) => {\n if (!response.ok) {\n throw new Error('Network response was not OK');\n }\n return response.blob();\n })\n .then( event.currentTarget.parentElement.remove())\n .catch((error) => {\n console.error('There has been a problem with your fetch operation:', error);\n });\n }\n}","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['report_type', 'fields']\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n get report_type_id() { return this.report_typeTarget.dataset.reportType }\n\n\n switch() {\n var old_value = this.report_typeTarget.dataset.active\n if (old_value == 'Y') {\n var new_value = false\n var active = 'N'\n this.fieldsTarget.classList.add('hidden')\n } else {\n var new_value = true\n var active = 'Y'\n this.fieldsTarget.classList.remove('hidden')\n }\n this.report_typeTarget.dataset.active = active\n\n fetch(`/report_types/${this.report_type_id}`, {\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify({\n report_type: {\n active: new_value\n }\n }),\n method: 'PATCH',\n })\n .then(response => response.json())\n .then(data => {\n\n })\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['field_row']\n\n edit(event) {\n const selected_value = event.target.dataset.value\n\n fetch(`/report_types/${this.report_type_id}`, {\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify({\n report_type: {\n [this.field]: selected_value\n }\n }),\n method: 'PATCH',\n })\n .then(response => response.json())\n .then(_data => {\n Array.from(this.field_rowTarget.querySelectorAll('td.report_type_choice')).forEach((element) => {\n if (element.dataset.value == selected_value) {\n element.innerHTML = ' '\n } else {\n element.innerHTML = ` `\n }\n })\n })\n }\n\n get field() { return this.field_rowTarget.dataset.field }\n get report_type_id() { return this.field_rowTarget.dataset.reportType }\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n\n static targets = ['field']\n static values = { index: Number, field: String }\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n toggle(event) {\n\n const role = event.target.dataset.role\n const selected_value = event.target.dataset.value\n\n if (this.indexValue) {\n fetch(`/report_types/${this.indexValue}/update_permissions`, {\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify({\n role: role,\n value: selected_value == 'true' ? true : false,\n field: this.fieldValue\n }),\n method: 'PATCH',\n }).then(response => response.json())\n .then(_data => {\n this.fieldTarget\n .querySelectorAll(`button[data-role=\"${role}\"]`)\n .forEach(element => {\n if (element.dataset.value == selected_value) {\n element.classList.add('active')\n } else {\n element.classList.remove('active')\n }\n })\n })\n } else {\n this.fieldTarget\n .querySelectorAll(`button[data-role=\"${role}\"]`)\n .forEach(element => {\n if (element.dataset.value == selected_value) {\n element.classList.add('active')\n document.getElementById(`prefiltering-${role}`).value = false\n } else {\n element.classList.remove('active')\n document.getElementById(`prefiltering-${role}`).value = true\n }\n })\n }\n\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['row']\n\n updateMandatory(e) {\n const selectedValue = e.target.dataset.value\n\n fetch(`/report_types/${this.reportTypeId}/update_report_field_link.json`, {\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify({\n link_id: this.fieldLinkId,\n mandatory: selectedValue\n }),\n method: 'PATCH'\n })\n .then(response => response.json())\n .then(data => {\n if (data.errors) { return alert(data.errors) }\n\n Array.from(this.rowTarget.querySelectorAll('td.report_type_choice')).forEach((element) => {\n const elementValue = element.dataset.value\n const label = element.dataset.label || ''\n\n if (elementValue === selectedValue) {\n element.innerHTML = ` ${label}`\n } else {\n element.innerHTML = `${label}`\n }\n })\n })\n }\n\n get reportTypeId() { return this.rowTarget.dataset.reportTypeId }\n get fieldLinkId() { return this.rowTarget.dataset.fieldLinkId }\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['responsible_div', 'selector', 'prefiltering_div']\n\n connect() {\n this.responsible_mode_changed()\n }\n\n responsible_mode_changed() {\n if (this.selectorTarget.value == 'responsible') {\n this.responsible_divTarget.classList.remove('hidden')\n this.responsible_divTarget.querySelector('select').required = true\n } else {\n this.responsible_divTarget.classList.add('hidden')\n this.responsible_divTarget.querySelector('select').required = false\n }\n }\n\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"dateInputs\", \"startDate\", \"endDate\"]\n\n toggleDateInputs(e) {\n if (e.target.value === '') {\n this.dateInputsTarget.classList.add('hidden')\n this.startDateTarget.required = false\n this.endDateTarget.required = false\n } else {\n this.dateInputsTarget.classList.remove('hidden')\n this.startDateTarget.required = true\n this.endDateTarget.required = true\n }\n }\n\n setEndDateMin() {\n this.endDateTarget.setAttribute('min', this.startDateTarget.value)\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['responsible', 'type', 'unit', 'status']\n\n filter() {\n window.location.assign(`/${this.url}`)\n }\n\n get url() {\n return `?report_type_id=${this.type_value}&unit_id=${this.unit_value}&responsible_id=${this.responsible_value}&status=${this.status_value}`\n }\n\n get type_value() {\n return this.typeTarget.value\n }\n\n get unit_value() {\n return this.unitTarget.value\n }\n\n get responsible_value() {\n return this.responsibleTarget.value\n }\n\n get status_value() {\n return this.statusTarget.value\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['title', 'spinner']\n\n /*\n This page can be reached AFTER triggering the PDF generation (ie: via report show page)\n Or BEFORE triggering the PDF generation (ie: via work_reports index page)\n In the first case, the pdfid dataset will have a value on connect\n In the second case, the pdfid dataset will be empty on connect\n */\n\n connect() {\n if (this.titleTarget.dataset.pdfid === '') {\n this.generateFullReport()\n } else {\n this.getPdfData()\n }\n }\n\n generateFullReport() {\n fetch(`/reports/${this.titleTarget.dataset.reportid}/generate_full_report`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': $('meta[name=\"csrf-token\"]').attr('content')\n }\n }\n ).then(response => response.json())\n .then(data => {\n this.titleTarget.dataset.pdfid = data.response.attributes.table.id\n this.getPdfData()\n })\n }\n\n getPdfData() {\n fetch(`/reports/${this.titleTarget.dataset.reportid}/pdf_status?document_id=${this.titleTarget.dataset.pdfid}`)\n .then(response => response.json())\n .then(data => {\n switch (data.status) {\n case 'success':\n this.downloadPdf(data.download_url)\n break\n default:\n this.displayError()\n }\n })\n }\n\n downloadPdf(download_url) {\n window.location.replace(download_url)\n this.spinnerTarget.classList.remove('spinner')\n this.titleTarget.innerText = `${window.i18n.t('report.report_downloaded')}`\n }\n\n displayError() {\n this.spinnerTarget.classList.remove('spinner')\n this.spinnerTarget.innerHTML = ''\n this.titleTarget.innerText = `${window.i18n.t('report.error_generating_report')}`\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = [\n 'userEquipments',\n 'userId',\n 'assets',\n 'userEquipmentsSelector',\n 'assetSelectorMode',\n 'assetsBtn',\n 'userEquipmentsBtn',\n 'unitRequired',\n 'amenityRequired'\n ]\n\n connect() {\n // On connect, load current_user's equipments and existing reports\n if (this.hasAssetSelectorModeTarget && this.hasAssetsTarget) {\n this.assetSelectorModeTarget.classList.remove('hidden')\n this.assetsTarget.classList.add('hidden')\n this.userEquipmentsTarget.classList.add('hidden')\n this.assetsBtnTarget.classList.remove('btn-primary')\n this.assetsBtnTarget.classList.add('btn-outline-primary')\n this.userEquipmentsBtnTarget.classList.remove('btn-primary')\n this.userEquipmentsBtnTarget.classList.add('btn-outline-primary')\n // If equip or unit is required, show user equip by default\n if (this.amenityRequired || this.unitRequired) {\n this.userEquipmentsTarget.classList.remove('hidden')\n this.userEquipmentsBtnTarget.classList.add('btn-primary')\n this.userEquipmentsBtnTarget.classList.remove('btn-outline-primary')\n }\n this.loadUserEquipments()\n }\n }\n\n async loadUserEquipments() {\n const data = await this.getUserEquipments(this.user_id)\n if (data.length > 0) {\n if (this.activeTab === 'assets') { this.toggleAssets() }\n if (this.activeTab === 'userEquipments') { this.toggleUserEquipments() }\n if (this.assetSelectorModeTarget.classList.contains('hidden')) {\n this.assetSelectorModeTarget.classList.remove('hidden')\n }\n // Load user equipments\n this.userEquipmentsSelectorTarget.innerHTML = ''\n this.userEquipmentsSelectorTarget.insertAdjacentHTML('beforeend', `\n \n `\n )\n data.forEach(line => {\n this.userEquipmentsSelectorTarget.insertAdjacentHTML('beforeend', `\n \n `\n )\n })\n } else {\n // Set assets to active tab\n this.activeTab = 'assets'\n this.toggleAssets()\n // Hide mode selector\n this.assetSelectorModeTarget.classList.add('hidden')\n this.assetsTarget.classList.remove('hidden')\n }\n }\n\n toggleAssets() {\n this.assetsBtnTarget.classList.add('btn-primary')\n this.assetsBtnTarget.classList.remove('btn-outline-primary')\n this.userEquipmentsBtnTarget.classList.remove('btn-primary')\n this.userEquipmentsBtnTarget.classList.add('btn-outline-primary')\n this.assetsTarget.classList.remove('hidden')\n this.userEquipmentsTarget.classList.add('hidden')\n this.userEquipmentsSelectorTarget.value = ''\n\n // Remove `required` attribute on user equipment field & add to assets fields\n if (this.amenityRequired) {\n this.assetsTarget.querySelector('#amenityFilter').setAttribute('required', true)\n this.userEquipmentsTarget.querySelector('#user_amenity').removeAttribute('required')\n }\n }\n\n toggleUserEquipments() {\n this.assetsBtnTarget.classList.remove('btn-primary')\n this.assetsBtnTarget.classList.add('btn-outline-primary')\n this.userEquipmentsBtnTarget.classList.add('btn-primary')\n this.userEquipmentsBtnTarget.classList.remove('btn-outline-primary')\n this.assetsTarget.classList.add('hidden')\n this.userEquipmentsTarget.classList.remove('hidden')\n\n // Remove `required` attribute on asset fields & add to user equipment field\n if (this.amenityRequired) {\n const amenityField = this.assetsTarget.querySelector('#amenityFilter')\n if (amenityField && amenityField.querySelector('select')) {\n amenityField.querySelector('select').removeAttribute('required')\n }\n this.userEquipmentsTarget.querySelector('#user_amenity').setAttribute('required', true)\n }\n }\n\n getUserEquipments(user_id) {\n return fetch(`/equipment_usages.json?user_id=${user_id}&stop=nil&unit_id=${this.unitId}`, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n return data\n })\n }\n\n setUserEquipmentsActive() {\n this.activeTab = 'userEquipments'\n this.toggleUserEquipments()\n }\n\n setAssetsActive() {\n this.activeTab = 'assets'\n this.toggleAssets()\n }\n\n setUnitId(event) {\n this.unitId = event.target.value\n this.loadUserEquipments()\n }\n\n get activeTab() { return this._activeTab }\n set activeTab(newTab) { this._activeTab = newTab }\n\n get unitId() { return this._unitId }\n set unitId(newId) { this._unitId = newId }\n\n get user_id() { return this.userIdTarget.value }\n get unitRequired() { return this.unitRequiredTarget.dataset.required === 'true' }\n get amenityRequired() { return this.amenityRequiredTarget.dataset.required === 'true' }\n\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"input\", \"eye\"]\n\n toggleField() {\n if (this.inputTarget.attributes['type'].value === \"password\") {\n this.inputTarget.attributes['type'].value = 'text'\n this.eyeTarget.innerHTML = ''\n } else {\n this.inputTarget.attributes['type'].value = 'password'\n this.eyeTarget.innerHTML = ''\n }\n }\n}","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\"assetId\", \"assetType\", \"unitDiv\", \"equipDiv\"]\n\n connect() {\n }\n\n get csrfToken() { return document.head.querySelector(`meta[name=\"csrf-token\"]`).getAttribute(\"content\") }\n\n selectUnit(event){\n var unit_id = event.target.value\n if (unit_id != \"\") {\n this.assetIdTarget.value = unit_id\n this.assetTypeTarget.value = \"Unit\"\n while (event.target.parentElement.nextElementSibling) {\n event.target.parentElement.nextElementSibling.remove()\n }\n }\n else {\n if (event.target.parentElement.previousElementSibling){\n unit_id = event.target.parentElement.previousElementSibling.querySelector(\"select\").value\n this.assetIdTarget.value = unit_id\n this.assetTypeTarget.value = \"Unit\"\n while (event.target.parentElement.nextElementSibling) {\n event.target.parentElement.nextElementSibling.remove()\n }\n event.target.parentElement.remove()\n }\n else {\n this.assetIdTarget.value = \"\"\n this.assetTypeTarget.value = \"\"\n while (event.target.parentElement.nextElementSibling) {\n event.target.parentElement.nextElementSibling.remove()\n }\n }\n }\n \n this.equipDivTarget.innerHTML = \"\"\n \n fetch(`/units/${unit_id}/children_units.json`, {\n headers: { \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken }\n })\n .then(response => response.json())\n .then(data => {\n if (data != \"\" && data != null && data.length > 0) {\n this.unitDivTarget.insertAdjacentHTML('beforeend',\n `
    \n
    `)\n }\n const unit_select_divs = Array.from(this.unitDivTarget.querySelectorAll(\".unit_lvl\"))\n unit_select_divs.forEach((selector) => {\n selector.style.marginLeft = `${unit_select_divs.indexOf(selector) }rem`\n })\n fetch(`/amenities.json?unit=${unit_id}&paginated=false&subtree=false&content=short`, {\n method: 'GET',\n headers: { \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken }\n })\n .then(response => response.json())\n .then(data => {\n \n if (data != \"\" && data != null && data.length > 0) {\n document.getElementById(\"equip_label\").classList.remove('hidden')\n this.equipDivTarget.insertAdjacentHTML('afterbegin',\n `
    \n
    `)\n }\n else {\n document.getElementById(\"equip_label\").classList.add('hidden')\n }\n })\n })\n }\n\n selectEquip(event){\n const equip_id = event.target.value\n if (equip_id != \"\") {\n this.assetIdTarget.value = equip_id\n this.assetTypeTarget.value = \"Amenity\"}\n else {\n if (event.target.parentElement.previousElementSibling){\n this.assetIdTarget.value = event.target.parentElement.previousElementSibling.querySelector(\"select\").value\n this.assetTypeTarget.value = \"Amenity\"\n }\n else {\n const unit_select_list = this.unitDivTarget.querySelectorAll(\"select\")\n const last_unit_div = unit_select_list[unit_select_list.length - 1]\n if (last_unit_div.value != \"\"){\n this.assetIdTarget.value = last_unit_div.value\n this.assetTypeTarget.value = \"Unit\"\n }\n else {\n if (last_unit_div.parentElement.previousElementSibling){\n this.assetIdTarget.value = last_unit_div.parentElement.previousElementSibling.querySelector(\"select\").value\n this.assetTypeTarget.value = \"Unit\"\n }\n else {\n this.assetIdTarget.value = \"\"\n this.assetTypeTarget.value = \"\"\n }\n }\n }\n }\n while (event.target.parentElement.nextElementSibling) {\n event.target.parentElement.nextElementSibling.remove()\n }\n if (equip_id != \"\") {\n\n fetch(`/amenities/${equip_id}/children_amenities.json`, {\n method: 'GET',\n headers: { \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken }\n })\n .then(response => response.json())\n .then(data => {\n \n if (data != \"\" && data != null && data.length > 0) {\n this.equipDivTarget.insertAdjacentHTML('beforeend',\n `
    \n
    `)\n }\n const equip_select_divs = Array.from(this.equipDivTarget.querySelectorAll(\".equip_lvl\"))\n equip_select_divs.forEach((selector) => {\n selector.style.marginLeft = `${equip_select_divs.indexOf(selector) }rem`\n })\n })\n }\n }\n\n \n}","import Chart from 'chart.js/auto'\n\nimport { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['daterange', 'amenityType','reportType', 'unit', 'amenity', 'expertise', 'user', 'company_selector', 'anomaly']\n\n connect() {\n this.showGraphs()\n this.populate_tables()\n }\n\n fetchData() {\n this.showGraphs()\n this.populate_tables()\n }\n\n showGraphs() {\n this.element.querySelectorAll('.stat_graph').forEach(graph => {\n switch (graph.dataset.graph) {\n case 'repartition':\n this.doughnut(graph)\n break\n case 'tickets':\n this.line(graph)\n break\n case 'cumulative':\n this.line(graph)\n break\n case 'responsible':\n this.line(graph)\n break\n case 'cumulative_cost_per_cost_type':\n this.cumulative_line(graph)\n break\n case 'dashboard':\n this.dashboard(graph)\n break\n\n case 'cumulative_cost_per_report_type':\n this.cumulative_line(graph)\n break\n case 'cumulative_hours_per_report_type':\n this.cumulative_line(graph)\n break\n case 'pie_hours_per_report_type':\n this.doughnut(graph)\n break\n case 'pie_cost_per_cost_type':\n this.doughnut(graph)\n break\n case 'pie_cost_per_report_type':\n this.doughnut(graph)\n break\n case 'monthly_tickets_stats':\n this.line(graph)\n break\n\n case 'stop_time_ratios':\n this.stacked_bar(graph)\n break\n case 'stop_times':\n this.stacked_bar(graph)\n break\n case 'status_pie':\n this.status_pie(graph)\n break\n\n case 'todos_status_pie':\n this.status_pie(graph)\n break\n case 'late_tasks_graph':\n this.stacked_bar(graph)\n break\n\n // ADMIN CHARTS\n case 'admin_monthly_new_tickets':\n this.admin_bar(graph)\n break\n case 'admin_cumulative_new_tickets':\n this.admin_line(graph)\n break\n case 'admin_monthly_closed_maintenances':\n this.admin_bar(graph)\n break\n case 'admin_cumulative_closed_maintenances':\n this.admin_line(graph)\n break\n\n default:\n }\n })\n }\n\n get from() {\n if (this.daterangeTarget.value) {\n const dates = this.daterangeTarget.value.split('-')\n return dates[0]\n } else {\n return new Date((new Date()).setMonth((new Date()).getMonth()-1))\n }\n }\n\n get to() {\n if (this.daterangeTarget.value) {\n const dates = this.daterangeTarget.value.split('-')\n return dates[1]\n } else {\n return new Date()\n }\n }\n\n get expertise_id() {\n return this.expertiseTarget.value\n }\n\n get report_type_id() {\n return this.reportTypeTarget.value\n }\n\n get amenity_type_id() {\n return this.amenityTypeTarget.value\n }\n\n get amenity_id() {\n return this.amenityTarget.value\n }\n\n get unit_id() {\n return this.unitTarget.value\n }\n\n get anomaly_id() {\n return this.anomalyTarget.value || ''\n }\n\n get company_id() {\n if (document.getElementById('company_id')) {\n return document.getElementById('company_id').value\n } else {\n return ''\n }\n }\n\n get dateRangeParams() {\n return `from=${this.from}&to=${this.to}`\n }\n\n get allParams() {\n return `company_id=${this.company_id}&${this.dateRangeParams}&unit_id=${this.unit_id}&amenity_id=${this.amenity_id}&amenity_type_id=${this.amenity_type_id}&report_type_id=${this.report_type_id}&expertise_id=${this.expertise_id}&anomaly_id=${this.anomaly_id}`\n }\n\n line(elem) {\n fetch(`/companies/stat_graph_data?graph=${elem.dataset.graph}&${this.allParams}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // clear previous chart\n elem.innerHTML = ''\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n elem.appendChild(canvas)\n new Chart(canvas, {\n type: 'line',\n data: data,\n options: {\n maintainAspectRatio: false,\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n })\n })\n }\n\n dashboard(elem) {\n fetch(`/companies/stat_graph_data?graph=tickets&company_id=${this.company_id}&${this.dateRangeParams}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // clear previous chart\n elem.innerHTML = ''\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n elem.appendChild(canvas)\n new Chart(canvas, {\n data: data,\n options: {\n maintainAspectRatio: true,\n scales: {\n y: {\n grid: { display: false },\n stacked: true,\n beginAtZero: true\n },\n x: {\n grid: { display: false }\n }\n }\n }\n })\n })\n }\n\n doughnut(elem) {\n fetch(`/companies/stat_graph_data?graph=${elem.dataset.graph}&${this.allParams}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // clear previous chart\n elem.innerHTML = ''\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n elem.appendChild(canvas)\n new Chart(canvas, {\n type: 'doughnut',\n data: data,\n options: {\n layout: {\n padding: 20\n },\n maintainAspectRatio: false,\n 'plugins': {\n 'legend': {\n 'display': true,\n 'position': 'right',\n 'align': 'start'\n }\n },\n legend: {\n position: 'bottom',\n labels: {\n boxWidth: 8,\n fontFamily: 'futura',\n usePointStyle: true\n }\n },\n }\n })\n })\n }\n\n cumulative_line(elem) {\n fetch(`/companies/stat_graph_data?graph=${elem.dataset.graph}&${this.allParams}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // clear previous chart\n elem.innerHTML = ''\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n elem.appendChild(canvas)\n new Chart(canvas, {\n type: 'line',\n data: data,\n options: {\n maintainAspectRatio: false,\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n })\n })\n }\n\n admin_line(elem) {\n fetch(`/admin/statistics/graph_data?graph=${elem.dataset.graph}&${this.dateRangeParams}&company_id=${this.company_selectorTarget.value}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // clear previous chart\n elem.innerHTML = ''\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n elem.appendChild(canvas)\n new Chart(canvas, {\n type: 'line',\n data: data,\n options: {\n maintainAspectRatio: false,\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n })\n }\n )\n }\n\n admin_bar(elem) {\n fetch(`/admin/statistics/graph_data?graph=${elem.dataset.graph}&${this.dateRangeParams}&company_id=${this.company_selectorTarget.value}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // clear previous chart\n elem.innerHTML = ''\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n elem.appendChild(canvas)\n new Chart(canvas, {\n type: 'bar',\n data: data,\n options: {\n maintainAspectRatio: false,\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n })\n }\n )\n }\n\n stacked_bar(elem) {\n fetch(`/companies/stat_graph_data?graph=${elem.dataset.graph}&${this.allParams}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // clear previous chart\n elem.innerHTML = ''\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n elem.appendChild(canvas)\n new Chart(canvas, {\n type: 'bar',\n data: data,\n options: {\n maintainAspectRatio: false,\n scales: {\n x: {\n stacked: true\n },\n y: {\n stacked: true\n }\n }\n }\n })\n })\n }\n\n populate_tables() {\n\n this.element.querySelectorAll('.stat_table').forEach(table => {\n switch (table.dataset.table) {\n case 'top_amenities_with_most_stops':\n this.stops_table(table)\n break\n case 'top_amenities_with_longest_downtime':\n this.stops_table(table)\n break\n default:\n }\n })\n }\n\n stops_table(elem) {\n fetch(`/companies/stat_table_data?table=${elem.dataset.table}&${this.allParams}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n elem.innerHTML = ''\n data.forEach(line => {\n const row = document.createElement('tr')\n const amenity = document.createElement('td')\n const amenity_type = document.createElement('td')\n const unit = document.createElement('td')\n const stops_count = document.createElement('td')\n const total_downtime = document.createElement('td')\n\n if (line.amenity_id)\n {\n amenity.innerHTML = `${line.amenity}`\n amenity_type.innerHTML = line.amenity_type\n }\n unit.innerHTML = `${line.unit}`\n stops_count.innerHTML = line.stops_count\n total_downtime.innerHTML = line.total_downtime\n\n row.appendChild(amenity)\n row.appendChild(amenity_type)\n row.appendChild(unit)\n row.appendChild(stops_count)\n row.appendChild(total_downtime)\n\n elem.appendChild(row)\n })\n })\n }\n\n status_pie(elem) {\n const for_self = this.daterangeTarget.dataset.forSelf\n fetch(`/companies/stat_graph_data?graph=${elem.dataset.graph}&for_self=${for_self}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n elem.innerHTML = ''\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n elem.appendChild(canvas)\n const counter = {\n id: 'counter',\n beforeDraw(chart, args, options) {\n const { ctx, chartArea: { top, right, bottom, left, width, height} } = chart\n ctx.save()\n\n ctx.beginPath()\n ctx.arc(75, 75, 30, 0, 2 * Math.PI)\n ctx.fillStyle = '#CC82E5'\n ctx.fill()\n ctx.font = options.fontSize + ' ' + options.fontFamily\n ctx.textAlign = 'center'\n ctx.fillStyle = options.fontColor\n ctx.fillText(data.total, width / 2, top + (height / 1.85))\n }\n }\n let chart = new Chart(canvas, {\n type: 'doughnut',\n data,\n plugins: [counter],\n options: {\n onHover: (event, chartElement) => {\n event.native.target.style.cursor = chartElement[0] ? 'pointer' : 'default'\n },\n responsive: true,\n parsing: {\n key: 'count'\n },\n plugins: {\n legend: { display: false },\n labels: {\n // render 'label', 'value', 'percentage', 'image' or custom function, default is 'percentage'\n render: 'value'\n },\n tooltip: {\n enabled: true\n },\n counter: {\n fontColor: 'white',\n fontSize: '1rem',\n fontFamily: 'sans-serif'\n }\n },\n },\n })\n\n canvas.onclick = function(evt) {\n var activePoints = chart.getElementsAtEventForMode(evt, 'nearest', { intersect: true }, true)\n if (activePoints.length) {\n var firstPoint = activePoints[0]\n var label = chart.data.labels[firstPoint.index]\n var value = chart.data.datasets[firstPoint.datasetIndex].data[firstPoint.index]\n window.location.href = value.link\n }\n }\n })\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n \n\n connect() {\n document.getElementById('drop-task').querySelectorAll('button.btn-close').forEach((elem) => {\n elem.onclick = function() {\n window.calendar.refetchEvents()\n window.calendar.render()\n // location.reload()\n }\n })\n }\n\n cancel(event) {\n document.getElementById('drop-task').querySelectorAll('button.btn-close').forEach((elem) => {\n elem.click()\n })\n // location.reload()\n window.calendar.getEventById(event.target.dataset.eventid).remove()\n }\n\n submit() {\n document.getElementById('drop-task').querySelectorAll('button.btn-close').forEach((elem) => {\n elem.click()\n })\n }\n} ","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n static targets = ['table']\n\n startDrag(e) {\n this.sourceRow = e.target\n }\n\n enterRow(e) {\n e.preventDefault()\n e.target.closest('th').classList.add('border-start')\n e.target.closest('th').classList.add('border-primary-subtle')\n }\n\n leaveRow(e) {\n e.target.closest('th').classList.remove('border-start')\n e.target.closest('th').classList.remove('border-primary-subtle')\n }\n\n dropRow(e) {\n e.preventDefault()\n this.targetRow = e.target.closest('th')\n this.targetRow.classList.remove('border-start')\n this.targetRow.classList.remove('border-primary-subtle')\n\n if (!this.validRequest()) { return }\n\n fetch('/table_displays/update_default_column_order', {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n method: 'PATCH',\n body: JSON.stringify({\n source_index: this.sourceIndex,\n target_index: this.targetIndex,\n table_name: this.tableName\n })\n })\n .then(response => response.json())\n .then(data => {\n window.location.replace(data.redirect)\n })\n }\n\n validRequest() {\n if (this.sourceIndex === this.targetIndex) { return false }\n if (this.targetIndex === '0') { return false }\n return true\n }\n\n set sourceRow(row) { this._sourceRow = row }\n get sourceRow() { return this._sourceRow }\n\n set targetRow(row) { this._targetRow = row }\n get targetRow() { return this._targetRow }\n\n get sourceIndex() { return this.sourceRow.dataset.index }\n get targetIndex() { return this.targetRow.dataset.index }\n\n get tableName() { return this.tableTarget.dataset.tableName }\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n static targets = [\n 'main_div' ,\n 'existingTableDisplayId',\n 'newTableDisplayName'\n ]\n\n select_all(event) {\n var checkboxes = event.target.closest('.form-check-parent').querySelectorAll('input[type=\"checkbox\"]')\n checkboxes.forEach(checkbox => {\n checkbox.checked = true\n })\n }\n\n deselect_all(event) {\n var checkboxes = event.target.closest('.form-check-parent').querySelectorAll('input[type=\"checkbox\"]')\n checkboxes.forEach(checkbox => {\n checkbox.checked = false\n })\n document.getElementById('id').checked = true\n }\n\n apply(event, save=false) {\n var checkboxes = event.target.closest('.form-check-parent').querySelectorAll('input[type=\"checkbox\"]')\n var selected_columns = []\n\n checkboxes.forEach(checkbox => {\n if (checkbox.checked) {\n selected_columns.push(checkbox.value)\n }\n })\n\n var url = '/table_displays/update_default_columns'\n var csrfToken = this.csrfToken\n var data = {\n selected_columns: selected_columns.join(','),\n table_name: this.tableName,\n save: save\n }\n\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': csrfToken\n },\n body: JSON.stringify(data)\n })\n .then(response => response.json())\n .then(data => {\n window.location.replace(data.redirect)\n })\n .catch((_error) => {\n window.location.reload()\n })\n }\n\n get tableName() { return this.main_divTarget.getAttribute('data-table-name') }\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n static targets = ['deleteBtn']\n\n confirm(event) {\n event.preventDefault()\n this.deleteBtnTarget.classList.remove('text-danger')\n this.deleteBtnTarget.innerHTML = `\n \n ${window.i18n.t('actions.confirm')}?\n \n `\n this.deleteBtnTarget.removeAttribute('data-action')\n }\n\n}\n","import Choices from 'choices.js'\nimport { Controller } from '@hotwired/stimulus'\nimport dayjs from 'dayjs'\n\nexport default class extends Controller {\n\n static targets = [\n 'main_div',\n 'filter_selector_div',\n 'active_filters_div',\n ]\n\n select_filter(event) {\n var filter_id = event.target.value\n var filter_name = event.target.options[event.target.selectedIndex].text\n var filter_type = event.target.options[event.target.selectedIndex].getAttribute('data-filter')\n\n switch(filter_type) {\n case 'free_text':\n this.add_text_filter(filter_id, filter_name, filter_type)\n break\n case 'date':\n this.add_date_filter(filter_id, filter_name, filter_type)\n break\n case 'date_time':\n this.add_date_time_filter(filter_id, filter_name, filter_type)\n break\n case 'multiple_choice':\n this.add_multiple_choice_filter(filter_id, filter_name, filter_type)\n break\n case 'true_false':\n this.add_boolean_filter(filter_id, filter_name, filter_type)\n break\n default:\n this.add_text_filter(filter_id, filter_name, filter_type)\n break\n }\n event.target.options[event.target.selectedIndex].remove()\n event.target.selectedIndex = 0\n\n this.saveFilter(filter_id, filter_type)\n }\n\n saveFilter(filter_column, filter_type) {\n const value = filter_type === 'multiple_choice' ? [] : ''\n const data = {\n filter_column: filter_column,\n filter_value: value,\n filter_type: filter_type,\n table_name: this.tableName\n }\n fetch('/table_displays/update_default_filters', {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify(data)\n }).then(response => response.json())\n }\n\n add_boolean_filter(filter_id, filter_name, filter_type) {\n const newBooleanFilter = `\n
    \n \n \n
    \n `\n this.active_filters_divTarget.insertAdjacentHTML('beforeend', newBooleanFilter)\n\n const options = [\n { value: '', label: window.i18n.t('shared.all') },\n { value: 'true', label: window.i18n.t('shared._yes') },\n { value: 'false', label: window.i18n.t('shared._no') }\n ]\n\n const selector = document.getElementById(`${filter_id}Selector`)\n const choice = new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n\n choice.setChoices(\n options,\n 'value',\n 'label',\n false\n )\n\n selector.setAttribute('data-action', 'change->table-display--filters-selector#apply_filter')\n }\n\n add_text_filter(filter_id, filter_name, filter_type) {\n const newInput = `\n
    \n \n table-display--filters-selector#apply_filter\" id=\"${filter_id}Input\">\n
    \n `\n this.active_filters_divTarget.insertAdjacentHTML('beforeend', newInput)\n\n const input = document.getElementById(`${filter_id}Input`)\n new Choices(input, {\n maxItemCount: 1,\n duplicateItemsAllowed: false,\n allowHTML: true,\n addItemText: 'Press Enter to add'\n })\n }\n\n async add_multiple_choice_filter(filter_id, filter_name, filter_type) {\n const response = await fetch(`/table_displays/column_select_options?table_name=${this.tableName}&column_name=${filter_id}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n\n const newSelectFilter = `\n
    \n \n \n
    \n `\n this.active_filters_divTarget.insertAdjacentHTML('beforeend', newSelectFilter)\n\n const options = await response.json()\n const selectChoices = []\n options.forEach((option) => {\n selectChoices.push({\n value: option.value,\n label: option.label\n })\n })\n\n const selector = document.getElementById(`${filter_id}Selector`)\n const choice = new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n\n choice.setChoices(\n selectChoices,\n 'value',\n 'label',\n false\n )\n\n selector.setAttribute('data-action', 'change->table-display--filters-selector#apply_filter')\n }\n\n add_date_filter(filter_id, filter_name, filter_type) {\n this.active_filters_divTarget.insertAdjacentHTML('beforeend', `\n
    \n \n table-display--filters-selector#apply_filter\" id=\"${filter_id}\"\n class=\"filter_selector launch-mobiscroll choices__inner\"\n data-script=\"mobiscrollDateRangeClick\"\n data-skip-clear='true'\n mbsc-input=\"\">\n
    \n `\n )\n }\n\n add_date_time_filter(filter_id, filter_name, filter_type) {\n this.active_filters_divTarget.insertAdjacentHTML('beforeend', `\n
    \n \n table-display--filters-selector#apply_filter\" id=\"${filter_id}\"\n class=\"filter_selector launch-mobiscroll choices__inner\"\n data-script=\"mobiscrollTimeRangeClick\"\n data-default-start=\"${dayjs().startOf('day')}\"\n data-default-stop=\"${dayjs().endOf('day')}\"\n data-skip-clear='true'\n mbsc-input=\"\">\n
    \n `\n )\n }\n\n async apply_filter(event){\n if (event.currentTarget.dataset.firstLoad && event.currentTarget.dataset.firstLoad === 'true') {\n event.currentTarget.dataset.firstLoad = 'false'\n return\n }\n const url = '/table_displays/update_default_filters'\n const filter_column = event.target.closest('[data-filter-id]').dataset.filterId\n const filter_type = event.target.closest('[data-filter-type]').dataset.filterType\n const filter_value = filter_type === 'multiple_choice' ? Array.from(event.target.selectedOptions).map(option => option.value) : event.target.value\n const data = {\n filter_column: filter_column,\n filter_value: filter_value,\n filter_type: filter_type,\n table_name: this.tableName\n }\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify(data)\n })\n .then(response => response.json())\n .then(_data => {\n fetch(this.element.dataset.fetch, {\n headers: { Accept: 'text/vnd.turbo-stream.html' }\n })\n .then(r => r.text())\n .then(html => Turbo.renderStreamMessage(html))\n })\n .catch((_error) => {\n window.location.reload()\n })\n }\n\n remove_filter(event) {\n event.target.closest('div').remove()\n var url = '/table_displays/remove_default_filter'\n var filter_column = event.target.closest('div').dataset.filterId\n var data = {\n filter_column: filter_column,\n table_name: this.tableName\n }\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify(data)\n })\n .then(response => response.json())\n .then(_data => {\n fetch(this.element.dataset.fetch, {\n headers: { Accept: 'text/vnd.turbo-stream.html' }\n })\n .then(r => r.text())\n .then(html => Turbo.renderStreamMessage(html))\n })\n .catch((_error) => {\n window.location.reload()\n })\n }\n\n get tableName() { return this.main_divTarget.getAttribute('data-table-name') }\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n static targets = ['container']\n\n fetch() {\n const form = document.querySelector('form')\n const action = form.action\n const queryString = new URLSearchParams({\n label_per_row: form.querySelector('#qr_codes_label_per_row').value,\n label_per_column: form.querySelector('#qr_codes_label_per_column').value,\n label_width: form.querySelector('#qr_codes_label_width').value,\n label_height: form.querySelector('#qr_codes_label_height').value,\n page_vertical_margin: form.querySelector('#qr_codes_page_vertical_margin').value,\n page_horizontal_margin: form.querySelector('#qr_codes_page_horizontal_margin').value\n }).toString()\n\n fetch(`${action}?${queryString}`)\n .then(response => response.json())\n .then(data => {\n const jobId = data.job.job_id\n const jobProviderId = data.job.job_provider_id\n\n this.containerTarget.innerHTML = ''\n this.containerTarget.textContent = `${i18n.t('shared.processing')}`\n\n this.timer = setInterval(() => {\n this.checkJobStatus(jobId, jobProviderId)\n }, 1000)\n })\n }\n\n checkJobStatus(jobId, jobProviderId) {\n fetch(`/export_status?job_id=${jobId}&job_provider_id=${jobProviderId}`)\n .then(response => response.json())\n .then(data => {\n this.containerTarget.textContent = `${i18n.t('shared.processing')}`\n\n if (data.status == 'error') {\n this.stopCheckJobStatus()\n } else if (data.status === 'complete') {\n this.stopCheckJobStatus()\n this.containerTarget.textContent = `${i18n.t('shared.processing_completed')}`\n this.containerTarget.insertAdjacentHTML('afterend', `${i18n.t('shared.file_sent_to_your_email_address')}`)\n }\n })\n }\n\n stopCheckJobStatus() {\n if(this.timer) {\n clearInterval(this.timer)\n }\n }\n\n disconnect() {\n this.stopCheckJobStatus()\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n\n filter() {\n const search = this.element.querySelector('input').value\n fetch(`${this.element.dataset.fetch}?search=${search}`, {\n headers: { Accept: 'text/vnd.turbo-stream.html' }\n })\n .then(r => r.text())\n .then(html => Turbo.renderStreamMessage(html))\n }\n\n clear() {\n this.element.querySelector('input').value = ''\n fetch(this.element.dataset.fetch, {\n headers: { Accept: 'text/vnd.turbo-stream.html' }\n })\n .then(r => r.text())\n .then(html => Turbo.renderStreamMessage(html))\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n\tstatic targets = []\n\n connect() {\n this.attacheListener();\n }\n\n attacheListener() {\n this.element.addEventListener('click', (e) => {\n\n // e.preventDefault();\n if (e.target.hasAttribute('data-type') && e.target.classList.contains('nav-link')) {\n this.filterList(e.target.getAttribute('data-type'));\n this.element.querySelector('.active').classList.remove('active');\n e.target.classList.add('active');\n }\n })\n }\n\n filterList(filterValue) {\n this.element.querySelectorAll('.list-group-item').forEach(element => {\n if (element.getAttribute('data-type') !== filterValue && filterValue !== \"all\") {\n element.classList.add('hidden');\n element.setAttribute('aria-hidden', true);\n } else {\n element.classList.remove('hidden');\n element.setAttribute('aria-hidden', false);\n }\n });\n }\n\n goToToday() {\n document.getElementById('today').scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n }\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\n\nexport default class extends Controller {\n static targets = ['line', 'lineDiv', 'editDiv', 'editBtn', 'deleteBtn', 'range', 'allDay', 'userids', 'doer', 'endedat', 'comment']\n\n get csrfToken() { return document.head.querySelector('meta[name=\\'csrf-token\\']').getAttribute('content') }\n\n get PeriodId() {\n return this.lineTarget.dataset.ptt\n }\n\n get Start() {\n return this.lineTarget.dataset.start\n }\n\n get Stop() {\n if (this.lineTarget.dataset.stop == null) {\n return this.lineTarget.dataset.start\n }\n return this.lineTarget.dataset.stop\n }\n\n get commentRequired() {\n const value = this.commentTarget.dataset.commentRequired\n return !(value == '0' || value == 'false')\n }\n\n\n showEdit() {\n this.lineTarget.classList.add('bg-light')\n this.lineTarget.dataset.action = 'click->todos--period-to-todo#hideEdit'\n this.allDayRange()\n }\n\n hideEdit() {\n this.lineTarget.classList.remove('bg-light')\n this.lineTarget.dataset.action = 'click->todos--period-to-todo#showEdit'\n this.editDivTarget.innerHTML = ''\n }\n\n update() {\n fetch(`/period_to_todos/${this.PeriodId}`,\n {\n method: 'PATCH',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify({\n period_to_todo: {\n start: this.rangeTarget.value.split(' - ')[0],\n stop: this.rangeTarget.value.split(' - ')[1],\n all_day: this.allDayTarget.value\n }\n })\n })\n .then((data) => {\n return data.json()\n })\n .then((data) => {\n this.lineTarget.dataset.start = data.period_to_todo.start\n this.lineTarget.dataset.stop = data.period_to_todo.stop\n this.lineTarget.innerText = data.date\n\n this.hideEdit()\n\n })\n }\n\n doneAndApprove(event) {\n\n const doer = this.doerTarget.value\n const ended_at = this.endedatTarget.value\n const comment = this.commentTarget.value\n const todo_id = event.currentTarget.dataset.todo\n\n if (this.commentRequired && !comment) { return alert(i18n.t('todo.error.must_have_closing_comment'))}\n\n fetch(`/to_do_items/${todo_id}/approve_from_calendar`,\n {\n method: 'PATCH',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n body: JSON.stringify({\n doer: doer,\n ended_at: ended_at,\n comment: comment\n })\n })\n .then((data) => {\n return data.json()\n })\n .then(() => {\n this.fetchAndClose(event)\n\n })\n }\n\n approve(event) {\n\n var todo_id = event.currentTarget.dataset.todo\n\n fetch(`/to_do_items/${todo_id}/approve_from_calendar`,\n {\n method: 'PATCH',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n },\n })\n .then((data) => {\n return data.json()\n })\n .then(() => {\n this.fetchAndClose(event)\n })\n }\n\n\n\n\n duplicate(event) {\n\n var user_ids = []\n user_ids = Array.from(this.useridsTarget.options).map(option => option.value)\n .join(',')\n\n fetch(`/period_to_todos/${this.PeriodId}/duplicate?user_ids=${user_ids}`,\n {\n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then((data) => {\n return data.json()\n })\n .then(() => {\n this.fetchAndClose(event)\n })\n }\n\n delete() {\n fetch(`/period_to_todos/${this.PeriodId}`,\n {\n method: 'DELETE',\n headers: {\n 'Accept': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(() => {\n this.lineDivTarget.remove()\n if (window.calendar) {\n window.calendar.refetchEvents()\n }\n })\n }\n\n allDayRange() {\n this.editDivTarget.innerHTML = ''\n this.editDivTarget.insertAdjacentHTML('afterbegin',`\n
    \n \n todos--period-to-todo#timeRange\">\n \n \n
    \n `)\n }\n\n timeRange() {\n this.editDivTarget.innerHTML = ''\n this.editDivTarget.insertAdjacentHTML('afterbegin',`\n
    \n \n todos--period-to-todo#allDayRange\">\n \n \n
    \n `)\n }\n\n fetchAndClose(event) {\n if (window.calendar) {\n window.calendar.refetchEvents()\n }\n var closeBtn = event.target.closest('.modal').querySelector('.btn-close')\n if (closeBtn) {\n closeBtn.click()\n }\n }\n\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['startTask']\n\n checkForAlert(e) {\n if (this.startTaskTarget.checked && this.startTaskTarget.dataset.ongoingTask == 'true') {\n if (!confirm(window.i18n.t('todo.ongoing_task_warning'))) {\n e.preventDefault()\n }\n }\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n static targets = ['filters', 'button', 'icon']\n\n connect() {\n this.buttonTarget.addEventListener('click', () => this.toggleFilters())\n }\n\n toggleFilters() {\n if (this.filtersTarget.classList.contains('hide_mobile')) {\n this.filtersTarget.classList.add('show_mobile')\n this.filtersTarget.classList.remove('hide_mobile')\n } else if (this.filtersTarget.classList.contains('show_mobile')) {\n this.filtersTarget.classList.remove('show_mobile')\n this.filtersTarget.classList.add('hide_mobile')\n }\n this.iconTarget.classList.toggle('fa-arrow-up-wide-short')\n this.iconTarget.classList.toggle('fa-arrow-down-wide-short')\n }\n}\n","import Choices from 'choices.js'\nimport { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = ['container', 'unitId', 'amenityId']\n\n connect() {\n const selector = this.element.querySelector('.js-choice-root-unit')\n new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n selector.addEventListener('change', (e) => this.updateFilters(e))\n this.nextUnitLevel = 1\n\n if (document.getElementById('amenityFilter') && document.getElementById('amenitySelector')) {\n const amSelector = document.getElementById('amenitySelector')\n amSelector.addEventListener('change', (e) => this.updateAmenityFilters(e))\n }\n\n const event = new Event('change')\n selector.dispatchEvent(event)\n }\n\n get unitId() {\n return this.unitIdTarget.value\n }\n\n set unitId(newId) {\n this.unitIdTarget.value = newId\n }\n\n get amenityId() {\n return this.amenityIdTarget.value\n }\n\n set amenityId(newId) {\n this.amenityIdTarget.value = newId\n }\n\n get nextUnitLevel() {\n return this._nextUnitLevel\n }\n\n set nextUnitLevel(value) {\n this._nextUnitLevel = value\n }\n\n get reportTypeId() {\n if (document.getElementById('report_report_type_id')) {\n return document.getElementById('report_report_type_id').value\n } else {\n return ''\n }\n }\n\n updateFilters(e) {\n const selectedUnitId = e.target.value\n const currentUnitLevel = parseInt(e.target.closest('.unit-level').getAttribute('data-level'))\n\n this.deletePreviousSubUnitFilters(currentUnitLevel)\n this.nextUnitLevel = currentUnitLevel + 1\n this.unitId = selectedUnitId\n if (selectedUnitId !== '') {\n const choice = this.newChoiceInstance()\n this.populateFilterChoices(selectedUnitId, choice)\n this.nextUnitLevel += 1\n }\n\n if (selectedUnitId === '' && currentUnitLevel !== 0) {\n const parentUnitValue = document.getElementById(`level${currentUnitLevel - 1}`)\n this.unitId = parentUnitValue.value\n }\n if (document.getElementById('amenityFilter')) {\n this.populateAmenties()\n }\n\n // Manually trigger 'change' event for calendar re-render\n var event = new Event('change')\n this.unitIdTarget.dispatchEvent(event)\n }\n\n deletePreviousSubUnitFilters(currentUnitLevel) {\n document.querySelectorAll('.unit-level').forEach(element => {\n if (parseInt(element.getAttribute('data-level')) > currentUnitLevel) {\n element.remove()\n }\n })\n }\n\n newChoiceInstance() {\n let containerClass = 'js-choice-container'\n if (this.containerTarget.hasAttribute('data-large-containers')) {\n containerClass = 'js-choice-container-large'\n }\n const newSelect = `\n
    \n \n \n
    \n `\n document.querySelector('.unit-filters-container').insertAdjacentHTML('beforeEnd', newSelect)\n\n const selector = document.getElementById(`level${this.nextUnitLevel}`)\n const choice = new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n selector.addEventListener('change', (e) => this.updateFilters(e))\n\n return choice\n }\n\n async populateFilterChoices(selectedUnitId, choice) {\n const subUnits = []\n const data = await this.fetchSubUnits(selectedUnitId)\n\n data.forEach((unit) => {\n subUnits.push({\n value: unit.id,\n label: unit.name\n })\n })\n\n choice.setChoices(\n subUnits,\n 'value',\n 'label',\n false\n )\n }\n\n fetchSubUnits(selectedUnitId) {\n return fetch(`/units/${selectedUnitId}/children_units.json`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => data)\n }\n\n async populateAmenties() {\n this.amenityId = ''\n document.getElementById('amenityFilter').innerHTML = ''\n const amenities = []\n const data = await this.fetchAmenities()\n data.forEach((amenity) => {\n amenities.push({\n value: amenity.id,\n label: amenity.name\n })\n })\n\n\n\n const choice = this.newAmenitiesInstance()\n choice.setChoices(\n amenities,\n 'value',\n 'label',\n false\n )\n }\n\n get amenityRequired() {\n return this.amenityIdTarget.dataset.mandatory === 'true'\n }\n\n newAmenitiesInstance() {\n const mandatory_label = this.amenityRequired ? '*' : ''\n const mandatory_select = this.amenityRequired ? 'required' : ''\n const newSelect = `\n \n ${mandatory_label}\n \n `\n\n document.getElementById('amenityFilter').innerHTML = ''\n document.getElementById('amenityFilter').insertAdjacentHTML('beforeEnd', newSelect)\n\n const selector = document.getElementById('amenitySelector')\n const choice = new Choices(selector, {\n resetScrollPosition: false,\n removeItemButton: true,\n itemSelectText: '',\n allowHTML: true,\n searchResultLimit: 10\n })\n selector.addEventListener('change', (e) => this.updateAmenityFilters(e))\n\n return choice\n }\n\n\n fetchAmenities() {\n let archived = ''\n if (this.amenityIdTarget.dataset.archived) {\n archived = `&archived=${this.amenityIdTarget.dataset.archived}`\n }\n\n return fetch(`/amenities.json?unit=${this.unitId}&report_type=${this.reportTypeId}&paginated=false&content=short&subtree=false${archived}`, {\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then(data => data)\n }\n\n updateAmenityFilters(e) {\n const selectedAmenityId = e.target.value\n this.amenityId = selectedAmenityId\n const event = new Event('change')\n this.amenityIdTarget.dispatchEvent(event)\n }\n\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n static targets = ['query', 'resultsDiv']\n\n search() {\n if (this.queryTarget.value.length > 2) {\n fetch(`/units/rep_search?q=${this.queryTarget.value}`, {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n this.resultsDivTarget.innerHTML = ''\n data.response.results.forEach(line => {\n this.resultsDivTarget.insertAdjacentHTML('beforeend', `\n \n
  • \n
    \n
    \n ${line.name}\n
    \n
    \n ${line.full_address}\n
    \n
    \n
  • \n
    \n `)\n })\n })\n }\n else\n {\n this.resultsDivTarget.innerHTML = ''\n }\n }\n\n}\n\n\n","import { Controller } from \"@hotwired/stimulus\"\nexport default class extends Controller {\n static targets = [\"line\"];\n\n get csrfToken() { return document.head.querySelector(\"meta[name='csrf-token']\").getAttribute(\"content\") }\n\n delete() {\n\n fetch(`/allocations/${this.lineTarget.dataset.id}`,\n\t\t\t{\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\theaders: {\n\t\t\t\t\t\"Accept\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken\n\t\t\t\t}\n\t\t\t})\n .then( \n this.lineTarget.remove()\n )\n };\n}\n","import { Controller } from '@hotwired/stimulus'\nimport { i18n } from '../../src/config/i18n.js'\nexport default class extends Controller {\n static targets = ['button']\n\n get csrfToken() { return document.head.querySelector('meta[name=\"csrf-token\"]').getAttribute('content') }\n\n sendInstructions() {\n if (this.buttonTarget.dataset.disabled) return\n fetch(this.buttonTarget.dataset.url,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF_Token': this.csrfToken\n }\n })\n .then(response => response.json())\n .then((data) => {\n if (data.success) {\n this.buttonTarget.classList.add('btn-success')\n this.buttonTarget.classList.remove('btn-outline-primary')\n this.buttonTarget.style.removeProperty('cursor')\n this.buttonTarget.innerText = `${i18n.t('user.password_reset_sent')}`\n this.buttonTarget.dataset.disabled = true\n }\n })\n }\n}\n","import Chart from 'chart.js/auto'\nimport { Controller } from '@hotwired/stimulus'\nexport default class extends Controller {\n static targets = [\n 'userid',\n 'userchoices',\n 'daterange',\n 'timelist',\n 'hoursgraph',\n 'ticketlist',\n 'ticketgraph',\n 'todolist',\n 'todograph',\n 'latetodolist',\n 'lateTasksGraph'\n ]\n\n greet() {\n if (this.userchoicesTarget.querySelectorAll('option').length > 0 && this.daterangeTarget.value) {\n this.getTimeList(this.user_id)\n this.getHoursGraph(this.user_id)\n this.getTicketList(this.user_id)\n this.getTicketGraph(this.user_id)\n this.getTodoList(this.user_id)\n this.getTodoGraph(this.user_id)\n this.getLateList(this.user_id)\n this.getLateGraph(this.user_id)\n }\n }\n\n get user_id() {\n // return the ID of selected user\n return this.useridTarget.value?.slice(5)\n }\n\n get from() {\n // split the date range into two parts\n const dates = this.daterangeTarget.value.split('-')\n return dates[0]\n }\n\n get to() {\n const dates = this.daterangeTarget.value.split('-')\n return dates[1]\n }\n\n // create a function to make a request to the server to get the todo list for a user\n getTodoList(userid) {\n // fetch the todo list for the user\n this.todolistTarget.innerHTML = ''\n fetch(`/users/${userid}/get_todo_list?from=${this.from}&to=${this.to}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // loop through the todo list and add each item to the todo list table as a row\n data.forEach(todo => {\n const row = document.createElement('tr')\n const td1 = document.createElement('td')\n const td2 = document.createElement('td')\n const td3 = document.createElement('td')\n const td4 = document.createElement('td')\n const td5 = document.createElement('td')\n const td6 = document.createElement('td')\n const td7 = document.createElement('td')\n const td8 = document.createElement('td')\n const td9 = document.createElement('td')\n const td10 = document.createElement('td')\n const td11 = document.createElement('td')\n\n td1.innerHTML = `${todo.ref_number}`\n td2.innerHTML = todo.title\n td3.innerHTML = todo.status\n td4.innerHTML = todo.created_at\n td5.innerHTML = todo.created_by\n td6.innerHTML = todo.ended_at\n td7.innerHTML = todo.ended_by\n td8.innerHTML = todo.closed_at\n td9.innerHTML = todo.closed_by\n td10.innerHTML = todo.unit\n td11.innerHTML = todo.amenity\n\n row.appendChild(td1)\n row.appendChild(td2)\n row.appendChild(td3)\n row.appendChild(td4)\n row.appendChild(td5)\n row.appendChild(td6)\n row.appendChild(td7)\n row.appendChild(td8)\n row.appendChild(td9)\n row.appendChild(td10)\n row.appendChild(td11)\n\n this.todolistTarget.appendChild(row)\n })\n })\n }\n\n getTodoGraph(userid) {\n this.todographTarget.innerHTML = ''\n fetch(`/users/${userid}/get_todo_graph?from=${this.from}&to=${this.to}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n this.todographTarget.appendChild(canvas)\n\n new Chart(canvas, {\n type: 'bar',\n data: data,\n options: {\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n })\n })\n }\n\n // fetch the todo list for the user\n getTimeList(userid) {\n // Do not fetch if hours are not counted\n if (!this.hasTimelistTarget) return\n\n // Fetch hours\n this.timelistTarget.innerHTML = ''\n fetch(`/users/${userid}/get_hours_list?from=${this.from}&to=${this.to}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // loop through the todo list and add each item to the todo list table as a row\n data.forEach(line => {\n let row = document.createElement('tr')\n let td1 = document.createElement('td')\n let td2 = document.createElement('td')\n let td3 = document.createElement('td')\n let td4 = document.createElement('td')\n let td5 = document.createElement('td')\n\n td1.innerHTML = line.date\n td2.innerHTML = `${line.ref_number}`\n td3.innerHTML = line.title\n td4.innerHTML = `${String(Math.floor(line.quantity / 3600)).padStart(2, '0')}:${String(Math.floor(line.quantity % 3600 / 60)).padStart(2, '0')}`\n td5.innerHTML = `${line.total_price} ${line.currency}`\n\n row.appendChild(td1)\n row.appendChild(td2)\n row.appendChild(td3)\n row.appendChild(td4)\n row.appendChild(td5)\n\n this.timelistTarget.appendChild(row)\n })\n })\n }\n\n getHoursGraph(userid) {\n // Do not fetch if hours are not counted\n if (!this.hasHoursgraphTarget) return\n\n // fetch the todo list for the user\n this.hoursgraphTarget.innerHTML = ''\n fetch(`/users/${userid}/get_hours_graph?from=${this.from}&to=${this.to}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n this.hoursgraphTarget.appendChild(canvas)\n\n new Chart(canvas, {\n type: 'bar',\n data: data,\n options: {\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n })\n })\n }\n\n getTicketList(userid) {\n // fetch the todo list for the user\n this.todolistTarget.innerHTML = ''\n fetch(`/users/${userid}/get_new_ticket_list?from=${this.from}&to=${this.to}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n // loop through the todo list and add each item to the todo list table as a row\n data.forEach(todo => {\n const row = document.createElement('tr')\n const td1 = document.createElement('td')\n const td2 = document.createElement('td')\n const td3 = document.createElement('td')\n const td4 = document.createElement('td')\n const td5 = document.createElement('td')\n const td6 = document.createElement('td')\n\n td1.innerHTML = todo.created_at\n td2.innerHTML = `${todo.report_number}`\n td3.innerHTML = todo.title\n td4.innerHTML = todo.status\n td5.innerHTML = todo.unit\n td6.innerHTML = todo.amenity\n\n row.appendChild(td1)\n row.appendChild(td2)\n row.appendChild(td3)\n row.appendChild(td4)\n row.appendChild(td5)\n row.appendChild(td6)\n\n this.ticketlistTarget.appendChild(row)\n })\n })\n }\n\n getTicketGraph(userid) {\n this.ticketgraphTarget.innerHTML = ''\n fetch(`/users/${userid}/get_new_ticket_graph?from=${this.from}&to=${this.to}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n this.ticketgraphTarget.appendChild(canvas)\n\n new Chart(canvas, {\n type: 'bar',\n data: data,\n options: {\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n })\n })\n }\n\n getLateList(userid) {\n this.latetodolistTarget.innerHTML = ''\n fetch(`/users/${userid}/get_late_todo_list?from=${this.from}&to=${this.to}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n data.forEach(todo => {\n const row = document.createElement('tr')\n const td1 = document.createElement('td')\n const td2 = document.createElement('td')\n const td4 = document.createElement('td')\n const td5 = document.createElement('td')\n const td6 = document.createElement('td')\n\n const td10 = document.createElement('td')\n const td11 = document.createElement('td')\n\n td1.innerHTML = `${todo.ref_number}`\n td2.innerHTML = todo.title\n td4.innerHTML = todo.created_at\n td5.innerHTML = todo.created_by\n var warning = ''\n if (todo.late == 'true') { warning = ' ' }\n td6.innerHTML = `${warning} ${todo.scheduled_at}`\n td10.innerHTML = todo.unit\n td11.innerHTML = todo.amenity\n\n row.appendChild(td1)\n row.appendChild(td2)\n row.appendChild(td4)\n row.appendChild(td5)\n row.appendChild(td6)\n\n row.appendChild(td10)\n row.appendChild(td11)\n\n this.latetodolistTarget.appendChild(row)\n })\n })\n }\n\n getLateGraph(userid) {\n this.lateTasksGraphTarget.innerHTML = ''\n fetch(`/statistics/user_late_tasks_graph?user_id=${userid}&from=${this.from}&to=${this.to}`,\n {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n })\n .then(response => response.json())\n .then(data => {\n let canvas = document.createElement('canvas')\n canvas.classList.add('chart')\n this.lateTasksGraphTarget.appendChild(canvas)\n\n new Chart(canvas, {\n type: 'bar',\n data: data,\n options: {\n scales: {\n x: {\n stacked: true\n },\n y: {\n beginAtZero: true,\n stacked: true,\n ticks: {\n stepSize: 1\n }\n }\n }\n }\n })\n })\n }\n}\n","// Sentry Initialization\nimport * as Sentry from '@sentry/browser'\n\nSentry.init({\n dsn: 'https://2052724d9d78c32a586b2227619eab46@o570099.ingest.sentry.io/4506621488136192',\n environment: window.env,\n enabled: window.env === 'production' || window.env === 'staging',\n integrations: [\n Sentry.browserTracingIntegration(),\n Sentry.replayIntegration({\n maskAllText: true,\n blockAllMedia: true,\n })\n ]\n})\n\n// Localization\nimport { I18n } from 'i18n-js'\nimport translations from '../src/config/translations.json'\n\n// Fetch user locale from html#lang.\n// This value is being set on `app/views/layouts/application.html.erb` and\n// is inferred from `ACCEPT-LANGUAGE` header.\nwindow.i18n = new I18n()\nwindow.i18n.store(translations)\nwindow.i18n.defaultLocale = 'en'\nwindow.i18n.enableFallback = true\n\nimport Rails from '@rails/ujs'\nimport '@hotwired/turbo-rails'\nRails.start()\nrequire('turbolinks').start()\nrequire('@rails/activestorage').start()\n\n\n// To remove when stop using fullcalendar\nimport 'jquery'\nimport $ from 'jquery'\nwindow.jQuery = $\nwindow.$ = $\nrequire('jquery')\n// import 'chart.js'\n// import Choices from 'choices.js'\n// import moment from 'moment-timezone'\n// import ModuleLoader from './abstracts/_moduleLoader'\n// ModuleLoader\n\n\n// Stimulus initialization\nimport { Application } from '@hotwired/stimulus'\nimport { definitionsFromContext } from '@hotwired/stimulus-webpack-helpers'\n\nwindow.Stimulus = Application.start()\nconst context = require.context('../controllers', true, /\\.js$/)\nStimulus.load(definitionsFromContext(context))\n\n// React on Rails initialization\nimport './react-bundle.js'\n\n// Bootstrap tooltips\nimport 'bootstrap'\nimport { Tooltip } from 'bootstrap'\n\ndocument.addEventListener('turbolinks:load', () => {\n // Both of these are from the Bootstrap 5 docs\n var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle=\"tooltip\"]'))\n var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {\n return new Tooltip(tooltipTriggerEl)\n })\n})\n","// app/javascript/config/i18n.ts\nimport { I18n } from 'i18n-js'\nimport translations from './translations.json'\n\n// Fetch user locale from html#lang.\n// This value is being set on `app/views/layouts/application.html.erb` and\n// is inferred from `ACCEPT-LANGUAGE` header.\nconst userLocale = document.documentElement.lang\n\nexport const i18n = new I18n()\ni18n.store(translations)\ni18n.defaultLocale = 'en'\ni18n.enableFallback = true\ni18n.locale = userLocale\n","var map = {\n\t\"./af\": 25177,\n\t\"./af.js\": 25177,\n\t\"./ar\": 61509,\n\t\"./ar-dz\": 41488,\n\t\"./ar-dz.js\": 41488,\n\t\"./ar-kw\": 58676,\n\t\"./ar-kw.js\": 58676,\n\t\"./ar-ly\": 42353,\n\t\"./ar-ly.js\": 42353,\n\t\"./ar-ma\": 24496,\n\t\"./ar-ma.js\": 24496,\n\t\"./ar-ps\": 6947,\n\t\"./ar-ps.js\": 6947,\n\t\"./ar-sa\": 82682,\n\t\"./ar-sa.js\": 82682,\n\t\"./ar-tn\": 89756,\n\t\"./ar-tn.js\": 89756,\n\t\"./ar.js\": 61509,\n\t\"./az\": 95533,\n\t\"./az.js\": 95533,\n\t\"./be\": 28959,\n\t\"./be.js\": 28959,\n\t\"./bg\": 47777,\n\t\"./bg.js\": 47777,\n\t\"./bm\": 54903,\n\t\"./bm.js\": 54903,\n\t\"./bn\": 61290,\n\t\"./bn-bd\": 17357,\n\t\"./bn-bd.js\": 17357,\n\t\"./bn.js\": 61290,\n\t\"./bo\": 31545,\n\t\"./bo.js\": 31545,\n\t\"./br\": 11470,\n\t\"./br.js\": 11470,\n\t\"./bs\": 44429,\n\t\"./bs.js\": 44429,\n\t\"./ca\": 7306,\n\t\"./ca.js\": 7306,\n\t\"./cs\": 56464,\n\t\"./cs.js\": 56464,\n\t\"./cv\": 73635,\n\t\"./cv.js\": 73635,\n\t\"./cy\": 64226,\n\t\"./cy.js\": 64226,\n\t\"./da\": 93601,\n\t\"./da.js\": 93601,\n\t\"./de\": 77853,\n\t\"./de-at\": 26111,\n\t\"./de-at.js\": 26111,\n\t\"./de-ch\": 54697,\n\t\"./de-ch.js\": 54697,\n\t\"./de.js\": 77853,\n\t\"./dv\": 60708,\n\t\"./dv.js\": 60708,\n\t\"./el\": 54691,\n\t\"./el.js\": 54691,\n\t\"./en-au\": 53872,\n\t\"./en-au.js\": 53872,\n\t\"./en-ca\": 28298,\n\t\"./en-ca.js\": 28298,\n\t\"./en-gb\": 56195,\n\t\"./en-gb.js\": 56195,\n\t\"./en-ie\": 66584,\n\t\"./en-ie.js\": 66584,\n\t\"./en-il\": 65543,\n\t\"./en-il.js\": 65543,\n\t\"./en-in\": 9033,\n\t\"./en-in.js\": 9033,\n\t\"./en-nz\": 79402,\n\t\"./en-nz.js\": 79402,\n\t\"./en-sg\": 43004,\n\t\"./en-sg.js\": 43004,\n\t\"./eo\": 32934,\n\t\"./eo.js\": 32934,\n\t\"./es\": 97650,\n\t\"./es-do\": 20838,\n\t\"./es-do.js\": 20838,\n\t\"./es-mx\": 17730,\n\t\"./es-mx.js\": 17730,\n\t\"./es-us\": 56575,\n\t\"./es-us.js\": 56575,\n\t\"./es.js\": 97650,\n\t\"./et\": 3035,\n\t\"./et.js\": 3035,\n\t\"./eu\": 3508,\n\t\"./eu.js\": 3508,\n\t\"./fa\": 119,\n\t\"./fa.js\": 119,\n\t\"./fi\": 90527,\n\t\"./fi.js\": 90527,\n\t\"./fil\": 95995,\n\t\"./fil.js\": 95995,\n\t\"./fo\": 52477,\n\t\"./fo.js\": 52477,\n\t\"./fr\": 85498,\n\t\"./fr-ca\": 26435,\n\t\"./fr-ca.js\": 26435,\n\t\"./fr-ch\": 37892,\n\t\"./fr-ch.js\": 37892,\n\t\"./fr.js\": 85498,\n\t\"./fy\": 37071,\n\t\"./fy.js\": 37071,\n\t\"./ga\": 41734,\n\t\"./ga.js\": 41734,\n\t\"./gd\": 70217,\n\t\"./gd.js\": 70217,\n\t\"./gl\": 77329,\n\t\"./gl.js\": 77329,\n\t\"./gom-deva\": 32124,\n\t\"./gom-deva.js\": 32124,\n\t\"./gom-latn\": 93383,\n\t\"./gom-latn.js\": 93383,\n\t\"./gu\": 95050,\n\t\"./gu.js\": 95050,\n\t\"./he\": 11713,\n\t\"./he.js\": 11713,\n\t\"./hi\": 43861,\n\t\"./hi.js\": 43861,\n\t\"./hr\": 26308,\n\t\"./hr.js\": 26308,\n\t\"./hu\": 90609,\n\t\"./hu.js\": 90609,\n\t\"./hy-am\": 17160,\n\t\"./hy-am.js\": 17160,\n\t\"./id\": 74063,\n\t\"./id.js\": 74063,\n\t\"./is\": 89374,\n\t\"./is.js\": 89374,\n\t\"./it\": 88383,\n\t\"./it-ch\": 21827,\n\t\"./it-ch.js\": 21827,\n\t\"./it.js\": 88383,\n\t\"./ja\": 23827,\n\t\"./ja.js\": 23827,\n\t\"./jv\": 89722,\n\t\"./jv.js\": 89722,\n\t\"./ka\": 41794,\n\t\"./ka.js\": 41794,\n\t\"./kk\": 27088,\n\t\"./kk.js\": 27088,\n\t\"./km\": 96870,\n\t\"./km.js\": 96870,\n\t\"./kn\": 84451,\n\t\"./kn.js\": 84451,\n\t\"./ko\": 63164,\n\t\"./ko.js\": 63164,\n\t\"./ku\": 98174,\n\t\"./ku-kmr\": 6181,\n\t\"./ku-kmr.js\": 6181,\n\t\"./ku.js\": 98174,\n\t\"./ky\": 78474,\n\t\"./ky.js\": 78474,\n\t\"./lb\": 79680,\n\t\"./lb.js\": 79680,\n\t\"./lo\": 15867,\n\t\"./lo.js\": 15867,\n\t\"./lt\": 45766,\n\t\"./lt.js\": 45766,\n\t\"./lv\": 69532,\n\t\"./lv.js\": 69532,\n\t\"./me\": 58076,\n\t\"./me.js\": 58076,\n\t\"./mi\": 41848,\n\t\"./mi.js\": 41848,\n\t\"./mk\": 30306,\n\t\"./mk.js\": 30306,\n\t\"./ml\": 73739,\n\t\"./ml.js\": 73739,\n\t\"./mn\": 99053,\n\t\"./mn.js\": 99053,\n\t\"./mr\": 86169,\n\t\"./mr.js\": 86169,\n\t\"./ms\": 73386,\n\t\"./ms-my\": 92297,\n\t\"./ms-my.js\": 92297,\n\t\"./ms.js\": 73386,\n\t\"./mt\": 77075,\n\t\"./mt.js\": 77075,\n\t\"./my\": 72264,\n\t\"./my.js\": 72264,\n\t\"./nb\": 22274,\n\t\"./nb.js\": 22274,\n\t\"./ne\": 8235,\n\t\"./ne.js\": 8235,\n\t\"./nl\": 92572,\n\t\"./nl-be\": 43784,\n\t\"./nl-be.js\": 43784,\n\t\"./nl.js\": 92572,\n\t\"./nn\": 54566,\n\t\"./nn.js\": 54566,\n\t\"./oc-lnc\": 69330,\n\t\"./oc-lnc.js\": 69330,\n\t\"./pa-in\": 29849,\n\t\"./pa-in.js\": 29849,\n\t\"./pl\": 94418,\n\t\"./pl.js\": 94418,\n\t\"./pt\": 79834,\n\t\"./pt-br\": 48303,\n\t\"./pt-br.js\": 48303,\n\t\"./pt.js\": 79834,\n\t\"./ro\": 24457,\n\t\"./ro.js\": 24457,\n\t\"./ru\": 82271,\n\t\"./ru.js\": 82271,\n\t\"./sd\": 1221,\n\t\"./sd.js\": 1221,\n\t\"./se\": 33478,\n\t\"./se.js\": 33478,\n\t\"./si\": 17538,\n\t\"./si.js\": 17538,\n\t\"./sk\": 5784,\n\t\"./sk.js\": 5784,\n\t\"./sl\": 46637,\n\t\"./sl.js\": 46637,\n\t\"./sq\": 86794,\n\t\"./sq.js\": 86794,\n\t\"./sr\": 45719,\n\t\"./sr-cyrl\": 3322,\n\t\"./sr-cyrl.js\": 3322,\n\t\"./sr.js\": 45719,\n\t\"./ss\": 56000,\n\t\"./ss.js\": 56000,\n\t\"./sv\": 41011,\n\t\"./sv.js\": 41011,\n\t\"./sw\": 40748,\n\t\"./sw.js\": 40748,\n\t\"./ta\": 11025,\n\t\"./ta.js\": 11025,\n\t\"./te\": 11885,\n\t\"./te.js\": 11885,\n\t\"./tet\": 28861,\n\t\"./tet.js\": 28861,\n\t\"./tg\": 86571,\n\t\"./tg.js\": 86571,\n\t\"./th\": 55802,\n\t\"./th.js\": 55802,\n\t\"./tk\": 59527,\n\t\"./tk.js\": 59527,\n\t\"./tl-ph\": 29231,\n\t\"./tl-ph.js\": 29231,\n\t\"./tlh\": 31052,\n\t\"./tlh.js\": 31052,\n\t\"./tr\": 85096,\n\t\"./tr.js\": 85096,\n\t\"./tzl\": 79846,\n\t\"./tzl.js\": 79846,\n\t\"./tzm\": 81765,\n\t\"./tzm-latn\": 97711,\n\t\"./tzm-latn.js\": 97711,\n\t\"./tzm.js\": 81765,\n\t\"./ug-cn\": 48414,\n\t\"./ug-cn.js\": 48414,\n\t\"./uk\": 16618,\n\t\"./uk.js\": 16618,\n\t\"./ur\": 57777,\n\t\"./ur.js\": 57777,\n\t\"./uz\": 57609,\n\t\"./uz-latn\": 72475,\n\t\"./uz-latn.js\": 72475,\n\t\"./uz.js\": 57609,\n\t\"./vi\": 21135,\n\t\"./vi.js\": 21135,\n\t\"./x-pseudo\": 64051,\n\t\"./x-pseudo.js\": 64051,\n\t\"./yo\": 82218,\n\t\"./yo.js\": 82218,\n\t\"./zh-cn\": 52648,\n\t\"./zh-cn.js\": 52648,\n\t\"./zh-hk\": 1632,\n\t\"./zh-hk.js\": 1632,\n\t\"./zh-mo\": 31541,\n\t\"./zh-mo.js\": 31541,\n\t\"./zh-tw\": 50304,\n\t\"./zh-tw.js\": 50304\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 35358;"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","Controller","static","initialize","momentTimezone","moment","this","cal","mobiscroll","datepicker","display","touchUi","controls","stepMinute","selectMultiple","dateFormat","timeFormat","select","showRangeLabels","firstDay","dataTimezone","displayTimezone","timezonePlugin","greet","daterangeTarget","value","from","to","getActivityData","user_id","useridTarget","unit_id","unitidTarget","amenity_id","amenityidTarget","amenity_type_id","amenitytypeidTarget","split","offset","document","getElementById","timelist","timelistTarget","fetch","method","headers","then","response","json","data","hoursgraphTarget","innerHTML","canvas","createElement","classList","add","appendChild","Chart","type","options","scales","y","beginAtZero","displayGraphs","getTaskList","taskTypeTarget","unitTarget","amenityTarget","amenityTypeTarget","task_type","unit","amenity","amenity_type","showTaskList","task_list","taskListTarget","forEach","line","row","td1","td2","td3","td4","td5","td6","td7","start_date","task_number","logoclass","title","unit_name","amenity_name","amenity_type_name","total_cost","cents","getHoursGraph","userid","slice","inputField","inputfieldTarget","showfieldform","replytypeTarget","multiplechoiceTarget","remove","values","JSON","stringify","Array","querySelectorAll","innerText","extrachoicesTarget","existingchoicesTarget","measurmenttypeTarget","showBtn","newchoiceTarget","length","buttonTarget","addValue","item","insertAdjacentHTML","event","target","parentNode","addMaterialToAmenity","materialId","currentTarget","dataset","triggerFetch","amenityId","material_to_amenity","material_id","csrfToken","body","listTarget","material","name","brand","head","querySelector","getAttribute","materialFields","i18n","t","requiredFields","filter","field","prepare_import","tableDataTarget","tableHeaderTarget","read_file","selectTr","headerTr","key","selectTh","fieldSelector","opt","text","th","tr","td","file","files","arrayBuffer","workbook","XLSX","sheet","Sheets","SheetNames","sheet_to_json","import","checkForRequiredFields","importData","alert","selectFields","element","fields","push","includes","fieldsMatching","importBtnTarget","replace","job_folder","fields_matching","company_id","companyTarget","jobId","job","job_id","jobProviderId","job_provider_id","progressTarget","textContent","timer","setInterval","checkJobStatus","percentage","importNumberValue","import_number","status","stopCheckJobStatus","deleteBtnTarget","href","clearInterval","disconnect","search","queryTarget","resultsDivTarget","results","address","toggleHidden","hiddenData","toggle","iconTarget","groupTarget","startDrag","sourceRow","rowType","sourceAmenityId","enterRow","preventDefault","closest","leaveRow","dropRow","targetRow","validRequest","parent_amenity_id","targetAmenityId","parent_unit_id","targetUnitId","errors","parent","removeParentToggle","newRow","treeStructureController","buildAmenityRow","updateView","sourceUnitId","buildUnitRow","undefined","confirm","parentToggle","contains","treeToggle","click","_sourceRow","_targetRow","_rowType","application","getControllerForElementAndIdentifier","duplicate","modelName","assetType","modelId","formTarget","formParams","all_keys","model_id","internal_identifier","serial_number","contracts","convertBoolean","checked","materials","providers","measurments","users","surfaces","maintenances","children","bool","showUnitChildren","developBtnTarget","action","unitId","reverse","parentLineTarget","showAmenityChildren","showLocationChildren","locationId","location","buildLocationRow","hideUnitChildren","unitAncestry","hideAmenityChildren","amenityAncestry","hideLocationChildren","locationAncestry","has_children","parseInt","depth","unit_ancestry","ancestry","responsible","amenityDropdownBtn","duplicateOption","beta_access","restricted_access","user","username","locationDropdownBtn","has_amenities","alt_name","managers","manager","unitDropdownBtn","close","companyId","idTarget","button","tagName","parentElement","parameter","company","toggle_roles","role","selected_value","_data","responsible_select","params","parameters","fromEntries","message","btn_to_saved","responsibleBtnTarget","set_default_deadline","deadline","default_deadline","deadlineBtnTarget","set_default_costs","defaultCostBtnTarget","btn_to_save","btnId","btnid","btn","contractId","amenityListTarget","connect","getAmenities","page_nb","page","totalCountTarget","total_count","paginateTarget","pages_count","Math","ceil","pages","i","li","div","setAttribute","addAllTarget","amenities","join","addToContract","contract_to_amenity","contract_id","linkedAmenities","addAllToContract","equipment_list","ids","window","reload","unitListTarget","getUnits","units","contract_to_unit","linkedUnits","unit_list","typeSelectionInputTarget","typeSelectionTarget","checkSubmit","checkAutoRenew","submitBtn","revealTypeSelection","typeCreationInputTarget","selectTypeBtnTarget","typeCreationTarget","createTypeBtnTarget","revealTypeCreation","formSubmitable","checkTypeValuePresence","disabled","autoRenewalTarget","renewalDurationInputTarget","amenityTypeIds","amenityTypeIdsTarget","option","addLink","customFieldIdTarget","amenityTypeListTarget","amenityType","removeLink","_","showCustomFields","modelType","modelTypeTarget","fieldsListTarget","entries","classes","reply_type","newInputDiv","createFreeTextField","createMultipleChoiceField","createBooleanField","createDateField","createDateTimeField","createNumberField","newTextField","lastElementChild","newMultipleChoiceField","selectChoices","choice","label","selector","Choices","resetScrollPosition","removeItemButton","itemSelectText","allowHTML","searchResultLimit","setChoices","newBooleanField","newDateField","newDateTimeField","newNumberField","pluralizedModelType","preferences","dashboard","graph","pageTarget","addEventListener","toggleFilters","filtersTarget","style","borderColor","color","labels","showChoice","inputChoice","inputsTarget","input","buttonsTarget","getreports","reportlist","report","created_at","expertise","description","setUnitId","setAmenityId","_unitId","newId","_amenityId","reportlistTarget","unlinkUser","lineTarget","expertise_id","unlinkProvider","provider_id","provider","export","fetchUrl","fetchurl","reqparams","downloadTarget","percentageText","dataTransfer","setData","effectAllowed","dropEffect","sourceRowCopy","cloneNode","after","getData","questionOrder","questionId","templateId","order","selectionInputTarget","selectionTarget","selectBtnTarget","revealSelection","creationInputTarget","inputTypeTarget","creationTarget","createBtnTarget","revealCreation","checkValuePresence","check","toggleSelectAll","selectAllBtnTarget","inputs","checkBoxesTarget","calendarEl","calendar","lateTasksTarget","Draggable","itemSelector","eventData","eventEl","extendedProps","status_color","colorstatus","logo_class","elemid","todoid","to_do_id","unitid","userId","nav","pageDivTarget","ul","span","link","nextPage","removeAttribute","link2","goToPage","list","locationTarget","responsible_id","responsibleTarget","expertiseTarget","performer_id","performerTarget","unitText","responsibleText","expertiseText","performerText","todo","root","root_unit_id","duration","div_1","div_2","div_3","report_priority_name","display_todo_date","html","fragment","createRange","createContextualFragment","createDraggable","render","filterLocation","taskDivTarget","task","lateCount","lateDivTarget","unassignedCount","unassignedDivTarget","lateCounterTarget","unassignedCounterTarget","assign","userids","useridsTarget","employeeids","employeeidsTarget","dates","datesTarget","todo_id","closeBtn","addBtnTarget","refetchEvents","saveBtnTarget","edit","offday_id","offday","start","startTarget","stop","stopTarget","type_id","typeTarget","dayoff_type_id","delete","FullCalendar","newReportsTarget","tasknumber","link_2","created_since","showTechnicians","techniciansTarget","providersTarget","usethis","provideridTarget","btnTechniciansTarget","btnProvidersTarget","required","showProviders","showProviderUsers","providerid","result","providerUsersTarget","buildUserSelector","providerUserSelector","setProviderUserId","assignation","date","dateTarget","maintenance_id","maintenance","notify","notifyTarget","original_date","task_id","taskId","auto_assign","providerUserId","_providerUserId","toggleSidebar","updateButtonContent","sidebarTarget","calendarTarget","navTarget","expanded","elem","onclick","cancel","getEventById","eventid","submit","jobName","jobTarget","jobFolder","delete_first","importMaintenanceJob","console","log","import_job","delete_first_line","parentDataType","hasParentDataTarget","parentDataTarget","importServiceProvidersJob","importServiceProviderContactsJob","importMaterialsJob","importMaterialLocationsJob","importMaterialQuantitiesJob","importMaterialSupplierPricesAndSuppliersJob","updateAmenityParentsJob","importMaterialOrdersJob","importMaterialOrderLinesJob","importUnitsJob","importMaterialToAmenitiesJob","importGammeJob","importCheckListJob","importPreventifJob","parent_data_type","selectDefaultContact","contactId","invoiceContactId","default_invoice_contact_id","elementId","shouldSort","maxItemCount","duplicateItemsAllowed","addItemText","inputTarget","script","mobiscrollDate","mobiscrollDateClick","mobiscrollDateTime","mobiscrollDateRange","mobiscrollTimeRange","mobiscrollDateTimeFull","mobiscrollTimeRangeClick","mobiscrollDateRangeClick","show","locale","documentElement","lang","returnFormat","defaultSelection","Date","DateTime","getVal","getTimezoneOffset","setVal","defaultStart","defaultStop","clear","skipClear","addClear","Event","dispatchEvent","timeout","verifyEmail","emailTarget","toLowerCase","match","showSpinner","setTimeout","showError","strategy","error","access_locked","showAccessLocked","can_create_account","showAccountCreation","showLoginStrategy","showEmail","passwordStepTarget","hidden","emailStepTarget","checkIfEnter","keyCode","errorTarget","accessLockedTarget","spinnerTarget","toString","subdomain","showPassword","passwordTarget","focus","preferred_locale","statusTarget","stopTypeId","stopTypeTarget","restartedAt","restartedAtTarget","mailParameterId","nodeName","mail_parameter","addUnits","tableTarget","assetListTarget","addAmenities","template_id","controlListTarget","control","updateMaintenances","maintenanceIds","newIds","n","modalLinkTarget","linkToModal","deleteMaintenance","maintenanceId","formMaintenanceIdsTarget","updateFilters","nextLevel","selectedinput","currentLevel","deletePreviousSubLevel","newChoiceInstance","populateFilterChoices","parentLevel","newSelect","containerTarget","containerSize","subLevels","fetchSubLevels","child","full_name","_nextLevel","accessFieldTarget","usersFieldTarget","toggleUsersField","material_location_id","updateInvoiceData","invoice_contact","invoice_contactTarget","nameTarget","addressTarget","zip_codeTarget","zip_code","cityTarget","city","countryTarget","country","vatTarget","vat_nb","clearInvoiceData","copyInvoiceAddress","delivery_addressTarget","delivery_zip_codeTarget","delivery_cityTarget","delivery_countryTarget","useAsMaterialPrice","selectExisting","radio","supplierCurrency","companyCurrency","checkBoxTarget","updateDisplay","conversionTarget","valueToConvert","Number","parseFloat","receivedPriceTarget","toFixed","exchange_rate","displayText","missingErrorMessage","mat_id","material_order_id","existing_line","tableInput","quantity","updateMaterial","add_value","editMaterial","lineId","price","material_order_line","quantity_ordered","unit_price_ordered","unit_price","cart_list","matId","cartTarget","cancel_delivery","material_order_line_id","checkClosable","closable","checkCancellable","cancellable","reopen","totalReceivedTarget","total_received","orderIdTarget","toggleInventoryDate","quantityid","inventoryDateTarget","$","attr","inventory_date","material_quotation_id","material_quotation_line","quotationIdTarget","material_request_id","existingLine","quantity_requested","material_request_line","material_name","material_brand","request_line_id","material_quantity","resetUsage","offer_line","requestIdTarget","checkValidate","checkInput","freeTarget","reportTarget","charge_numberTarget","btnTarget","favDiv","addFavourite","material_category","startDateTarget","end","endDateTarget","updateTotal","difference","currentQuantity","totalQuantityTarget","round","cardTarget","internal_ref","Boolean","lineTypeTarget","closeModal","controllerDivTarget","navigator","geolocation","getCurrentPosition","success","enableHighAccuracy","maximumAge","pos","crd","longitude","latitude","existing","coords","mapboxgl","container","center","zoom","on","resize","marker","draggable","setLngLat","addTo","lngLat","getLngLat","lat","lng","err","warn","showtasktype","maintenanceFieldsTarget","reportFieldsTarget","taskTitleTarget","taskDescriptionTarget","maintenancePlanTarget","selectPic","document_id","controllerName","objectId","updateDocumentList","removePic","previous_pic","previous_pic_id","new_pic","new_pic_id","objectTarget","switch_format","scanBtnTarget","height","scan","Html5Qrcode","getCameras","devices","html5QrCode","facingMode","fps","qrbox","width","decodedText","decodedResult","ignore","catch","showResult","errorMessage","res","resultTarget","outputDataTarget","at","found","object","category","material_quantities","lastInventoryDate","location_name","ajax","url","beforeSend","xhr","setRequestHeader","dataType","hh_link","manualLoad","ReactOnRails","reactOnRailsPageLoaded","modal","Modal","hideBeforeRender","isOpen","detail","resume","hide","removeUser","linkId","conversationId","conversation","ok","blob","report_type_id","report_typeTarget","reportType","switch","active","new_value","fieldsTarget","report_type","field_rowTarget","index","String","indexValue","fieldValue","fieldTarget","updateMandatory","selectedValue","reportTypeId","link_id","fieldLinkId","mandatory","rowTarget","elementValue","responsible_mode_changed","selectorTarget","responsible_divTarget","toggleDateInputs","dateInputsTarget","setEndDateMin","type_value","unit_value","responsible_value","status_value","titleTarget","pdfid","generateFullReport","getPdfData","reportid","attributes","table","downloadPdf","download_url","displayError","hasAssetSelectorModeTarget","hasAssetsTarget","assetSelectorModeTarget","assetsTarget","userEquipmentsTarget","assetsBtnTarget","userEquipmentsBtnTarget","amenityRequired","unitRequired","loadUserEquipments","getUserEquipments","activeTab","toggleAssets","toggleUserEquipments","userEquipmentsSelectorTarget","amenityField","setUserEquipmentsActive","setAssetsActive","_activeTab","newTab","userIdTarget","unitRequiredTarget","amenityRequiredTarget","toggleField","eyeTarget","selectUnit","assetIdTarget","assetTypeTarget","nextElementSibling","previousElementSibling","equipDivTarget","unitDivTarget","unit_select_divs","marginLeft","indexOf","selectEquip","equip_id","unit_select_list","last_unit_div","equip_select_divs","showGraphs","populate_tables","fetchData","doughnut","cumulative_line","stacked_bar","status_pie","admin_bar","admin_line","setMonth","getMonth","reportTypeTarget","anomaly_id","anomalyTarget","dateRangeParams","allParams","maintainAspectRatio","grid","stacked","x","layout","padding","legend","position","boxWidth","fontFamily","usePointStyle","company_selectorTarget","stops_table","stops_count","total_downtime","for_self","forSelf","counter","beforeDraw","chart","args","ctx","chartArea","top","right","bottom","left","save","beginPath","arc","PI","fillStyle","fill","font","fontSize","textAlign","fontColor","fillText","total","plugins","onHover","chartElement","native","cursor","responsive","parsing","tooltip","enabled","evt","activePoints","getElementsAtEventForMode","intersect","firstPoint","datasets","datasetIndex","source_index","sourceIndex","target_index","targetIndex","table_name","tableName","redirect","select_all","checkbox","deselect_all","apply","checkboxes","selected_columns","_error","main_divTarget","deleteUrl","select_filter","filter_id","filter_name","selectedIndex","filter_type","add_text_filter","add_date_filter","add_date_time_filter","add_multiple_choice_filter","add_boolean_filter","saveFilter","filter_column","filter_value","newBooleanFilter","active_filters_divTarget","newInput","newSelectFilter","dayjs","startOf","endOf","apply_filter","firstLoad","filterId","filterType","selectedOptions","Accept","r","Turbo","renderStreamMessage","remove_filter","form","queryString","URLSearchParams","label_per_row","label_per_column","label_width","label_height","page_vertical_margin","page_horizontal_margin","attacheListener","hasAttribute","filterList","filterValue","goToToday","scrollIntoView","behavior","block","PeriodId","ptt","Start","Stop","commentRequired","commentTarget","showEdit","allDayRange","hideEdit","editDivTarget","update","period_to_todo","rangeTarget","all_day","allDayTarget","doneAndApprove","doer","doerTarget","ended_at","endedatTarget","comment","fetchAndClose","approve","user_ids","lineDivTarget","timeRange","checkForAlert","startTaskTarget","ongoingTask","nextUnitLevel","updateAmenityFilters","unitIdTarget","amenityIdTarget","_nextUnitLevel","selectedUnitId","currentUnitLevel","deletePreviousSubUnitFilters","parentUnitValue","populateAmenties","containerClass","subUnits","fetchSubUnits","fetchAmenities","newAmenitiesInstance","mandatory_label","mandatory_select","archived","selectedAmenityId","full_address","sendInstructions","removeProperty","userchoicesTarget","getTimeList","getTicketList","getTicketGraph","getTodoList","getTodoGraph","getLateList","getLateGraph","todolistTarget","td8","td9","td10","td11","rep_id","ref_number","created_by","ended_by","closed_at","closed_by","todographTarget","hasTimelistTarget","floor","padStart","total_price","currency","hasHoursgraphTarget","report_number","ticketlistTarget","ticketgraphTarget","latetodolistTarget","warning","late","scheduled_at","lateTasksGraphTarget","ticks","stepSize","Sentry","dsn","environment","env","integrations","maskAllText","blockAllMedia","I18n","store","translations","defaultLocale","enableFallback","Rails","require","jQuery","Stimulus","Application","context","load","definitionsFromContext","call","tooltipTriggerEl","Tooltip","userLocale"],"sourceRoot":""}