PageSourceSearch

https://altego.portal.polyfazer.eu/chunks/device-details-DwkT8GFP.js

js polyfazer.eu collected 2026-09-24 14:05:56 UTC 16,846 bytes, 409 lines download raw bytes

1import{C as i,P as n,m as t}from"./polyfazer-app-DumDTOPg.js";import{h as o}from"./polymer-utils-B8xivS0d.js";import{L as s}from"./lang-helper-behavior-D3p_DZHb.js";import"./connector-icons-CU2MvAxY.js";import"./question-tag-C9ym_uv9.js";import{U as e}from"./main-BEpca-0G.js";import"./BetterHTML-BN6nzApa.js";import"./BetterTemplateHandling-CTXk4mRb.js";import"./ExtendedDate-BLMVein7.js";class r extends i(s(n)){static get template(){return o`
2			${super.template}
3			<style>
4				:host {
5					display: block;
6				}
7
8				.details-header {
9					/*noinspection CssInvalidAtRule*/
10					@apply --device-details-header;
11				}
12
13				.device-details {
14					display: flex;
15					flex-wrap: wrap;
16					align-items: flex-start;
17
18					/*noinspection CssInvalidAtRule*/
19					@apply --device-details;
20				}
21
22				.device-details > div {
23					flex: 1;
24					min-width: 200px;
25				}
26
27				.device-details > div:not(:last-of-type) {
28					margin-right: 10px;
29				}
30
31				.components-wrap {
32					margin: 0 20px;
33				}
34
35				.components {
36					display: grid;
37					grid-gap: 10px;
38					grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
39				}
40
41				.component {
42					margin: 0 0 10px;
43					padding: 20px;
44				}
45
46				.component-header {
47					display: flex;
48					font-weight: bold;
49					align-items: center;
50					justify-content: flex-start;
51					background: rgba(0, 0, 0, 0.03);
52					margin: -20px -20px 20px -20px;
53					padding: 15px;
54					box-shadow: 0 1px 1px 0 rgba(60, 64, 67, .08), 0 1px 3px 1px rgba(60, 64, 67, .16);
55				}
56
57				.component-header iron-icon {
58					font-size: 2em;
59					margin-right: 10px;
60				}
61
62				h4 {
63					margin: 10px -20px 20px;
64					padding: 5px 20px;
65					border-bottom: 1px solid var(--primary-border-color);
66				}
67
68				.component-details {
69					grid-template-columns: auto 1fr auto;
70				}
71
72				.subtitle {
73					font-size: 0.8em;
74					color: var(--light-text-color);
75					font-weight: 500;
76					margin-top: -0.2em;
77					margin-bottom: -0.3em;
78				}
79
80				.warranty-expired {
81					color: var(--error-color);
82				}
83
84				@media screen and (max-width: 500px) {
85					.components {
86						grid-template-columns: 1fr;
87					}
88				}
89			</style>
90
91			<header class="details-header">
92				<div class="device-details">
93					<div class="grid-table">
94						<label>[[_lang('name')]]</label>
95						<div class="item-value">[[device.name]]</div>
96
97						<label>[[_lang('description')]]</label>
98						<pre class="item-value">[[or(device.description, '-')]]</pre>
99
100						<dom-restricted restricted="${t.DEVICE_TEMPLATES}">
101							<template>
102								<template is="dom-if" if="[[device.template.id]]">
103									<label>[[_lang('template')]]</label>
104									<div class="item-value">
105										<redirect-item item="[[device.template]]" href="/device-templates/[[device.template.id]]" wrap-text></redirect-item>
106									</div>
107								</template>
108							</template>
109						</dom-restricted>
110
111						<template is="dom-if" if="[[or(device.warranty.months, device.warranty.expiresAt)]]">
112							<label>[[_lang('warranty')]]</label>
113							<template is="dom-if" if="[[device.warrantyExpired]]">
114								<div class="warranty-expired">[[_lang('deviceWarrantyExpired')]]</div>
115							</template>
116							<template is="dom-if" if="[[!device.warrantyExpired]]">
117								<div>[[_getWarrantyUntilText(device.warranty.expiresAt)]]</div>
118							</template>
119
120							<label></label>
121							<pre>[[device.warranty.notes]]</pre>
122						</template>
123					</div>
124
125					<div class="grid-table">
126						<label>[[_lang('type')]]</label>
127						<div class="item-value">[[translateLocationDeviceType(device.type)]]</div>
128
129						<label>[[_lang('serialNumber')]]</label>
130						<div class="item-value">[[or(device.serialNumber, '-')]]</div>
131
132						<label>[[_lang('model')]]</label>
133						<div class="item-value">[[or(device.model, '-')]]</div>
134
135						<label>[[_lang('manufacturer')]]</label>
136						<div class="item-value">[[or(device.manufacturer, '-')]]</div>
137
138						<label>[[_lang('manufacturedOn')]]</label>
139						<div class="item-value">
140							<template is="dom-if" if="[[device.manufacturedOn]]">
141								[[millisecondsToDate(device.manufacturedOn, 0, 0, 1)]]
142							</template>
143							<template is="dom-if" if="[[!device.manufacturedOn]]">-</template>
144						</div>
145
146						<label>[[_lang('owner')]]</label>
147						<div class="item-value">[[or(device.owner, '-')]]</div>
148
149						<label>[[_lang('unitType')]]</label>
150						<div class="item-value">[[or(device.unitType, '-')]]</div>
151					</div>
152				</div>
153
154				<slot name="header-suffix"></slot>
155			</header>
156
157			<div class="components-wrap">
158				<h1 hidden$="[[!device.components.length]]">[[_lang('deviceComponents')]]</h1>
159
160				<div class="components">
161					<template is="dom-repeat" items="[[device.components]]" as="component">
162						<paper-material class="component">
163							<header class="component-header">
164								<iron-icon icon="[[component.iconReference]]" class="unify" style$="color: [[component.colorReference]]"></iron-icon>
165
166								<div>
167									<div>[[component.name]]</div>
168									<template is="dom-if" if="[[component.componentType]]">
169										<div class="subtitle">[[_langPrefix('deviceComponentType_', component.componentType)]]</div>
170									</template>
171								</div>
172
173								<template is="dom-if" if="[[canModify]]">
174									<a class="link action-button" href$="[[editRootUrl]]/edit?component=[[component.id]]" style="margin-left: auto">
175										<question-tag icon="edit">[[_lang('edit')]]</question-tag>
176									</a>
177								</template>
178							</header>
179
180							<div class="grid-table component-details">
181								<label>[[_lang('description')]]</label>
182								<div class="item-value">[[or(component.description, '-')]]</div>
183								<span></span>
184
185								<label>[[_lang('serialNumber')]]</label>
186								<div class="item-value">[[or(component.serialNumber, '-')]]</div>
187								<span></span>
188
189								<template is="dom-repeat" items="[[component.variables]]" as="variable" filter="_filterEmptyVariable">
190									<label>[[variable.name]]</label>
191									<div class="item-value">
192										<template is="dom-repeat" items="[[variable.attributes]]" as="attr">
193											[[or(attr.value, '-')]]
194										</template>
195									</div>
196									<template is="dom-if" if="[[variable.description]]">
197										<question-tag>[[variable.description]]</question-tag>
198									</template>
199									<template is="dom-if" if="[[!variable.description]]">
200										<span></span>
201									</template>
202								</template>
203							</div>
204
205							<!-- Connector -->
206							<template is="dom-if" if="[[isEqual(component.componentType, '${e.CONNECTOR}')]]">
207								<hr style="margin-top: 1rem" class="fancy"/>
208								<label style="margin-bottom: 0.5rem">[[_lang('connectorConfiguration')]]</label>
209
210								<div class="grid-table label-auto">
211									<!-- Standard -->
212									<label>[[_lang('connectorType')]]</label>
213									<div class="value">[[findLocalTitle(component.connectorConfiguration.standard.name)]]</div>
214
215									<!-- Channel -->
216									<label>[[_lang('channel')]]</label>
217									<div class="value">[[component.connectorConfiguration.connectorID]]</div>
218
219									<!-- Voltage -->
220									<label>[[_lang('voltage')]]</label>
221									<div class="value">[[component.connectorConfiguration.voltage]]V</div>
222
223									<!-- Amperage -->
224									<label>[[_lang('amperage')]]</label>
225									<div class="value">[[component.connectorConfiguration.amperage]]A</div>
226
227									<!-- Power output -->
228									<label>[[_lang('powerOutput')]]</label>
229									<div class="value">[[component.connectorConfiguration.powerOutput]]kW</div>
230
231									<!-- Meter value multiplier -->
232									<label>[[_lang('meterValueMultiplier')]]</label>
233									<div class="value">[[component.connectorConfiguration.meterValueMultiplier]]x</div>
234
235									<!-- Power type -->
236									<label>[[_lang('powerType')]]</label>
237									<div class="value">[[translatePowerType(component.connectorConfiguration.powerType)]]</div>
238
239									<!-- Format -->
240									<label>[[_lang('format')]]</label>
241									<div class="value">[[translateUnitFormat(component.connectorConfiguration.format)]]</div>
242								</div>
243							</template>
244
245							<!-- SIM card -->
246							<template is="dom-if" if="[[isEqual(component.componentType, '${e.SIM_CARD}')]]">
247								<hr style="margin-top: 1rem" class="fancy"/>
248								<label style="margin-bottom: 0.5rem">[[_lang('simParameters')]]</label>
249
250								<div class="grid-table label-auto">
251									<!-- Type -->
252									<label>[[_lang('type')]]</label>
253									<div class="value">[[_langPrefix('simComponentType_', component.simConfiguration.type)]]</div>
254
255									<!-- Operator -->
256									<label>[[_lang('operator')]]</label>
257									<div class="value">[[or(component.simConfiguration.operator, '-')]]</div>
258
259									<!-- IMEI -->
260									<label>[[_lang('imei')]]</label>
261									<div class="value">[[or(component.simConfiguration.imei, '-')]]</div>
262
263									<!-- Phone number -->
264									<label>[[_lang('phoneNumber')]]</label>
265									<div class="value">[[or(component.simConfiguration.phoneNumber, '-')]]</div>
266
267									<!-- Owner -->
268									<label>[[_lang('owner')]]</label>
269									<div class="value">[[or(component.simConfiguration.owner, '-')]]</div>
270
271									<!-- Active since -->
272									<label>[[_lang('activeSince')]]</label>
273									<div class="value">
274										<template is="dom-if" if="[[component.simConfiguration.activeSince]]">
275											[[millisecondsToDate(component.simConfiguration.activeSince, 1, 1)]]
276										</template>
277										<template is="dom-if" if="[[!component.simConfiguration.activeSince]]">-</template>
278									</div>
279
280									<!-- Billing mode -->
281									<label>[[_lang('billingMode')]]</label>
282									<div class="value">[[_langPrefix('simComponentBillingMode_', component.simConfiguration.billingMode)]]</div>
283								</div>
284							</template>
285
286							<!-- POS device -->
287							<template is="dom-if" if="[[isEqual(component.componentType, '${e.POINT_OF_SALE}')]]">
288								<hr style="margin-top: 1rem" class="fancy"/>
289								<label style="margin-bottom: 0.5rem">[[_lang('posParameters')]]</label>
290
291								<div class="grid-table label-auto">
292
293									<template is="dom-if" if="[[!deviceTemplateMode]]">
294										<label>[[_lang('posDeviceID')]]</label>
295										<div class="value">[[device.id]]</div>
296									</template>
297									
298									<label>[[_lang('posSelectionMode')]]</label>
299									<div class="value">[[_langPrefix('posSelectionMode_', component.posConfiguration.selectionMode)]]</div>
300									
301									<label>[[_lang('posStateOverride')]]</label>
302									<div class="value">[[_langPrefix('posAvailabilityState_', component.posConfiguration.stateOverride)]]</div>
303
304									<label>[[_lang('posPaymentProvider')]]</label>
305									<div class="value">[[_langPrefix('posPaymentProvider_', component.posConfiguration.paymentProvider)]]</div>
306									
307									<label>[[_lang('posShowSplashScreen')]]</label>
308									<div class="value">[[_langIf(component.posConfiguration.showSplashScreen, 'yes', 'no')]]</div>
309									<label>[[_lang('posEnableRFID')]]</label>
310									<div class="value">[[_langIf(component.posConfiguration.enableRFID, 'yes', 'no')]]</div>
311									<label>[[_lang('posEnablePayment')]]</label>
312									<div class="value">[[_langIf(component.posConfiguration.enablePayment, 'yes', 'no')]]</div>
313									<label>[[_lang('posAuthorizeStop')]]</label>
314									<div class="value">[[_langIf(component.posConfiguration.authorizeStop, 'yes', 'no')]]</div>
315									<label>[[_lang('posEnableInvoiceQR')]]</label>
316									<div class="value">[[_langIf(component.posConfiguration.enableInvoiceQR, 'yes', 'no')]]</div>
317									<label>[[_lang('posEnableAppOffer')]]</label>
318									<div class="value">[[_langIf(component.posConfiguration.enableAppOffer, 'yes', 'no')]]</div>
319									<label>[[_lang('posEnableAppPairing')]]</label>
320									<div class="value">[[_langIf(component.posConfiguration.enableAppPairing, 'yes', 'no')]]</div>
321										
322									<label>[[_lang('posAppPairingTimeLimitSeconds')]]</label>
323									<div class="value">[[secondsToDuration(component.posConfiguration.appPairingTimeLimitSeconds)]]</div>
324									<label>[[_lang('posCustomAppQR')]]</label>
325									<div class="value">[[component.posConfiguration.customAppQR]]</div>
326									<label>[[_lang('posCustomAppName')]]</label>
327									<div class="value">[[component.posConfiguration.customAppName]]</div>
328									<label>[[_lang('posDefaultLocale')]]</label>
329									<div class="value">[[component.posConfiguration.defaultLocale]]</div>
330									<label>[[_lang('posEvseFilter')]]</label>
331									<div class="value">[[component.posConfiguration.evseFilter]]</div>
332									<label>[[_lang('posConnectorFilter')]]</label>
333									<div class="value">[[component.posConfiguration.connectorFilter]]</div>
334									
335								</div>
336							</template>
337
338							<!-- MEKH reported master data -->
339							<template is="dom-if" if="[[isEqual(component.componentType, '${e.MEKH}')]]">
340								<hr style="margin-top: 1rem" class="fancy"/>
341								<label style="margin-bottom: 0.5rem">[[_lang('mekhParameters')]]</label>
342
343								<div class="grid-table label-auto">
344									<label>[[_lang('mekhIdentifier')]]</label>
345									<div class="value">[[or(component.mekhConfiguration.mekhIdentifier, '-')]]</div>
346
347									<label>[[_lang('mekhLandRegistryNumber')]]</label>
348									<div class="value">[[or(component.mekhConfiguration.landRegistryNumber, '-')]]</div>
349
350									<label>[[_lang('mekhGridConnectionType')]]</label>
351									<div class="value">
352										<template is="dom-if" if="[[component.mekhConfiguration.gridConnectionType]]">
353											[[_langPrefix('mekhGridConnectionType_', component.mekhConfiguration.gridConnectionType)]]
354										</template>
355										<template is="dom-if" if="[[!component.mekhConfiguration.gridConnectionType]]">-</template>
356									</div>
357
358									<label>[[_lang('mekhCommissionedOn')]]</label>
359									<div class="value">
360										<template is="dom-if" if="[[component.mekhConfiguration.commissionedOn]]">
361											[[millisecondsToDate(component.mekhConfiguration.commissionedOn, 1, 1)]]
362										</template>
363										<template is="dom-if" if="[[!component.mekhConfiguration.commissionedOn]]">-</template>
364									</div>
365
366									<label>[[_lang('mekhDecommissionedOn')]]</label>
367									<div class="value">
368										<template is="dom-if" if="[[component.mekhConfiguration.decommissionedOn]]">
369											[[millisecondsToDate(component.mekhConfiguration.decommissionedOn, 1, 1)]]
370										</template>
371										<template is="dom-if" if="[[!component.mekhConfiguration.decommissionedOn]]">-</template>
372									</div>
373
374									<label>[[_lang('mekhBidirectionalChargingCapable')]]</label>
375									<div class="value">[[_langIf(component.mekhConfiguration.bidirectionalChargingCapable, 'yes', 'no')]]</div>
376									<label>[[_lang('mekhHeavyDutyVehicleCapable')]]</label>
377									<div class="value">[[_langIf(component.mekhConfiguration.heavyDutyVehicleCapable, 'yes', 'no')]]</div>
378									<label>[[_lang('mekhBarrierFreeAccess')]]</label>
379									<div class="value">[[_langIf(component.mekhConfiguration.barrierFreeAccess, 'yes', 'no')]]</div>
380
381									<label>[[_lang('mekhDisabledParkingSpaces')]]</label>
382									<div class="value">[[component.mekhConfiguration.disabledParkingSpaces]]</div>
383
384									<label>[[_lang('mekhRequiredPowerKw')]]</label>
385									<div class="value">
386										<template is="dom-if" if="[[component.mekhConfiguration.requiredPowerKw]]">
387											[[component.mekhConfiguration.requiredPowerKw]] kW
388										</template>
389										<template is="dom-if" if="[[!component.mekhConfiguration.requiredPowerKw]]">[[_lang('mekhDerived')]]</template>
390									</div>
391
392									<label>[[_lang('mekhStatus')]]</label>
393									<div class="value">
394										<template is="dom-if" if="[[component.mekhConfiguration.status]]">
395											[[_langPrefix('mekhStatus_', component.mekhConfiguration.status)]]
396										</template>
397										<template is="dom-if" if="[[!component.mekhConfiguration.status]]">[[_lang('mekhDerived')]]</template>
398									</div>
399
400									<label>[[_lang('note')]]</label>
401									<div class="value">[[or(component.mekhConfiguration.note, '-')]]</div>
402								</div>
403							</template>
404						</paper-material>
405					</template>
406				</div>
407			</div>
408		`}static get properties(){return{device:Object,canModify:{type:Boolean,value:!0},editRootUrl:String,deviceTemplateMode:{type:Boolean,value:!1}}}connectedCallback(){super.connectedCallback(),window.deviceDetails=this}_filterEmptyVariable(a){return a.attributes.some(l=>l.value)}_getWarrantyUntilText(a){return this._lang("warrantyUntil",this.millisecondsToDate(a,0,0,1))}}window.customElements.define("device-details",r);
409//# sourceMappingURL=device-details-DwkT8GFP.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.