PageSourceSearch

https://my.eroad.co.nz/installations.myeroad.0ac7d8d585ac75f63d5f.js

js eroad.co.nz collected 2026-09-26 07:46:26 UTC 68,767 bytes, 2 lines download raw bytes

1!function(){try{("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).__faroGitHash_myeroad="5ce3e63ee526711d9fdee9e150f093852f3a7cc4"}catch(e){}}(),function(){try{("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).__faroBundleId_myeroad="10.1.5092-apac"}catch(e){}}();try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5d018c0e-9a5f-4ce5-ad0d-81f0f36325fb",e._sentryDebugIdIdentifier="sentry-dbid-5d018c0e-9a5f-4ce5-ad0d-81f0f36325fb")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"10.1.5092-apac"},(self.webpackChunk_eroad_myeroad=self.webpackChunk_eroad_myeroad||[]).push([[3198],{4525:(e,t,a)=>{a.d(t,{S:()=>u});var l=a(52711),s=a(44448),n=a(14041),r=Object.defineProperty,i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,c=(e,t,a)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;const u=e=>{var t=e,{accordion:a=!1,bordered:r=!0,"data-testid":u,"data-pendoid":p,destroyInactivePanel:m=!1,expandIconPosition:b="start",ghost:g=!1,size:y=s.o.MIDDLE}=t,v=((e,t)=>{var a={};for(var l in e)o.call(e,l)&&t.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&i)for(var l of i(e))t.indexOf(l)<0&&d.call(e,l)&&(a[l]=e[l]);return a})(t,["accordion","bordered","data-testid","data-pendoid","destroyInactivePanel","expandIconPosition","ghost","size"]);return n.createElement(l.A,((e,t)=>{for(var a in t||(t={}))o.call(t,a)&&c(e,a,t[a]);if(i)for(var a of i(t))d.call(t,a)&&c(e,a,t[a]);return e})({accordion:a,bordered:r,"data-pendoid":null!=p?p:"ui-library-collapse-pendo","data-testid":null!=u?u:"ui-library-collapse",destroyInactivePanel:m,expandIconPosition:b,ghost:g,size:y},v))}},44217:(e,t,a)=>{a.r(t),a.d(t,{InstallationsPage:()=>yl,default:()=>vl});var l=a(43420),s=a(62397),n=a(37506),r=a(70541),i=a(80601),o=a(62664),d=a(96711),c=a(13821),u=a(81249);const p=()=>{const e=(0,o.Zp)(),t=(0,r.wA)(),{setTokenUserPreferencesItem:a}=(0,c.J)(),{t:l}=(0,i.t)();return()=>{a({key:u.as,value:!1,t:l}),e("/Portal/admin/myehubos"),t(d.o.user.analyticsEvent({category:"MyEROAD Navigation",action:"User toggled off the installationsBeta toggle"}))}};var m=a(83381),b=a(18198),g=a(90645),y=a(40421),v=a(5358),f=a(44013),h=a(74652);const w=(0,y.E)("INSTALLATIONS",e=>({downloadInstallationFile:e.asyncAction(),fetchInstallations:e.asyncAction(),exportInstallations:e.asyncAction(),pageNumberChanged:e.action(),pageSizeChanged:e.action(),bulkInstallationJobsSelected:e.action(),resolveSelectedJobs:e.asyncAction(),resetSelectedJobs:e.action(),markAsResolvedModalOpened:e.action(),markAsResolvedModalClosed:e.action(),archivedSelectJobs:e.asyncAction(),unarchivedSelectJobs:e.asyncAction(),deviceTypeFilterChanged:e.action(),installationTypeFilterChanged:e.action(),filtersReset:e.action(),searchStringChanged:e.action(),statusTypeFilterChanged:e.action(),installationRulesDrawerOpened:e.action(),installationRulesDrawerClosed:e.action(),installationRulesDrawerViewChanged:e.action(),updateOCRImageData:e.asyncAction(),retriggerJob:e.asyncAction(),unresolveJob:e.asyncAction(),installationDrawerOpened:e.action(),installationDrawerClosed:e.action(),installationsDrawerViewChanged:e.action()}));var E=Object.defineProperty,I=Object.defineProperties,D=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,T=(e,t,a)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,S=(e,t)=>{for(var a in t||(t={}))O.call(t,a)&&T(e,a,t[a]);if(k)for(var a of k(t))R.call(t,a)&&T(e,a,t[a]);return e},C=(e,t)=>I(e,D(t));const x={result:{totalRecords:0,pageNumber:0,data:[]}},A={installations:x,exportInstallations:x,installationsQueryParams:{filterParams:{installTypes:[],deviceTypes:[],statusTypes:[]},pageNumber:1,pageSize:v.nu,searchString:""}
1,isFetchingInstallations:!1,installationDetails:null,installationsDrawerView:null,isSubmittingForm:!1,selectedInstallationJobIds:[],displayMarkAsResolvedModal:null},P={installations:(0,g.HY)({installationsDrawerView:(0,y.v)([w.installationDrawerClosed.reduce(()=>null),w.installationDrawerOpened.reduce(()=>u.$K.ERRORS_LIST),w.updateOCRImageData.success.reduce(()=>null),w.updateOCRImageData.failure.reduce(()=>null),w.unresolveJob.success.reduce(()=>null),w.unresolveJob.failure.reduce(()=>null),w.bulkInstallationJobsSelected.reduce(()=>null),w.searchStringChanged.reduce(()=>null)],A.installationsDrawerView),installations:(0,y.v)([d.o.user.logout.success.reduce(()=>A.installations),w.fetchInstallations.request.reduce(f.m$),w.fetchInstallations.success.reduce(f.gn),w.fetchInstallations.failure.reduce(f.C1)],A.installations),selectedInstallationJobIds:(0,y.v)([w.bulkInstallationJobsSelected.reduce((e,t)=>[...t]),w.resolveSelectedJobs.success.reduce(()=>A.selectedInstallationJobIds),w.resolveSelectedJobs.failure.reduce(()=>A.selectedInstallationJobIds),w.resetSelectedJobs.reduce(()=>A.selectedInstallationJobIds),w.markAsResolvedModalClosed.reduce(()=>A.selectedInstallationJobIds),w.archivedSelectJobs.reduce(()=>A.selectedInstallationJobIds),w.unarchivedSelectJobs.reduce(()=>A.selectedInstallationJobIds),w.deviceTypeFilterChanged.reduce(()=>A.selectedInstallationJobIds),w.installationTypeFilterChanged.reduce(()=>A.selectedInstallationJobIds),w.filtersReset.reduce(()=>A.selectedInstallationJobIds),w.searchStringChanged.reduce(()=>A.selectedInstallationJobIds),w.statusTypeFilterChanged.reduce(()=>A.selectedInstallationJobIds)],A.selectedInstallationJobIds),displayMarkAsResolvedModal:(0,y.v)([w.markAsResolvedModalOpened.reduce((e,t)=>t),w.markAsResolvedModalClosed.reduce(()=>null),w.resolveSelectedJobs.success.reduce(()=>A.displayMarkAsResolvedModal),w.resolveSelectedJobs.failure.reduce(()=>A.displayMarkAsResolvedModal)],A.displayMarkAsResolvedModal),installationDetails:(0,y.v)([w.installationDrawerOpened.reduce((e,t)=>e!==t?t:e),w.installationDrawerClosed.reduce(()=>null)],A.installationDetails),isFetchingInstallations:(0,y.v)([w.fetchInstallations.request.reduce(()=>!0),w.fetchInstallations.success.reduce(()=>!1),w.fetchInstallations.failure.reduce(()=>!1),w.exportInstallations.request.reduce(()=>!0),w.exportInstallations.success.reduce(()=>!1),w.exportInstallations.failure.reduce(()=>!1)],A.isFetchingInstallations),isSubmittingForm:(0,y.v)([w.updateOCRImageData.request.reduce(()=>!0),w.updateOCRImageData.success.reduce(()=>!1),w.updateOCRImageData.failure.reduce(()=>!1)],A.isSubmittingForm),exportInstallations:(0,y.v)([d.o.user.logout.success.reduce(()=>A.installations),w.exportInstallations.request.reduce(f.m$),w.exportInstallations.success.reduce(f.gn),w.exportInstallations.failure.reduce(f.C1)],A.installations),installationsQueryParams:(0,y.v)([w.pageNumberChanged.reduce(h.ou),w.pageSizeChanged.reduce(h.On),w.searchStringChanged.reduce((e,t)=>C(S({},e),{searchString:t,pageNumber:A.installationsQueryParams.pageNumber})),w.installationTypeFilterChanged.reduce((e,t)=>C(S({},e),{pageNumber:A.installationsQueryParams.pageNumber,filterParams:C(S({},e.filterParams),{installTypes:[...t]})})),w.deviceTypeFilterChanged.reduce((e,t)=>C(S({},e),{pageNumber:A.installationsQueryParams.pageNumber,filterParams:C(S({},e.filterParams),{deviceTypes:[...t]})})),w.statusTypeFilterChanged.reduce((e,t)=>{var a;return C(S({},e),{pageNumber:A.installationsQueryParams.pageNumber,filterParams:C(S({},e.filterParams),{statusTypes:[...t],isResolved:t.includes("RESOLVED_MANUALLY")||(null==(a=A.installationsQueryParams.filterParams)?void 0:a.isResolved),isArchived:t.includes("ARCHIVED")})})}),w.filtersReset.reduce(e=>C(S({},e),{pageNumber:A.installationsQueryParams.pageNumber,searchString:A.installationsQueryParams.searchString,filterParams:S({},A.installationsQueryParams.filterParams)}))],A.installationsQueryParams)})};var M=a(7064);const N={rules:(0,g.HY)({installationsRulesDrawerView:(0,y.v)([w.installationRulesDrawerOpened.reduce(()=>M.kn.LIST),w.installationRulesDrawerClosed.reduce(()=>null),w.installationRulesDrawerViewChanged.fold(e=>e)],null)})};var j=Object.defineProperty,J=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,V=(e,t,a)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,U=(e,t)=>{for(var a in t||(t={}))L.call(t,a)&&V(e,a,t[a]);if(J)for(var a of J(t))F.call(t,a)&&V(e,a,t[a]);return e};const $=(0,g.HY)(U(U({}
1,P),N));var H=a(24392),B=a(35060),W=a(94386),_=a(65755),z=a(24134),Y=Object.defineProperty,Q=Object.defineProperties,q=Object.getOwnPropertyDescriptors,K=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,Z=(e,t,a)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ee=(e,t)=>{for(var a in t||(t={}))G.call(t,a)&&Z(e,a,t[a]);if(K)for(var a of K(t))X.call(t,a)&&Z(e,a,t[a]);return e},te=(e,t)=>Q(e,q(t));const ae=({pageNumber:e,pageSize:t,searchString:a,filterParams:l})=>{let s={pageNumber:e,pageSize:t};const n=le(l);return a&&(s=te(ee({},s),{searchString:a})),Object.keys(n).forEach(e=>{let t=n[e];"statusTypes"===e&&Array.isArray(t)&&(t=t.filter(e=>"RESOLVED_MANUALLY"!==e&&"ARCHIVED"!==e)),("boolean"==typeof t||Array.isArray(t)&&(null==t?void 0:t.length))&&(s=te(ee({},s),{filters:te(ee({},s.filters),{[e]:t})}))}),s},le=(e={})=>{var t;const a=(null==e?void 0:e.installTypes)||[];return te(ee({},e),{installTypes:[].concat(...null!=(t=null==a?void 0:a.map(e=>u.Xs[e]))?t:[])})};var se=Object.defineProperty,ne=Object.defineProperties,re=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ce=(e,t,a)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ue=(e,t)=>
1{for(var a in t||(t={}))oe.call(t,a)&&ce(e,a,t[a]);if(ie)for(var a of ie(t))de.call(t,a)&&ce(e,a,t[a]);return e},pe=(e,t)=>ne(e,re(t));const me=({searchString:e,filterParams:t})=>{const a=(0,z.I)(e)?{}:{searchString:e};return Object.entries(le(t)).forEach(([e,t])=>{if((0,_.L)(t))a.filters=pe(ue({},a.filters),{[e]:t});else{const l="statusTypes"===e?t.filter(e=>"RESOLVED_MANUALLY"!==e&&"ARCHIVED"!==e):t;(0,z.I)(l)||(a.filters=pe(ue({},a.filters),{[e]:l}))}}),a},be={fetchInstallations:e=>(0,W.F)({baseURL:u.JR,url:"/installations/search",method:"post",data:ae(e)}),downloadInstallationPDFFiles:({jobId:e,fileType:t})=>(0,W.F)({baseURL:u.JR,url:`/installations/${e}/${t}`,method:"get",responseType:"blob",returnDataOnly:!1}),updateOCRImageData:e=>(0,W.F)({baseURL:u.JR,url:`/installations/${e.id}`,method:"PATCH",data:e}),retriggerJob:e=>(0,W.F)({baseURL:u.JR,url:`/installations/${e.id}`,method:"PATCH",data:{id:e.id}}),unresolveJob:e=>(0,W.F)({baseURL:u.JR,url:`/installations/${e.id}/unresolve`,method:"POST"}),resolvedJobs:e=>(0,W.F)({baseURL:u.JR,url:"/installations/resolve",method:"post",data:{installIds:e}}),archivedJobs:e=>(0,W.F)({baseURL:u.JR,url:"/installations/archive",method:"patch",data:{installIds:e}}),unarchivedJobs:e=>(0,W.F)({baseURL:u.JR,url:"/installations/unarchive",method:"patch",data:{installIds:e}}),exportInstallations:e=>(0,W.F)({baseURL:u.JR,url:"/installations/export",method:"post",data:me(e)})};var ge=a(28853),ye=a(48632),ve=a(79623);function*fe({payload:e,meta:t}){const{errorMessage:a}=t||{};yield(0,H.yJ)(w.downloadInstallationFile.request());const{downloadInstallationPDFFiles:l}=be;try{const{data:t,headers:a}=yield(0,H.T1)(l,e);yield(0,H.T1)(ye.P,t,(0,ge.parse)(a["content-disposition"]).parameters.filename,a["content-type"]),yield(0,H.yJ)(w.downloadInstallationFile.success())}catch(e){yield(0,H.yJ)(w.downloadInstallationFile.failure()),ve.i.error(a)}}function*he({payload:e}){yield(0,H.yJ)(w.exportInstallations.request());try{const t=yield(0,H.T1)(be.exportInstallations,e);yield(0,H.yJ)(w.exportInstallations.success(t))}catch(e){yield(0,H.yJ)(w.exportInstallations.failure(e))}}function*we({payload:e}){yield(0,H.yJ)(w.fetchInstallations.request());try{const t=yield(0,H.T1)(be.fetchInstallations,e);yield(0,H.yJ)(w.fetchInstallations.success(t))}catch(e){yield(0,H.yJ)(w.fetchInstallations.failure(e))}}const Ee={enAU:{},enNZ:JSON.parse('{"installations.drawer.btn.close":"Close","installations.drawer.btn.save-and-submit":"Save and submit","installations.drawer.header.type-serial-title":"{type} - {serial}","installations.drawer.undo-status.successful":"Job status updated successfully","installations.drawer.undo-status.failed":"Something went wrong please try again.","installations.drawer.status.resolvedManually.button.undo":"Undo","installations.drawer.status.resolvedManually":"Issue Resolved","installations.drawer.status.resolvedManually.description":"Issue was marked as resolved by {resolvedByUser} on {dateResolvedOn}.","installations.error-drawer.form.errorMessage.default":"Something went wrong please try again.","installations.error-drawer.form.images.device-serial-number":"Serial number","installations.error-drawer.form.images.odometer-reading":"Odometer reading km","installations.error-drawer.form.images.existing-hubo-reading":"Existing {deviceType, select, CoreHubTubo {Tubo} other {Hubo}} reading km","installations.error-drawer.form.images.plate-number":"Rego or VIN or display name","installations.error-drawer.form.invalid-odometer":"Please enter odometer reading and it should be numbers only","installations.error-drawer.form.invalid-existing-hubo-reading":"Please enter existing hubo reading and it should be numbers only","installations.error-drawer.form.invalid-plate-number":"Please enter registration number","installations.error-drawer.form.invalid-serial-number":"Please enter device serial number","installations.error-drawer.form.successMessage.default":"Images successfully verified and job submitted.","installations.error-drawer.resolve.errorMessage.default":"Something went wrong please try again.","installations.error-drawer.resolve.successMessage.default":"Job status updated successfully.","installations.filters.dropdown.device-type.all-option":"All device types","installations.filters.dropdown.device-type.all":"All device types","installations.filters.dropdown.device-type.mobile-heading":"Device type","installations.filters.dropdown.device-type.placeholder":"Device type","installations.filters.dropdown.device-type.searchInput.placeholder":"Search device types","installations.filters.dropdown.installation-type.all-option":"All install types","installations.filters.dropdown.installation-type.all":"All install types","installations.filters.dropdown.installation-type.mobile-heading":"All install types","installations.filters.dropdown.installation-type.placeholder":"All install types","installations.filters.dropdown.status-type.all-option":"All status types","installations.filters.dropdown.status-type.all":"All status types","installations.filters.dropdown.status-type.mobile-heading":"Status type","installations.filters.dropdown.status-type.placeholder":"All statuses","installations.filters.dropdown.status-type.searchInput.placeholder":"Search status types","installations.filters.search.input.placeholder":"Search Rego or Serial","installations.installation-types.new-assignment":"New assignment","installations.installation-types.swap-out":"Swap out","installations.page.button.add-rule":"Rules...","installations.page.button.csv-export":"Export","installations.page.button.mark-as-resolved":"Mark as resolved","installations.page.button.mark-as-resolved.tooltip":"In the table below, any failed job that you have fixed, can be selected and marked as resolved. Please note that success statuses cannot be updated as the transaction has already been successfully processed.","installations.page.dropdown.bulk-actions":"Bulk actions","installations.page.dropdown-options.bulk-actions.archive":"Archive","installations.page.dropdown-options.bulk-actions.unarchive":"Unarchive","installations.page.dropdown-options.bulk-actions.rules":"Rules","installations.page.dropdown-options.bulk-actions.mark-as-resolved":"Mark as resolved","installations.page.dropdown-options.bulk-actions.archive.tooltip":"In the table below, any resolved job, can be selected and archived to help you focus on jobs that need immediate attention.","installations.page.header.description":"Connect vehicles and assets to the network. {ehuboPageLink}","installations.page.header.looking-for-ehubo-page":"Looking for the old EHUBO page?","installations.page.header.title":"Installs","installations.page.modal.mark-as-resolved.continue":"Continue","installations.page.modal.mark-as-resolved.okay":"Okay","installations.page.modal.mark-as-resolved.title":"Attention","installations.page.modal.mark-as-resolved-partial.message":"Issues that require individual attention (eg. Image verification) will not be automatically resolved with this action. Click each of those rows separately for resolution.","installations.page.modal.mark-as-resolved-cannot.message":"Issues that require individual attention (eg. Image verification) cannot be automatically resolved. Click each of those rows separately for resolution.","installations.rulesDrawer.createView.button.cancel":"Cancel","installations.rulesDrawer.createView.button.submit":"Save","installations.rulesDrawer.createView.button.submitting":"Saving...","installations.rulesDrawer.createView.confirm-popup.message":"You will lose these inputs. Are you sure you want to cancel these settings?","installations.rulesDrawer.createView.confirm-popup.no-button":"No","installations.rulesDrawer.createView.confirm-popup.title":"Cancel settings","installations.rulesDrawer.createView.confirm-popup.yes-button":"Yes, please cancel","installations.rulesDrawer.createView.title":"Create a provision rule","installations.rulesDrawer.form.assign-automatically.label":"Then automatically assign...","installations.rulesDrawer.form.auxiliary-inputs-switch.label":"Auxiliary inputs","installations.rulesDrawer.form.auxiliary-inputs-switch.tooltip":"Auxiliary inputs for provisioning rules","installations.rulesDrawer.form.device-features.groups.all":"All device features","installations.rulesDrawer.form.device-features.label":"Device features","installations.rulesDrawer.form.device-features.placeholder":"Select device features","installations.rulesDrawer.form.device-features.tooltip":"Device features for the rule","installations.rulesDrawer.form.fleets.groups.all":"All fleets","installations.rulesDrawer.form.fleets.label":"Groups (fleets)","installations.rulesDrawer.form.fleets.placeholder":"Select fleets","installations.rulesDrawer.form.hardware-type.label":"Hardware","installations.rulesDrawer.form.hardware-type.option.ehubo2":"Ehubo 2.2","installations.rulesDrawer.form.if-the.label":"If the...","installations.rulesDrawer.form.inspect-template-switch.label":"Inspect template","installations.rulesDrawer.form.inspect-template-switch.tooltip":"Inspect template for provisioning rules","installations.rulesDrawer.form.name.label":"Rule name","
1installations.rulesDrawer.form.name.placeholder":"For Eg, Rule for light vehicle...","installations.rulesDrawer.form.name.validation.no-special-chars":"Rule name must not have special characters","installations.rulesDrawer.form.name.validation.required":"Rule name is required","installations.rulesDrawer.form.service-plan-addons.groups.all":"All service plan add ons","installations.rulesDrawer.form.service-plan-addons.label":"Service Plan add ons (Optional)","installations.rulesDrawer.form.service-plan-addons.placeholder":"Select service plan add ons","installations.rulesDrawer.form.service-plan-addons.tooltip":"Service Plans for the rule","installations.rulesDrawer.form.share-vehicle-switch.label":"Share vehicle details","installations.rulesDrawer.form.share-vehicle-switch.tooltip":"Share vehicle details for provisioning rules","installations.rulesDrawer.form.tax-config-switch.label":"Tax configuration-Data for RUC purchase","installations.rulesDrawer.form.tax-config-switch.tooltip":"Tax Configurations for provisioning rules","installations.rulesDrawer.form.tax-services-switch.label":"Tax services","installations.rulesDrawer.form.tax-services-switch.tooltip":"Tax services for provisioning rules","installations.rulesDrawer.form.third-party-hardware-switch.label":"Third party hardware","installations.rulesDrawer.form.third-party-hardware-switch.tooltip":"Third party hardware for provisioning rules","installations.rulesDrawer.form.third-party-identifier-switch.label":"Third party identifier","installations.rulesDrawer.form.third-party-identifier-switch.tooltip":"Third party identifier for provisioning rules","installations.rulesDrawer.form.vehicle-plan.label":"Vehicle plan","installations.rulesDrawer.form.vehicle-plan.tooltip":"Vehicle Plan for the Rule","installations.rulesDrawer.form.vehicle-type.label":"Vehicle type","installations.rulesDrawer.form.vehicle-type.option.heavy":"Heavy","installations.rulesDrawer.form.vehicle-type.option.light":"Light","installations.rulesDrawer.listView.addButton":"Create rule","installations.rulesDrawer.listView.empty":"You can create rules, based on certain criteria that will <strong>automatically</strong> apply features to your newly installed EROAD devices.","installations.rulesDrawer.listView.title":"Rules","installations.status.action-pending.label":"Action Needed","installations.status.attention-needed.label":"Attention Needed","installations.status.input-error.label":"Input Error","installations.status.install-wizard.label":"Install Wizard","installations.status.life-cycle.label":"Life Cycle","installations.status.pending.label":"Pending","installations.status.processing-error.label":"Processing Error","installations.status.resolved-manually.label":"Resolved Manually","installations.status.archived.label":"Archived","installations.status.ruc.label":"RUC","installations.status.rucho.label":"RUCHO","installations.status.success.label":"Success","installations.status.unknown.label":"Unknown","installations.status.unprocessed.label":"Unprocessed","installations.table.column.deviceType.title":"Device type","installations.table.column.installationType.new-install-asset-ehubo2l":"New install asset ehubo2l","installations.table.column.installationType.new-install-asset-tracker":"New install asset trackter","installations.table.column.installationType.new-assignment":"New assignment","installations.table.column.installationType.new-install-corehub":"New install corehub","installations.table.column.installationType.new-install-corehub-lcd":"New install corehub lcd","installations.table.column.installationType.new-install-corehub-lcd-only":"New install corehub lcd only","installations.table.column.installationType.new-install-ehubo":"New install ehubo","installations.table.column.installationType.new-install-tubo3":"New install tubo 3","installations.table.column.installationType.remove-install-asset-tracker":"Remove and Install Asset Tracker","installations.table.column.installationType.remove-install-corehub":"Remove and Install Corehub","installations.table.column.installationType.remove-install-corehub-lcd":"Remove and Install Corehub with LCD","installations.table.column.installationType.remove-install-corehub-lcd-only":"Remove and Install Corehub LCD only","installations.table.column.installationType.remove-install-ehubo2lite":"Remove and Install EhuboLite/E2L","installations.table.column.installationType.swap-out":"Swap out","installations.table.column.installationType.title":"Installation type","installations.table.column.installationType.tubo-swap-out":"Tubo swap out","installations.table.column.installationType.unit-swap-out":"Unit swap out","installations.table.column.installDate.title":"Install date","installations.table.column.installer.title":"Installer","installations.table.column.make.title":"Make","installations.table.column.rego.title":"Rego","installations.table.column.select.title":"Select","installations.table.column.serial.title":"Serial","installations.table.column.status.title":"Status","installations.table.column.type.title":"Type","installations.table.column.jobID.title":"Job ID","installations.table.empty.message":"No installations","installations.table.file-download-l
1ink.error":"Oops! Something went wrong. Try again later or contact support if the error persists.","installations.table.pdf-installation-slip.text":"Installation slip","installations.table.pdf-rucho-form-link.text":"PDF <span>RUCHO</span> form"}'),enUS:JSON.parse('{"installations.drawer.form.images.odometer-reading":"Odometer reading miles","installations.error-drawer.form.invalid-plate-number":"Please enter plate number","installations.filters.search.input.placeholder":"Search Plate or Serial","installations.table.column.rego.title":"Plate"}'),frCA:{}},Ie=(0,m.G)({key:b.$n.INSTALLATIONS,reducer:$,saga:function*(){yield(0,H.Q7)([(0,H.p8)(w.fetchInstallations.type,we),(0,H.p8)(w.downloadInstallationFile.type,fe),(0,H.p8)(w.exportInstallations.type,he),(0,H.p8)(w.updateOCRImageData.type,(0,B.X)(w.updateOCRImageData,be.updateOCRImageData)),(0,H.p8)(w.retriggerJob.type,(0,B.X)(w.retriggerJob,be.retriggerJob,{*onSuccess(){yield(0,H.yJ)(w.installationDrawerClosed())}})),(0,H.p8)(w.unresolveJob.type,(0,B.X)(w.unresolveJob,be.unresolveJob)),(0,H.p8)(w.resolveSelectedJobs.type,(0,B.X)(w.resolveSelectedJobs,be.resolvedJobs)),(0,H.p8)(w.archivedSelectJobs.type,(0,B.X)(w.archivedSelectJobs,be.archivedJobs)),(0,H.p8)(w.unarchivedSelectJobs.type,(0,B.X)(w.unarchivedSelectJobs,be.unarchivedJobs))])},translations:Ee});var De=a(93815),ke=a(39552),Oe=Object.defineProperty,Re=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,Ae=(e,t,a)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,Pe=(e,t)=>{for(var a in t||(t={}))Ce.call(t,a)&&Ae(e,a,t[a]);if(Se)for(var a of Se(t))xe.call(t,a)&&Ae(e,a,t[a]);return e};const Me=({id:e,installationDetails:t,machineDetails:a,deviceDetails:l})=>{const s=!(!t.resolvedByUser&&!t.dateResolvedOn);return n=Pe(Pe(Pe({id:e},t),a),l),r={status:{jobId:String(e),status:s?u.cb.RESOLVED_MANUALLY:t.status,statusMessages:t.statusMessages,ruchoFormLink:t.ruchoFormS3Key,installationJobPdfLink:t.vworkJobSheetPdfS3Key,isResolvedManually:s},isResolvedManually:s,deviceType:{type:l.eboxType,subType:l.eboxSubType},make:a.make,serial:l.eboxSerial,type:a.model},Re(n,Te(r));var n,r},Ne=b.$n.INSTALLATIONS,je=e=>e[Ne].installations.installations,Je=(0,ke.Mz)(e=>e[Ne].installations.installationsDrawerView,e=>({currentView:e,visible:Boolean(e)})),Le=(0,ke.Mz)(je,({result:{data:e=[],totalRecords:t}})=>({tableData:e.map(Me),totalRecords:t})),Fe={getInstallationDetails:e=>e[Ne].installations.installationDetails,getInstallationRules:e=>e[Ne].rules.installationRules,getInstallations:je,getInstallationsDrawerView:Je,getInstallationsQueryParams:e=>e[Ne].installations.installationsQueryParams,getInstallationsRulesDrawerView:(0,ke.Mz)(e=>e[Ne].rules.installationsRulesDrawerView,e=>({currentView:e,visible:!!e})),getTableData:Le,isSubmittingForm:e=>e[Ne].installations.isSubmittingForm,isFetchingInstallations:e=>e[Ne].installations.isFetchingInstallations,selectedInstallationJobIds:e=>e[Ne].installations.selectedInstallationJobIds,getDisplayMarkAsResolvedModalIds:e=>e[Ne].installations.displayMarkAsResolvedModal,getExportInstallations:e=>e[Ne].installations.exportInstallations};var Ve=a(42453),Ue=a(51962),$e=a(4525),He=a(11952),Be=a(33233),We=a(41026),_e=a(84702),ze=a(14041);const Ye=({type:e,subType:t})=>{const a=(0,_e.d)({type:e,subType:t});return a?ze.createElement(l.s,{id:a}):null};var Qe=a(47752);const qe=({successMessage:e,errorMessage:t})=>{const{t:a}=(0,i.t)();return{meta:{successMessage:()=>{ve.i.success(a(e))},errorMessage:()=>{ve.i.error(a(t))}}}};var Ke=a(63244),Ge=a(62457),Xe=a(89054),Ze=a(29710),et=a(1454);const tt=(0,et.wY)(e=>({root:{backgroundColor:e.colors.surfaceOverlay,padding:e.spacing(4)},inputBox:{paddingTop:e.spacing(6)},ocrImage:{width:"100%"}}),{name:"InstallationImagesValidationForm"});var at=a(14041),lt=Object.defineProperty,st=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,dt=(e,t,a)=>t in e?lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,ct=(e,t)=>
1{for(var a in t||(t={}))it.call(t,a)&&dt(e,a,t[a]);if(rt)for(var a of rt(t))ot.call(t,a)&&dt(e,a,t[a]);return e};const ut=({installationDetails:e})=>{const t=tt(),{t:a}=(0,i.t)(),[s]=(0,Ke.mN)(),n=e.id,{onSubmitForm:r}=pt({jobId:n}),o=(({t:e})=>[{keyToData:"odometerReading",attachmentKey:"odometer-reading-photo",label:"installations.error-drawer.form.images.odometer-reading",rules:[(0,Ze.yt)({t:e,tId:"installations.error-drawer.form.invalid-odometer"}),{validator:(0,Ze.iR)({t:e,name:"Odometer"})}]},{keyToData:"existingHuboReading",attachmentKey:"existing-hubo-reading-photo",label:"installations.error-drawer.form.images.existing-hubo-reading",rules:[(0,Ze.yt)({t:e,tId:"installations.error-drawer.form.invalid-existing-hubo-reading"}),{validator:(0,Ze.iR)({t:e,name:"Existing Hubo reading"})}]},{keyToData:"regoVinOrDisplayName",attachmentKey:"rego-or-vin-photo",label:"installations.error-drawer.form.images.plate-number",rules:[(0,Ze.yt)({t:e,tId:"installations.error-drawer.form.invalid-plate-number"}),{validator:(0,Ze.WH)({t:e,name:"Rego or VIN or display name"})}]},{keyToData:"eboxSerial",attachmentKey:"device-serial-photo",label:"installations.error-drawer.form.images.device-serial-number",rules:[(0,Ze.yt)({t:e,tId:"installations.error-drawer.form.invalid-serial-number"}),{validator:(0,Ze.WH)({t:e,name:"Serial number"})}]}])({t:a}).map(t=>{var a,l,s,n=t,{keyToData:r}=n,i=((e,t)=>{var a={};for(var l in e)it.call(e,l)&&t.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&rt)for(var l of rt(e))t.indexOf(l)<0&&ot.call(e,l)&&(a[l]=e[l]);return a})(n,["keyToData"]);return a=ct({},i),l={keyToData:r,isVisible:(s=e[r],(0,Ue.O)(s)&&""!==s&&("existingHuboReading"!==r||e.eboxSubType===b.yO.CoreHubTubo))},st(a,nt(l))}),d={regoVinOrDisplayName:e.regoVinOrDisplayName,eboxSerial:e.eboxSerial,odometerReading:e.odometerReading,existingHuboReading:e.existingHuboReading};return at.createElement(Ke.lV,{form:s,name:"OCR-image-validate-data",layout:"vertical",onFinish:r,initialValues:d},o.map(a=>a.isVisible&&at.createElement("div",{className:t.root,key:a.keyToData},at.createElement(Xe.i,{baseUrl:`${u.JR}/installations/`,url:`${n}/${a.attachmentKey}`,key:a.keyToData,fallback:"./images/replay/no-thumbnail.png",className:t.ocrImage,imageType:"URI",responseType:"blob"}),at.createElement("div",{className:t.inputBox},at.createElement(Ke.eI,{name:a.keyToData,label:at.createElement(l.s,{id:a.label,values:{deviceType:e.eboxSubType}}),rules:a.rules},at.createElement(Ge.pd,{maxLength:20,"data-testid":"image-input-validation"}))))))},pt=({jobId:e})=>{const t=(0,r.wA)(),a=qe({successMessage:"installations.error-drawer.form.successMessage.default",errorMessage:"installations.error-drawer.form.errorMessage.default"});return{onSubmitForm:({eboxSerial:l,regoVinOrDisplayName:s,odometerReading:n,existingHuboReading:r})=>{const i={id:e,machineDetails:{regoVinOrDisplayName:s,odometerReading:n},deviceDetails:{eboxSerial:l,existingHuboReading:r}};t(w.updateOCRImageData(ct({},i),a))}}};var mt=Object.defineProperty,bt=Object.defineProperties,gt=Object.getOwnPropertyDescriptors,yt=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,ht=(e,t,a)=>t in e?mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,wt=(e,t)=>{for(var a in t||(t={}))vt.call(t,a)&&ht(e,a,t[a]);if(yt)for(var a of yt(t))ft.call(t,a)&&ht(e,a,t[a]);return e};const Et=(0,et.wY)(e=>{return{collapse:{backgroundColor:e.colors.surfaceWarningOrange},collapseWithResolvedManually:{backgroundColor:e.colors.onsurfaceGrayBorders,opacity:.3,pointerEvents:"none"},link:(t=wt({},e.typography.sizes.md),a={fontWeight:e.typography.weights.medium,height:"auto",marginTop:"auto",textAlign:"left",padding:0,color:e.colors.primaryBlueHover},bt(t,gt(a))),linkWrapper:{cursor:"pointer",textAlign:"left",padding:`${e.spacing(2)}px ${e.spacing(4)}px`,marginTop:"auto"},message:{padding:e.spacing(4),paddingTop:0},panel:{whiteSpace:"pre-wrap",border:`1px solid ${e.colors.surfaceOverlay} !important`,"& .ant-collapse-header":{paddingLeft:`${e.spacing(4)}px !important`},"& .ant-collapse-arrow":{right:`${e.spacing(3)}px !important`,left:"auto !important"},"& .ant-collapse-content-box":{padding:0}},resolvedManually:{margin:`${e.spacing(4)}px`},retriggerContentBox:{paddingTop:e.spacing(4)}};var t,a},{name:"InstallationsDrawer"});var It=a(22284),Dt=a(4182),kt=a(76866),Ot=a(14041);const Rt=({dateResolvedOn:e,resolvedByUser:t,installationId:a})=>
1{const n=(0,r.wA)(),i=qe({successMessage:"installations.error-drawer.resolve.successMessage.default",errorMessage:"installations.error-drawer.resolve.errorMessage.default"});return Ot.createElement(kt.F,{"data-testid":"installations-drawer-errorsList-resolvedManually",message:Ot.createElement(l.s,{id:"installations.drawer.status.resolvedManually"}),description:Ot.createElement(l.s,{id:"installations.drawer.status.resolvedManually.description",values:{dateResolvedOn:Ot.createElement(It.X,{value:e,valueIsInSeconds:!0}),resolvedByUser:t}}),type:"info",showIcon:!0,icon:Ot.createElement(Dt.A,null),action:Ot.createElement(s.$,{type:"link",onClick:()=>{n(w.unresolveJob({id:a},i))}},Ot.createElement(l.s,{id:"installations.drawer.status.resolvedManually.button.undo"}))})};var Tt=a(14041);const St=e=>(0,Ue.O)(e)&&Boolean(e.isResolvedManually)&&(0,Ue.O)(e.dateResolvedOn)&&(0,Ue.O)(e.resolvedByUser),Ct=({installationDetails:e})=>{const t=Et(),{t:a}=(0,i.t)(),n=(0,r.wA)(),o=qe({successMessage:"installations.error-drawer.resolve.successMessage.default",errorMessage:"installations.error-drawer.resolve.errorMessage.default"}),{tableData:d}=(0,r.d4)(Fe.getTableData),c=d.flatMap(({id:e,statusMessages:t})=>null==t?void 0:t.map(t=>`${e}-${t}`)).filter(e=>void 0!==e),m=xt({statusMessages:null==e?void 0:e.statusMessages,status:null==e?void 0:e.status.status}),b=p();return Tt.createElement(Tt.Fragment,null,St(e)&&Tt.createElement("div",{className:t.resolvedManually},Tt.createElement(Rt,{"data-testid":"installations-drawer-errorsList-resolvedManually",dateResolvedOn:e.dateResolvedOn,resolvedByUser:e.resolvedByUser,installationId:e.id})),Tt.createElement($e.S,{bordered:!1,expandIconPosition:"end",className:(0,Ve.$)(t.collapse,{[t.collapseWithResolvedManually]:St(e)}),defaultActiveKey:c,items:null==(g=null==e?void 0:e.statusMessages)?void 0:g.map(r=>({className:t.panel,forceRender:!0,label:Tt.createElement(He.j,{status:He.w.AMBER,colorText:!0,type:"deprecatedAlert",text:a((0,Qe.h)({key:r,translationOptions:u.VA}))}),key:`${e.id}-${r}`,children:Tt.createElement(Tt.Fragment,null,Tt.createElement("div",{className:t.message},Tt.createElement(l.s,{id:u.lW[r]||u.mk,values:{b:e=>Tt.createElement("b",null,e),li:e=>Tt.createElement("li",null,e),ul:e=>Tt.createElement("ul",null,e)}})),Tt.createElement("div",{className:t.linkWrapper},u.cF[r]&&u.z[r]&&(u.cF[r]===u.AN.EHUBO_PAGE?Tt.createElement(s.$,{type:"link",onClick:b,className:t.link,"data-testid":"installations-drawer-errorsList-link"},a(u.cF[r])):Tt.createElement(We.p,{target:u.z[r].TARGET,className:t.link,to:u.z[r].LINK,"data-testid":"installations-drawer-errorsList-link"},a(u.cF[r])))),r===M.mm.MACHINE_NOT_FOUND&&Tt.createElement("div",{className:t.retriggerContentBox,"data-testid":"installations-drawer-retriggerContentBox"},Tt.createElement("div",{className:t.message},Tt.createElement(l.s,{id:"installations.retrigger.message",values:{b:e=>Tt.createElement("b",null,e),li:e=>Tt.createElement("li",null,e),ul:e=>Tt.createElement("ul",null,e)}})),Tt.createElement("div",{className:t.linkWrapper},Tt.createElement(s.$,{onClick:()=>{return t=e.id,void n(w.retriggerJob({id:t},o));var t},"data-testid":"installations-drawer-retriggerJobButton"},a("installations.retrigger.label")))),m&&Tt.createElement(ut,{installationDetails:e}))}))}));var g},xt=({statusMessages:e,status:t})=>"PENDING"!==t&&!!(null==e?void 0:e.some(e=>u.NR.includes(e)));var At=a(14041);const Pt={[u.$K.ERRORS_LIST]:({installationDetails:e,isSubmittingForm:t})=>({title:!!e&&Tt.createElement(Tt.Fragment,null,Tt.createElement(l.s,{"data-testid":"installations-drawer-errorsList-title",id:"installations.drawer.header.type-serial-title",tagName:"div",values:{type:Tt.createElement(Ye,{type:e.deviceType.type,subType:e.deviceType.subType}),serial:e.serial}}),Tt.createElement(Be.v,{"data-testid":"installations-drawer-errorsList-status"},u.KV[e.status.status])),children:Tt.createElement(Ct,{installationDetails:e}),actionButtonProps:xt({statusMessages:null==e?void 0:e.statusMessages,status:null==e?void 0:e.status.status})?{"data-pendoid":"install-ocr-image-validated","data-testid":"installations-drawer-action",form:"OCR-image-validate-data",htmlType:"submit",label:Tt.createElement(l.s,{id:"installations.drawer.btn.save-and-submit",tagName:"span"}),loading:t}:void 0})},Mt=()=>
1{const e=(0,r.wA)(),t=(0,r.d4)(Fe.getInstallationDetails),{currentView:a,visible:s}=(0,r.d4)(Fe.getInstallationsDrawerView),n=(0,r.d4)(Fe.isSubmittingForm),i=()=>{return t=function*(){e(w.installationDrawerClosed())},new Promise((e,a)=>{var l=e=>{try{n(t.next(e))}catch(e){a(e)}},s=e=>{try{n(t.throw(e))}catch(e){a(e)}},n=t=>t.done?e(t.value):Promise.resolve(t.value).then(l,s);n((t=t.apply(void 0,null)).next())});var t},o=Pt[a||"null"]||(()=>({})),{title:d,children:c,actionButtonProps:u}=o({installationDetails:t,isSubmittingForm:n});return At.createElement(De._s,{type:De.ts.STANDARD,key:"installations-drawer","data-testid":"installations-drawer",open:s,onClose:i,primaryButtonConfig:u,secondaryButtonConfig:{"data-testid":"installations-drawer-close",label:At.createElement(l.s,{id:"installations.drawer.btn.close",tagName:"span"}),onClick:i},title:d},At.createElement("div",null,c))};var Nt=a(14041),jt=a(15313),Jt=a(14041);const Lt=()=>{var e,t,a;const{t:s}=(0,i.t)(),n=(0,r.wA)(),{searchString:o,filterParams:d}=(0,r.d4)(Fe.getInstallationsQueryParams),[c,p]=(0,Nt.useState)(o),m=Ft({options:u.DX,t:s}),b=Ft({options:u.Rg,t:s}),g=u.Dq.map(({labelId:e,value:t})=>({title:s(e),value:t})),y=m.map(({labelId:e,value:t})=>({title:s(e),value:t})),v=b.map(({labelId:e,value:t})=>({title:s(e),value:t}));return Jt.createElement(jt.Qn,{filterWidth:256,onReset:()=>{n(w.filtersReset()),p("")},search:Jt.createElement(Ge.NJ,{enterButton:!0,placeholder:s("installations.filters.search.input.placeholder"),allowClear:!0,"data-testid":"installations-filters-searchInput","data-pendoid":"installs-filters-search-input",value:c,onChange:e=>p(e.target.value),onSearch:e=>n(w.searchStringChanged(e))})},Jt.createElement(jt.Qn.MobileGroupHeading,{text:Jt.createElement(l.s,{id:"installations.filters.dropdown.installation-type.mobile-heading"}),key:"all-types-heading"}),Jt.createElement(jt.yH,{key:"all-types",onChange:e=>n(w.installationTypeFilterChanged(e)),parentNodeLabel:s("installations.filters.dropdown.installation-type.all-option"),pendoId:"installs-filters-installation-type",placeholder:s("installations.filters.dropdown.installation-type.placeholder"),treeData:g,value:null!=(e=null==d?void 0:d.installTypes)?e:[]}),Jt.createElement(jt.Qn.MobileGroupHeading,{text:Jt.createElement(l.s,{id:"installations.filters.dropdown.device-type.mobile-heading"}),key:"device-type-heading"}),Jt.createElement(jt.yH,{key:"device-types",onChange:e=>n(w.deviceTypeFilterChanged(e)),parentNodeLabel:s("installations.filters.dropdown.device-type.all-option"),pendoId:"installs-filters-device-type",placeholder:s("installations.filters.dropdown.device-type.placeholder"),treeData:y,value:null!=(t=null==d?void 0:d.deviceTypes)?t:[]}),Jt.createElement(jt.Qn.MobileGroupHeading,{text:Jt.createElement(l.s,{id:"installations.filters.dropdown.status-type.mobile-heading"}),key:"status-type-heading"}),Jt.createElement(jt.yH,{key:"status-types",onChange:e=>n(w.statusTypeFilterChanged(e)),parentNodeLabel:s("installations.filters.dropdown.status-type.all-option"),pendoId:"installs-filters-status-type",placeholder:s("installations.filters.dropdown.status-type.placeholder"),treeData:v,value:null!=(a=null==d?void 0:d.statusTypes)?a:[]}))},Ft=({options:e,t})=>[...e].sort((e,a)=>t(e.labelId).localeCompare(t(a.labelId),void 0,{numeric:!0})),Vt=(0,et.wY)(e=>({linkButton:{fontSize:e.typography.sizes.sm.fontSize,paddingLeft:0}}),{name:"InstallationsPage"});var Ut=a(82162),$t=a(62009),Ht=a(56664),Bt=a(37195),Wt=a(74149),_t=a(36922),zt=a(14041);const Yt=()=>{const{pageSize:e,pageNumber:t,filterParams:a,searchString:l}=(0,r.d4)(Fe.getInstallationsQueryParams),s=(0,r.wA)();return()=>{s(w.fetchInstallations({pageNumber:t,pageSize:e,filterParams:a,searchString:l}))}};var Qt=a(14041);const qt=()=>{const e=(0,r.wA)(),{tableData:t}=(0,r.d4)(Fe.getTableData),{organisationId:a}=(0,r.d4)(Ut.T.getSelectedOrganisation),n=(0,r.d4)(Fe.selectedInstallationJobIds),i=(({dispatch:e,tableData:t,isRulesEnabled:a,isResolvedEnabled:s,isArchiveEnabled:n,reloadInstallationTable:r,selectedInstallationJobIds:i,messages:o})=>{const d=0===(null==i?void 0:i.length);return[...n?[{key:"archive",label:zt.createElement(_t.m,{title:zt.createElement(l.s,{id:"installations.page.dropdown-options.bulk-actions.archive.tooltip"})},zt.createElement("div",null,zt.createElement(l.s,{id:"installations.page.dropdown-options.bulk-actions.archive"}))),disabled:d,onClick:()=>{e(w.archivedSelectJobs(i,o)),setTimeout(r,500)}},{key:"unarchive",label:zt.createElement(l.s,{id:"installations.page.dropdown-options.bulk-actions.unarchive",tagName:"div"}),disabled:d,onClick:()=>{e(w.unarchivedSelectJobs(i,o)),setTimeout(r,500)}}]:[],...s?[{key:"mark-as-resolved",label:zt.createElement(_t.m,{title:zt.createElement(l.s,{id:"installations.page.button.mark-as-resolved.tooltip"})},zt.createElement("div",null,zt.createElement(l.s,{id:"installations.page.dropdown-options.bulk-actions.mark-as-resolved"}))),disabled:d,onClick:()=>{const a=t.filter(e=>i.includes(e.id)&&!u.NR.some(t=>{var a;return null==(a=e.statusMessages)?void 0:a.includes(t)}));a.length?a.length!==i.length?e(w.markAsResolvedModalOpened(a.map(e=>e.id))):(e(w.resolveSelectedJobs(i,o)),setTimeout(r,500)):e(w.markAsResolvedModalOpened([]))}}]:[],...a?[{key:"rules",label:zt.createElement(l.s,{id:"installations.page.dropdown-options.bulk-actions.rules",tagName:"div"}),onClick:()=>e(w.installationRulesDrawerOpened(M.kn.LIST))}]:[]]})({dispatch:e,tableData:t,isRulesEnabled:Boolean((0,$t.F)("installations.bulkActionsRules","ruleOrganisationWhitelist",a)),isResolvedEnabled:Boolean((0,$t.F)("installations.bulkActionsResolved")),isArchiveEnabled:Boolean((0,$t.F)("installations.bulkActionsArchived")),reloadInstallationTable:Yt(),selectedInstallationJobIds:n,messages:qe({
1successMessage:"installations.error-drawer.resolve.successMessage.default",errorMessage:"installations.error-drawer.resolve.errorMessage.default"})});return 0===i.length?null:Qt.createElement(Bt.m,{menu:{items:i}},Qt.createElement(s.$,{"data-testid":"bulk-action-dropdown"},Qt.createElement(Wt.$,null,Qt.createElement(l.s,{id:"installations.page.dropdown.bulk-actions"}),Qt.createElement(Ht.A,null))))};var Kt=a(76787),Gt=a(15675),Xt=a(92211),Zt=a(28966),ea=a(94752),ta=a(87054),aa=a(65802);const la=({statusMessages:e,isResolvedManually:t,t:a})=>{const l=null==e?void 0:e.map(e=>a(u.Xl[e]));return!t&&(null==l?void 0:l.length)?l:[]};var sa=a(40026),na=a(12309),ra=a(83593);const ia=({jobId:e,fileType:t})=>{const a=(0,r.wA)(),{t:l}=(0,i.t)();return(0,Nt.useCallback)(s=>{s.stopPropagation(),a(w.downloadInstallationFile({jobId:e,fileType:t},{meta:{errorMessage:l("installations.table.file-download-link.error")}}))},[e,t,a,l])};var oa=a(14041);const da=({jobId:e})=>{const t=(0,ra.D)(),a=ia({jobId:e,fileType:u.tP.JOB_SHEET});return oa.createElement(s.$,{"data-pendoid":"installation-job-slip-pdf-button",type:"link",icon:oa.createElement(na.A,{twoToneColor:t.colors.eroadBrand}),onClick:e=>a(e)},oa.createElement(l.s,{id:"installations.table.pdf-installation-slip.text",tagName:"span"}))},ca=(0,et.wY)(()=>({messages:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}),{name:"InstallationStatus"}),ua=(0,et.wY)(()=>({upperCaseText:{textTransform:"uppercase"}}),{name:"RuchoFormButton"});var pa=a(14041);const ma=({jobId:e})=>{const t=(0,ra.D)(),a=ua(),n=ia({jobId:e,fileType:u.tP.RUCHO_FORM});return pa.createElement(s.$,{"data-pendoid":"installs-pdf-rucho-form-button",type:"link",icon:pa.createElement(na.A,{twoToneColor:t.colors.eroadBrand}),onClick:e=>n(e)},pa.createElement(l.s,{id:"installations.table.pdf-rucho-form-link.text",values:{span:e=>pa.createElement("span",{className:a.upperCaseText},e)},tagName:"span"}))};var ba=a(14041);const ga=({status:e,statusMessages:t=[],ruchoFormLink:a,installationJobPdfLink:l,jobId:s,isResolvedManually:n})=>{const r=ca(),{t:o}=(0,i.t)(),d=la({statusMessages:t,isResolvedManually:n,t:o}),c=!!(null==d?void 0:d.length);return ba.createElement(sa.y,{align:"middle"},ba.createElement(sa.f,{span:c?5:13},ba.createElement(sa.f,null,ba.createElement(Be.v,null,u.KV[e]))),c&&ba.createElement(sa.f,{span:8},ba.createElement(_t.m,{title:null==d?void 0:d.join("\n"),placement:"bottomLeft",overlayInnerStyle:{whiteSpace:"pre-line"}},ba.createElement("div",{className:r.messages},ba.createElement(He.j,{status:He.w.AMBER,colorText:!0,type:"deprecatedAlert",text:null==d?void 0:d.join(", ")})))),a&&ba.createElement(sa.f,{span:5},ba.createElement(ma,{jobId:s})),l&&ba.createElement(sa.f,{span:5},ba.createElement(da,{jobId:s})))};var ya=a(14041);const va=[{title:ya.createElement(l.s,{id:"installations.table.column.serial.title"}),dataIndex:"serial",key:"serial"},{title:ya.createElement(l.s,{id:"installations.table.column.rego.title"}),dataIndex:"rego",key:"rego"},{title:ya.createElement(l.s,{id:"installations.table.column.type.title"}),dataIndex:"type",key:"type"},{title:ya.createElement(l.s,{id:"installations.table.column.make.title"}),dataIndex:"make",key:"make"},{title:ya.createElement(l.s,{id:"installations.table.column.status.title"}),dataIndex:"status",key:"status",width:760,render:({status:e,statusMessages:t,ruchoFormLink:a,installationJobPdfLink:l,jobId:s,isResolvedManually:n})=>ya.createElement(ga,{status:e,statusMessages:t,ruchoFormLink:a,installationJobPdfLink:l,jobId:s,isResolvedManually:n})},{title:ya.createElement(l.s,{id:"installations.table.column.installer.title"}),dataIndex:"installer",key:"installer"},{title:ya.createElement(l.s,{id:"installations.table.column.installDate.title"}),dataIndex:"installDate",key:"installDate",render:e=>e&&ya.createElement(It.X,{value:e,valueIsInSeconds:!0})},{title:ya.createElement(l.s,{id:"installations.table.column.deviceType.title"}),dataIndex:"deviceType",key:"deviceType",render:({type:e,subType:t})=>ya.createElement(Ye,{type:e,subType:t})},{title:ya.createElement(l.s,{id:"installations.table.column.installationType.title"}),dataIndex:"jobType",key:"jobType",render:e=>e&&ya.createElement(l.s,{id:u.HG[e]})},{title:ya.createElement(l.s,{id:"installations.table.column.jobID.title"}),dataIndex:"id",key:"jobID"}];var fa=a(14041);const ha=({data:e,t},a,l)=>{const s=(e=>e.map(Me))(e);return s.map(e=>{const s={};return va.forEach(({title:n,dataIndex:r})=>{const i=(({key:e,item:t,t:a},l,s)=>{if((0,ea.g)(t[e]))return"";switch(e){case"installDate":{const{installDate:e}=t,a=(0,Gt.y)(e)?1e3*e:e;return`${(0,Xt.Y)({date:a,format:"D MMM YYYY, h:mm A",timeZone:l})} ${(0,Zt.v)({date:a,timeZone:l,locale:s,short:!0})}`}case"jobType":{const{jobType:e}=t;return n=e,Object.hasOwn(u.HG,n)?a(u.HG[e]):""}case"deviceType":{const e=(0,_e.d)(t.deviceType);return e?a(e):""}case"status":{const e=t.status.status,l=e&&(e=>Object.hasOwn(u.aK,e))(e)?e:M.zY.UNKNOWN,s=a(u.aK[l]),n=t.status.statusMessages||[],r=la({statusMessages:n,isResolvedManually:t.isResolvedManually,t:a});
1return s+(r.length?`: ${r.join(", ")}`:"")}default:{const a=t[e];return(0,aa.K)(a)||(0,ta.E)(a)||(0,_.L)(a)?a:""}}var n})({key:r,item:e,t},a,l);s[t(n.props.id)]=i}),s})},wa=()=>{const e=(0,Nt.useCallback)((e,t)=>{if(!e.length)return;const a=[],l=Object.keys(e[0]);a.push(l.join(","));for(const t of e){const e=l.map(e=>`"${(""+t[e]).replace(/"/g,'\\"')}"`);a.push(e.join(","))}const s=a.join("\n"),n=new Blob([s],{type:"text/csv"}),r=URL.createObjectURL(n),i=document.createElement("a");i.setAttribute("href",r),i.setAttribute("download",t),i.click(),URL.revokeObjectURL(r)},[]),t=(0,r.wA)(),{t:a,timeZone:l,locale:s}=(0,i.t)(),{filterParams:n,searchString:o}=(0,r.d4)(Fe.getInstallationsQueryParams),{request:d,result:c}=(0,r.d4)(Fe.getExportInstallations),u=(null==d?void 0:d.status)===Kt.IQ.SUCCESS,p=ha({data:c.data||[],t:a},l,s);return(0,Nt.useEffect)(()=>{u&&e(p,"Installation-Jobs.csv")},[p,e,u]),fa.createElement(jt.NV,{onClick:()=>{t(w.exportInstallations({filterParams:n,searchString:o}))},"data-pendoid":"installation-jobs-csv-export-button"})};var Ea=a(14041);const Ia=()=>{const e=(0,r.wA)(),{t}=(0,i.t)(),{tableData:a}=(0,r.d4)(Fe.getTableData),n=(0,r.d4)(Fe.selectedInstallationJobIds),o=Yt(),d=qe({successMessage:"installations.error-drawer.resolve.successMessage.default",errorMessage:"installations.error-drawer.resolve.errorMessage.default"}),c=0===(null==n?void 0:n.length);return Ea.createElement(_t.m,{title:t("installations.page.button.mark-as-resolved.tooltip"),placement:"topLeft"},Ea.createElement(s.$,{key:"resolved-button",onClick:()=>{const t=a.filter(e=>n.includes(e.id)&&!u.NR.some(t=>{var a;return null==(a=e.statusMessages)?void 0:a.includes(t)}));t.length?t.length!==n.length?e(w.markAsResolvedModalOpened(t.map(e=>e.id))):(e(w.resolveSelectedJobs(n,d)),setTimeout(o,500)):e(w.markAsResolvedModalOpened([]))},disabled:c},Ea.createElement(l.s,{id:"installations.page.button.mark-as-resolved"})))};var Da=a(14041);const ka=()=>{const e=(0,r.wA)();return Da.createElement(s.$,{type:"primary",onClick:()=>{e(w.installationRulesDrawerOpened(M.kn.LIST))},"data-pendoid":"open-rule-drawer"},Da.createElement(l.s,{id:"installations.page.button.add-rule"}))};var Oa=a(14041);const Ra=()=>{const{organisationId:e}=(0,r.d4)(Ut.T.getSelectedOrganisation),t=(0,$t.F)("installations.rules","ruleOrganisationWhitelist",e),a=(0,$t.F)("installations.csvExport"),l=(0,$t.F)("installations.markAsResolved");return Oa.createElement(Oa.Fragment,null,[Oa.createElement(qt,{key:"bulk-action-dropdown"})],l&&[Oa.createElement(Ia,{key:"mark-as-resolved-button"})],t&&[Oa.createElement(ka,{key:"rule-button"})],a&&[Oa.createElement(wa,{key:"csv-export-button"})])};var Ta=a(14041),Sa=Object.getOwnPropertySymbols,Ca=Object.prototype.hasOwnProperty,xa=Object.prototype.propertyIsEnumerable;const Aa=e=>{var t=((e,t)=>{var a={};for(var l in e)Ca.call(e,l)&&t.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&Sa)for(var l of Sa(e))t.indexOf(l)<0&&xa.call(e,l)&&(a[l]=e[l]);return a})(e,[]);const a=(0,r.wA)(),{t:l}=(0,i.t)(),s=(0,r.d4)(Fe.isFetchingInstallations),n=(0,$t.F)("installations.bulkSelect"),{tableData:o,totalRecords:d}=(0,r.d4)(Fe.getTableData),{currentView:c}=(0,r.d4)(Fe.getInstallationsDrawerView),{pageSize:u,pageNumber:p,filterParams:m,searchString:b}=(0,r.d4)(Fe.getInstallationsQueryParams),g=(0,r.d4)(Fe.selectedInstallationJobIds);return(0,Nt.useEffect)(()=>{c||a(w.fetchInstallations({pageNumber:p,pageSize:u,filterParams:m,searchString:b}))},[a,p,u,m,b,c]),Ta.createElement(v.XI,{"data-testid":t["data-testid"],loading:s,dataSource:o,columns:va,pagination:{total:d,current:p,pageSize:u},locale:{emptyText:l("installations.table.empty.message")},onPageNumberChange:e=>a(w.pageNumberChanged(e)),onPageSizeChange:e=>a(w.pageSizeChanged(e)),onRow:e=>({onClick:()=>{a(w.installationDrawerOpened(e))}}),rowSelection:n?{onChange:Pa({dispatch:a}),selectedRowKeys:g||[]}:void 0})},Pa=({dispatch:e})=>t=>{e(w.bulkInstallationJobsSelected(t.map(Number)))};var Ma=a(20307),Na=a(4078),ja=a(14041);const Ja=()=>{const e=(0,r.wA)(),t=(0,r.d4)(Fe.getDisplayMarkAsResolvedModalIds),a=null==t?void 0:t.length,s=Yt(),n=qe({
1successMessage:"installations.error-drawer.resolve.successMessage.default",errorMessage:"installations.error-drawer.resolve.errorMessage.default"});return ja.createElement(Na.a,{"data-testid":"mark-as-resolved-modal",title:ja.createElement(ja.Fragment,null,ja.createElement(Ma.A,{style:{color:"blue",marginRight:"8px"}}),ja.createElement(l.s,{id:"installations.page.modal.mark-as-resolved.title"})),open:null!==t&&Array.isArray(t),destroyOnClose:!0,onCancel:()=>{e(w.markAsResolvedModalClosed())},onOk:function(){null!==t&&t.length?(e(w.resolveSelectedJobs(t,n)),setTimeout(s,500)):e(w.markAsResolvedModalClosed())},okText:a?ja.createElement(l.s,{id:"installations.page.modal.mark-as-resolved.continue"}):ja.createElement(l.s,{id:"installations.page.modal.mark-as-resolved.okay"})},ja.createElement(l.s,{id:a?"installations.page.modal.mark-as-resolved-partial.message":"installations.page.modal.mark-as-resolved-cannot.message"}))};var La=a(15195),Fa=a(61418),Va=a(13215),Ua=a(64145),$a=a(93753);const Ha=[{value:"Light",key:"installations.rulesDrawer.form.vehicle-type.option.light"},{value:"Heavy",key:"installations.rulesDrawer.form.vehicle-type.option.heavy"}],Ba=[{value:"Ehubo2",key:"installations.rulesDrawer.form.hardware-type.option.ehubo2"}];var Wa=Object.defineProperty,_a=Object.getOwnPropertySymbols,za=Object.prototype.hasOwnProperty,Ya=Object.prototype.propertyIsEnumerable,Qa=(e,t,a)=>t in e?Wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;const qa=(e={})=>{var t=((e,t)=>{var a={};for(var l in e)za.call(e,l)&&t.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&_a)for(var l of _a(e))t.indexOf(l)<0&&Ya.call(e,l)&&(a[l]=e[l]);return a})(e,[]);return(0,z.I)(t)?{provisionRuleVehicleType:"Light",provisionRuleHardwareType:"Ehubo2"}:((e,t)=>{for(var a in t||(t={}))za.call(t,a)&&Qa(e,a,t[a]);if(_a)for(var a of _a(t))Ya.call(t,a)&&Qa(e,a,t[a]);return e})({},t)},Ka=(0,et.wY)(e=>({root:{padding:e.spacing(2)},labelWrapper:{alignItems:"center",display:"inline-flex",columnGap:e.spacing(1),"& > .anticon svg":{width:"auto",height:e.spacing(5)}},switchLabelWrapper:{marginLeft:e.spacing(1)},questionIcon:{width:"20px"}}),{name:"ProvisionRulesForm"});var Ga=a(99728),Xa=a(14041);
1const Za=({childOptions:e,onChange:t,parentLabel:a,placeholderLabel:l,selectedValues:s,testId:n})=>{const r=e.length>0?[{children:e,title:a,value:`${n}-parent`}]:[];return Xa.createElement(Ga.f,{"data-testid":n,maxTagCount:"responsive",onChange:e=>{t(Array.isArray(e)?e:[e])},placeholder:l,treeCheckable:!0,treeData:r,treeDefaultExpandAll:!0,value:s})};var el=a(14041);const tl=({rule:e})=>{const{t}=(0,i.t)(),a=Ka(),[s]=(0,Ke.mN)(),[n,r]=(0,Nt.useState)([]),[o,d]=(0,Nt.useState)([]),[c,u]=(0,Nt.useState)([]);return el.createElement(Ke.lV,{form:s,name:"provision-rule-form",layout:"vertical",initialValues:qa(e)},el.createElement(Ke.eI,{name:"provisionRuleName",rules:[{validator:al({t})},(0,Ze.yt)({t,tId:"installations.rulesDrawer.form.name.validation.required"})],label:el.createElement(l.s,{id:"installations.rulesDrawer.form.name.label"})},el.createElement(Ge.pd,{placeholder:t("installations.rulesDrawer.form.name.placeholder")})),el.createElement(Va.h,{size:4}),el.createElement(l.s,{tagName:"h3",id:"installations.rulesDrawer.form.if-the.label"}),el.createElement(Ke.eI,{required:!0,name:"provisionRuleVehicleType",label:el.createElement(l.s,{id:"installations.rulesDrawer.form.vehicle-type.label"})},el.createElement(Fa.l,{options:Ha.map(({value:e,key:t})=>({key:e,value:e,label:el.createElement(l.s,{id:t})}))})),el.createElement(Ke.eI,{required:!0,name:"provisionRuleHardwareType",label:el.createElement(l.s,{id:"installations.rulesDrawer.form.hardware-type.label"})},el.createElement(Fa.l,{options:Ba.map(({key:e,value:t})=>({key:t,value:t,label:el.createElement(l.s,{id:e})}))})),el.createElement(Ke.eI,{required:!0,name:"provisionRuleFleets",label:el.createElement(l.s,{id:"installations.rulesDrawer.form.fleets.label"})},el.createElement(Za,{childOptions:[{title:"Fleet A",value:"A"},{title:"Fleet B",value:"B"},{title:"Fleet C",value:"C"}],onChange:r,parentLabel:t("installations.rulesDrawer.form.fleets.groups.all"),placeholderL
1abel:t("installations.rulesDrawer.form.fleets.placeholder"),selectedValues:n,testId:"provision-rules-form-fleets"})),el.createElement(Va.h,{size:4}),el.createElement(l.s,{tagName:"h3",id:"installations.rulesDrawer.form.assign-automatically.label"}),el.createElement(Ke.eI,{required:!0,name:"provisionRuleVehiclePlan",label:el.createElement("div",{className:a.labelWrapper},el.createElement(l.s,{id:"installations.rulesDrawer.form.vehicle-plan.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.vehicle-plan.tooltip"})},el.createElement(La.A,null)))},el.createElement(Fa.l,{options:[{key:"1",value:1,label:"Safe driver"},{key:"2",value:2,label:"Dashcam"}]})),el.createElement(Ke.eI,{name:"provisionRuleServiceAddons",label:el.createElement("div",{className:a.labelWrapper},el.createElement(l.s,{id:"installations.rulesDrawer.form.service-plan-addons.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.service-plan-addons.tooltip"})},el.createElement(La.A,null)))},el.createElement(Za,{childOptions:[{title:"Ehubo ECM data",value:"1"},{title:"In-Cab service plan alert",value:"2"},{title:"Inactivity warning alert",value:"3"}],onChange:d,parentLabel:t("installations.rulesDrawer.form.service-plan-addons.groups.all"),placeholderL
1abel:t("installations.rulesDrawer.form.service-plan-addons.placeholder"),selectedValues:o,testId:"provision-rules-form-service-plan-add-ons"})),el.createElement(Ke.eI,{name:"provisionRuleDeviceFeatures",required:!0,label:el.createElement("div",{className:a.labelWrapper},el.createElement(l.s,{id:"installations.rulesDrawer.form.device-features.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.device-features.tooltip"})},el.createElement(La.A,null)))},el.createElement(Za,{childOptions:[{title:"Driver login",value:"1"},{title:"Messaging",value:"2"},{title:"Speed alert",value:"3"}],onChange:u,parentLabel:t("installations.rulesDrawer.form.device-features.groups.all"),placeholderLabel:t("installations.rulesDrawer.form.device-features.placeholder"),selectedValues:c,testId:"provision-rules-form-device-features"})),el.createElement(Va.h,{size:3}),el.createElement(Ke.eI,{name:"provisionRuleShareVehicleSwitch"},el.createElement(el.Fragment,null,el.createElement(Ua.d,null),el.createElement("div",{className:(0,Ve.$)(a.labelWrapper,a.switchLabelWrapper)},el.createElement(l.s,{id:"installations.rulesDrawer.form.share-vehicle-switch.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.share-vehicle-switch.tooltip"})},el.createElement(La.A,null))))),el.createElement(Ke.eI,{name:"provisionRuleThirdPartyIdentifierSwitch"},el.createElement(el.Fragment,null,el.createElement(Ua.d,null),el.createElement("div",{className:(0,Ve.$)(a.labelWrapper,a.switchLabelWrapper)},el.createElement(l.s,{id:"installations.rulesDrawer.form.third-party-identifier-switch.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.third-party-identifier-switch.tooltip"})},el.createElement(La.A,null))))),el.createElement(Ke.eI,{name:"provisionRuleThirdPartyHardwareSwitch"},el.createElement(el.Fragment,null,el.createElement(Ua.d,null),el.createElement("div",{className:(0,Ve.$)(a.labelWrapper,a.switchLabelWrapper)},el.createElement(l.s,{id:"installations.rulesDrawer.form.third-party-hardware-switch.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.third-party-hardware-switch.tooltip"})},el.createElement(La.A,null))))),el.createElement(Ke.eI,{name:"provisionRuleTaxConfigSwitch"},el.createElement(el.Fragment,null,el.createElement(Ua.d,null),el.createElement("div",{className:(0,Ve.$)(a.labelWrapper,a.switchLabelWrapper)},el.createElement(l.s,{id:"installations.rulesDrawer.form.tax-config-switch.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.tax-config-switch.tooltip"})},el.createElement(La.A,null))))),el.createElement(Ke.eI,{name:"provisionRuleTaxServicesSwitch"},el.createElement(el.Fragment,null,el.createElement(Ua.d,null),el.createElement("div",{className:(0,Ve.$)(a.labelWrapper,a.switchLabelWrapper)},el.createElement(l.s,{id:"installations.rulesDrawer.form.tax-services-switch.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.tax-services-switch.tooltip"})},el.createElement(La.A,null))))),el.createElement(Ke.eI,{name:"provisionRuleInspectTemplateSwitch"},el.createElement(el.Fragment,null,el.createElement(Ua.d,null),el.createElement("div",{className:(0,Ve.$)(a.labelWrapper,a.switchLabelWrapper)},el.createElement(l.s,{id:"installations.rulesDrawer.form.inspect-template-switch.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.inspect-template-switch.tooltip"})},el.createElement(La.A,null))))),el.createElement(Ke.eI,{name:"provisionRuleAuxiliaryInputsSwitch"},el.createElement(el.Fragment,null,el.createElement(Ua.d,null),el.createElement("div",{className:(0,Ve.$)(a.labelWrapper,a.switchLabelWrapper)},el.createElement(l.s,{id:"installations.rulesDrawer.form.auxiliary-inputs-switch.label"}),el.createElement(_t.m,{title:el.createElement(l.s,{id:"installations.rulesDrawer.form.auxiliary-inputs-switch.tooltip"})},el.createElement(La.A,{className:a.questionIcon}))))))},al=({t:e})=>(t,a)=>$a.sg.test(a)?Promise.reject(new Error(e("installations.rulesDrawer.form.name.validation.no-special-chars"))):Promise.resolve();var ll=a(14041),sl=a(58560),nl=a(14041);const rl=(0,et.wY)(e=>({root:{padding:e.spacing(4)},listViewEmptyContainer:{position:"absolute",display:"flex",left:0,right:0,textAlign:"center",justifyContent:"center",alignItems:"center",padding:e.spacing(6)},listViewHeader:{padding:`${e.spacing(4)}px ${e.spacing(6)}px 0`},confirmIcon:{color:`${e.colors.primaryBlueHover} !important`}}),{name:"InstallationsRuleDrawer"});var il=a(14041),ol=Object.defineProperty,dl=Object.getOwnPropertySymbols,cl=Object.prototype.hasOwnProperty,ul=Object.prototype.propertyIsEnumerable,pl=(e,t,a)=>t in e?ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;const ml={[M.kn.LIST]:({rules:e,setView:t,classes:a})=>({title:nl.createElement(l.s,{id:"installations.rulesDrawer.listView.title"}),headerSection:nl.createElement("div",{className:a.listViewHeader},nl.createElement(s.$,{block:!0,"data-pendoid":"provisioning-rules-create-button",onClick:()=>t(M.kn.CREATE),type:"primary"},nl.createElement(l.s,{id:"installations.rulesDrawer.listView.addButton"}))),children:e.length?null:nl.createElement("div",{className:a.listViewEmptyContainer},nl.createElement(sl.S,{description:nl.createElement(l.s,{id:"installations.rulesDrawer.listView.empty",values:{strong:e=>nl.createElement("strong",null,e)}})}))}),[M.kn.CREATE]:({setView:e,formSubmitting:t,t:a,classes:s})=>({title:ll.createElement(l.s,{id:"installations.rulesDrawer.createView.title"}
1),primaryButtonConfig:{"data-pendoid":"provisioning-rules-save-button",form:"provision-rules-form",htmlType:"submit",label:ll.createElement(l.s,{id:t?"installations.rulesDrawer.createView.button.submitting":"installations.rulesDrawer.createView.button.submit",tagName:"span"}),loading:t},secondaryButtonConfig:{label:ll.createElement(l.s,{id:"installations.rulesDrawer.createView.button.cancel",tagName:"span"}),onClick:()=>{Na.a.confirm({icon:ll.createElement(Ma.A,{className:s.confirmIcon}),title:a("installations.rulesDrawer.createView.confirm-popup.title"),content:a("installations.rulesDrawer.createView.confirm-popup.message"),onOk:()=>e(M.kn.LIST),okText:a("installations.rulesDrawer.createView.confirm-popup.yes-button"),cancelText:a("installations.rulesDrawer.createView.confirm-popup.no-button")})}},children:ll.createElement(tl,null)})},bl=()=>{const e=(0,r.wA)(),t=rl(),{t:a}=(0,i.t)(),l=(0,r.d4)(Fe.getInstallationRules),{currentView:s,visible:n}=(0,r.d4)(Fe.getInstallationsRulesDrawerView),o=null!==(d=s)&&Object.hasOwn(ml,d)?ml[s]({rules:l||[],setView:t=>{e(w.installationRulesDrawerViewChanged(t))},formSubmitting:!1,classes:t,t:a}):void 0;var d;const c=null!=o?o:{title:void 0,children:null},{children:u,title:p}=c,m=((e,t)=>{var a={};for(var l in e)cl.call(e,l)&&t.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&dl)for(var l of dl(e))t.indexOf(l)<0&&ul.call(e,l)&&(a[l]=e[l]);return a})(c,["children","title"]);return il.createElement(De._s,((e,t)=>{for(var a in t||(t={}))cl.call(t,a)&&pl(e,a,t[a]);if(dl)for(var a of dl(t))ul.call(t,a)&&pl(e,a,t[a]);return e})({type:De.ts.STANDARD,key:"installations-rules-drawer","data-testid":"installations-rules-drawer",open:n,onClose:()=>{return t=function*(){e(w.installationRulesDrawerClosed())},new Promise((e,a)=>{var l=e=>{try{n(t.next(e))}catch(e){a(e)}},s=e=>{try{n(t.throw(e))}catch(e){a(e)}},n=t=>t.done?e(t.value):Promise.resolve(t.value).then(l,s);n((t=t.apply(void 0,null)).next())});var t},title:p},m),il.createElement("div",{className:t.root},u))};var gl=a(14041);const yl=()=>{const e=Vt(),t=p();return gl.createElement(n.YW,{"data-pendoid":"installs-page"},gl.createElement(n.zY,null,gl.createElement(n.sT,{title:gl.createElement(l.s,{id:"installations.page.header.title"}),actions:gl.createElement(Ra,null)}),gl.createElement(n.Kw,{text:gl.createElement(l.s,{id:"installations.page.header.description",values:{ehuboPageLink:gl.createElement(s.$,{className:e.linkButton,"data-testid":"installations-page-header-looking-for-ehubos-page",type:"link",onClick:t},gl.createElement(l.s,{id:"installations.page.header.looking-for-ehubo-page"}))}})})),gl.createElement(n.TK,null,gl.createElement(Lt,null),gl.createElement(Aa,{"data-testid":"installations-table"}),gl.createElement(bl,null),gl.createElement(Mt,null),gl.createElement(Ja,null)))},vl=Ie(yl)},74149:(e,t,a)=>{a.d(t,{$:()=>c});var l=a(79725),s=a(14041),n=Object.defineProperty,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,d=(e,t,a)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;const c=e=>{var t=e,{children:a}=t,n=((e,t)=>{var a={};for(var l in e)i.call(e,l)&&t.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&r)for(var l of r(e))t.indexOf(l)<0&&o.call(e,l)&&(a[l]=e[l]);return a})(t,["children"]);return s.createElement(l.A,((e,t)=>{for(var a in t||(t={}))i.call(t,a)&&d(e,a,t[a]);if(r)for(var a of r(t))o.call(t,a)&&d(e,a,t[a]);return e})({},n),a)}},84702:(e,t,a)=>{a.d(t,{d:()=>r});var l=a(24134),s=a(93753),n=a(18198);const r=({type:e,subType:t})=>{const a=n.pN[e],r=s.yc[e],i=s.yc[t];return a!==n.pN.THIRD_PARTY_DEVICE&&a!==n.pN.CORE_HUB||(0,l.I)(i)?r:i}},89054:(e,t,a)=>{a.d(t,{i:()=>m});var l=a(14041),s=a(52316),n=a(94386),r=a(14041),i=Object.defineProperty,o=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,a)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,p=(e,t)=>{for(var a in t||(t={}))d.call(t,a)&&u(e,a,t[a]);if(o)for(var a of o(t))c.call(t,a)&&u(e,a,t[a]);return e};const m=e=>{var t=e,{url:a,baseUrl:n,imageDataKey:i,responseType:u,imageType:m}
1=t,g=((e,t)=>{var a={};for(var l in e)d.call(e,l)&&t.indexOf(l)<0&&(a[l]=e[l]);if(null!=e&&o)for(var l of o(e))t.indexOf(l)<0&&c.call(e,l)&&(a[l]=e[l]);return a})(t,["url","baseUrl","imageDataKey","responseType","imageType"]);const y="URI"===m?new Blob([]):"",[v,f]=(0,l.useState)(y);if(b(f,n,a,i,u),"URI"===m){const e="object"==typeof v?window.URL.createObjectURL(v):"";return r.createElement(s._,p({src:e},g))}return r.createElement(s._,p({src:`data:image/jpeg;base64,${v}`},g))},b=(e,t,a,s,r)=>{(0,l.useEffect)(()=>{!function(){return l=this,i=function*(){const l=yield(0,n.F)({url:a,baseURL:t,method:"GET",responseType:r}),i=s?l[s]:l;e(i)},new Promise((e,t)=>{var a=e=>{try{n(i.next(e))}catch(e){t(e)}},s=e=>{try{n(i.throw(e))}catch(e){t(e)}},n=t=>t.done?e(t.value):Promise.resolve(t.value).then(a,s);n((i=i.apply(l,null)).next())});var l,i}()},[e,t,a,s,r])}}}]);
2//# sourceMappingURL=installations.myeroad.0ac7d8d585ac75f63d5f.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.