1"use strict";(globalThis.webpackChunkverisure_owa=globalThis.webpackChunkverisure_owa||[]).push([[3329],{73329(e,t,i){i.r(t),i.d(t,{default:()=>U});var n=i(5247),s=i(3200),o=i(61884),l=i(69884),r=i(43433),a=i(67430),c=i(18514),d=i(17754),u=i(42730),m=i(40630),N=i(71070),E=i(6961),S=i(56432),f=i(34366),x=i(47378),v=i(25922),p=i(54234),I=i(33300),_=i(84151),A=i(42866),g=i(8055),T=i(94894),K=i(34329),C=i(76901);const D=C.gql` 2 mutation xSDeleteNotifications( 3 $numinst: String 4 $username: String 5 $country: String 6 $callby: String 7 ) { 8 xSDeleteNotifications( 9 numinst: $numinst 10 username: $username 11 country: $country 12 callby: $callby 13 ) { 14 res 15 msg 16 referenceId 17 } 18 } 19`,O=C.gql` 20 query xSDeleteNotificationsStatus( 21 $numinst: String! 22 $referenceId: String! 23 $counter: Int! 24 ) { 25 xSDeleteNotificationsStatus( 26 numinst: $numinst 27 referenceId: $referenceId 28 counter: $counter 29 ) { 30 res 31 msg 32 status 33 protomResponseDate 34 numberOfExceptions 35 exceptions { 36 status 37 deviceType 38 alias 39 } 40 } 41 }
42`,h="BMoShx",y="jH7FGI",j="dsJys5",b="j6leyM",V="FdYorD",L="dF1xGB";var $=i(51367);const F=()=>{var e;const t=(0,l.Zp)(),i=(0,r.wA)(),{user:C}=(0,x.Jd)(),{country:F}=(0,x.Ym)(),{credentials:{callby:U}}=(0,x.aX)(),w=(0,x.wP)(),[k,M]=(0,n.useState)(!1),[B,q]=(0,n.useState)(!1),[G,J]=(0,n.useState)(!1),[R,Y]=(0,n.useState)(null),[H,P]=(0,n.useState)();(0,n.useEffect)(()=>{(0,_.logUserEvent)(A.SVK_DELETE_NOTIFICATIONS_RENDER_OK)({text:"render delete notifications view"})},[]);const[W,{loading:Z}]=(0,f.uM)(D,{queryStatus:O,variablesFromData:(0,I.U6)({numinst:w}),onCompleted:e=>{var n;"OK"===(null===e||void 0===e?void 0:e.res)?(0,_.logUserEvent)(A.SVK_DELETE_NOTIFICATIONS_OK)({text:"delete notifications completed successfully"}):(0,_.logUserEvent)(A.SVK_DELETE_NOTIFICATIONS_KO)({error:(null===e||void 0===e?void 0:e.msg)||"delete notifications non-OK response"});const s=e.numberOfExceptions>0;i((0,p.cD)({user:C,settingName:"hasVoiceExceptions",value:s})),i((0,v.D)({type:s?"error":"completed",title:s?(0,o.t)("SVK.Alerts.deleteNotifications.error"):(0,o.t)("SVK.Alerts.deleteNotifications.success")})),M(!1),s&&null!==e&&void 0!==e&&null!==(n=e.exceptions)&&void 0!==n&&n.length?Y(te(e.exceptions)):t(-1)},onError:e=>{(0,_.logUserEvent)(A.SVK_DELETE_NOTIFICATIONS_KO)({error:e}),i((0,v.D)({type:"error",title:(null===e||void 0===e?void 0:e.message)||(0,o.t)("common.error")})),M(!1),P(e)}}),{data:Q}=(0,f.Je)(K.hW,{skip:!w}),X=null===Q||void 0===Q||null===(e=Q.installations)||void 0===e?void 0:e.find(e=>e.numinst===w),z=(e=>{const t=null===e||void 0===e?void 0:e.match(/(\d+)\.(\d+)(?:_(\d+))?/);if(!t)return null;const[,i,n,s="0"]=t;return`${Number(i)}.${Number(n)}.${Number(s)}`})(null===X||void 0===X?void 0:X.panelVersion),ee=!!z&&(0,T.Zy)(z,"1.44.0"),te=e=>Object.entries((e||[]).reduce((e,t)=>{const i=(null===t||void 0===t?void 0:t.deviceType)||"UNKNOWN",n=(null===t||void 0===t?void 0:t.alias)||(0,o.t)("common.unknown"),s=(0,g.DG)(null===t||void 0===t?void 0:t.status).status;return e[i]||(e[i]={}),e[i][n]||(e[i][n]=new Set),e[i][n].add(s),e},{})).reduce((e,t)=>{let[i,n]=t;return e[i]=Object.entries(n).map(e=>{let[t,i]=e;return{alias:t,statuses:Array.from(i)}}),e},{});return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(u.U3,{"id-owa":"DeleteNotifications",title:(0,o.t)("SVK.Alerts.deleteNotifications.title"),services:["DEVICESCONF"],contentArea:{type:u.U3.contentArea.SECONDARY,breadcrumbs:[{name:(0,o.t)("SystemConfig.title.label"),path:S.J.SYSTEMCONFIG}]},children:(0,$.jsxs)("div",{className:h,children:[(0,$.jsx)("h2",{className:y,children:(0,o.t)("SVK.Alerts.deleteNotifications.subtitle")}),(0,$.jsx)("p",{className:j,children:(0,$.jsx)(s.x6,{i18nKey:"SVK.Alerts.deleteNotifications.parraph.first"})}),(0,$.jsx)("p",{className:j,children:(0,$.jsx)(s.x6,{i18nKey:"SVK.Alerts.deleteNotifications.parraph.second"})}),ee&&(0,$.jsx)(a.$,{"id-owa":"DeleteNotifications-delete-notifications",text:(0,o.t)("SVK.Alerts.deleteNotifications.deleteButton"),color:N.v.WHITE_RED,onClick:()=>M(!0)}),(0,$.jsx)(c.Q,{"id-owa":"DeleteNotifications-manual-guide",text:(0,o.t)("SVK.Alerts.deleteNotifications.guideButton"),color:N.v.BLACK,className:b,onClick:()=>{(0,_.logUserEvent)(A.SVK_DELETE_NOTIFICATIONS_MANUAL_GUIDE_CLICK)({text:"user clicked manual guide"}),q(!0)}})]})}),k&&(0,$.jsx)(d.m,{"id-owa":"DeleteNotifications-confirm-delete",title:(0,o.t)("SVK.Alerts.deleteNotifications.dialog.title"),hasCancelButton:!0,hasAcceptButton:!0,cancelText:(0,o.t)("SVK.Alerts.deleteNotifications.dialog.close"),acceptText:(0,o.t)("SVK.Alerts.deleteNotifications.dialog.accept"),isLoading:Z,onCancel:()=>{(0,_.logUserEvent)(A.SVK_DELETE_NOTIFICATIONS_CANCEL_CLICK)({text:"delete all notifications cancelled"}),M(!1)},onAccept:()=>{if(!w||!C||!F||!U)return(0,_.logUserEvent)(A.SVK_DELETE_NOTIFICATIONS_KO)({error:"missing_delete_notifications_request_data"}),i((0,v.D)({type:"error",title:(0,o.t)("common.error")})),P(!0),void M(!1);(0,_.logUserEvent)(A.SVK_DELETE_NOTIFICATIONS_DELETE_CLICK)({text:"user confirmed delete notifications"}),W({variables:{numinst:w,username:C,country:F,callby:U}})},children:(0,$.jsx)("p",{className:V,children:(0,$.jsx)(s.x6,{i18nKey:"SVK.Alerts.deleteNotifications.dialog.info"})})}),B&&(0,$.jsx)(E.I2,{kpiEntryPoint:"MAD",onCloseModal:e=>{e&&((0,_.logUserEvent)(A.SVK_DELETE_NOTIFICATIONS_MANUAL_HELP_CLICK)({text:"user requested manual help"}),J(!0)),q(!1)}}),G&&(0,$.jsx)(E.hT,{onCloseModal:()=>J(!1)}),!!R&&(0,$.jsx)(d.m,{"id-owa":"DeleteNotifications-exceptions-info",title:(0,o.t)("DeleteNotifications.exceptions.info.title"),hasAcceptButton:!0,acceptText:(0,o.t)("common.close"),onAccept:()=>{Y(null),t(-1)},bodyClassName:L,children:(0,$.jsx)("div",{className:V,children:Object.entries(R).map(e=>{let[t,i]=e;return(0,$.jsxs)("div",{children:[(0,$.jsx)("p",{children:(0,$.jsx)("strong",{children:(0,g.JF)(t)})}),i.map(e=>{let{alias:i,statuses:n}=e;return(0,$.jsxs)("p",{children:[i," ",(0,o.t)("DeleteNotifications.exceptions.info.deviceErrors")," ",n.join(", ")
42]},`${t}-${i}`)})]},t)})})}),!!H&&(0,$.jsx)(m.AA,{"id-owa":"DeleteNotificationsErrorModal",error:H,onCancel:()=>P(null)})]})},U=n.memo(F)}}]);
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.