PageSourceSearch

https://app.findalto.com/_next/static/chunks/pages/admin/users/[userId]/feedback-87c01da0988d9806.js

js findalto.com collected 2026-10-06 05:39:47 UTC 24,005 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[575],{96471:function(e,t,n){"use strict";var r=n(91941);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBackOutlined");t.Z=a},10547:function(e,t,n){"use strict";var r=n(91941);t.Z=void 0;var o=r(n(64938)),i=n(85893),a=(0,o.default)((0,i.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),"RefreshOutlined");t.Z=a},23258:function(e,t){"use strict";t.Z=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}},27701:function(e,t,n){"use strict";n.d(t,{AX:function(){return Z},Ex:function(){return m},Mh:function(){return k},lr:function(){return j},o$:function(){return P}});var r,o,i,a,c,s=n(50029),u=n(16835),l=n(71383),d=n(87794),p=n.n(d),f=n(50456),b=n(50319),h=n(56070),v=n(67294),g=n(89135),y=(0,f.gql)(r||(r=(0,l.Z)(["\n\tmutation CreateCaregiverReview($input: CreateCaregiverReviewInput!) {\n\t\tcreateCaregiverReview(input: $input)\n\t}\n"])));function m(){var e=(0,b.D)(y),t=(0,u.Z)(e,1)[0];return(0,v.useCallback)(function(){var e=(0,s.Z)(p().mark((function e(n){var r,o,i,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t({variables:{input:n}});case 3:if(r=e.sent,o=r.data,!((i=r.errors)&&i.length>0)){e.next=10;break}throw i;case 10:return e.abrupt("return",null!==(a=null===o||void 0===o?void 0:o.createCaregiverReview)&&void 0!==a?a:null);case 11:e.next=17;break;case 13:throw e.prev=13,e.t0=e.catch(0),e.t0 instanceof g.ApolloError||h.Z.error("Error creating caregiver review",500,e.t0),e.t0;case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(t){return e.apply(this,arguments)}}(),[t])}var x=(0,f.gql)(o||(o=(0,l.Z)(["\n\tmutation AdminUpdateCaregiverReview($input: UpdateCaregiverReviewInput!) {\n\t\tadminUpdateCaregiverReview(input: $input)\n\t}\n"])));function j(){var e=(0,b.D)(x),t=(0,u.Z)(e,1)[0];return(0,v.useCallback)(function(){var e=(0,s.Z)(p().mark((function e(n){var r,o,i,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t({variables:{input:n}});case 3:if(r=e.sent,o=r.data,!((i=r.errors)&&i.length>0)){e.next=10;break}throw i;case 10:return e.abrupt("return",null!==(a=null===o||void 0===o?void 0:o.adminUpdateCaregiverReview)&&void 0!==a?a:null);case 11:e.next=17;break;case 13:throw e.prev=13,e.t0=e.catch(0),e.t0 instanceof g.ApolloError||h.Z.error("Error updating caregiver review",500,e.t0),e.t0;case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(t){return e.apply(this,arguments)}}(),[t])}var O=(0,f.gql)(i||(i=(0,l.Z)(["\n\tmutation AdminCreateFeedback($input: AdminCreateFeedbackInput!) {\n\t\tadminCreateFeedback(input: $input) {\n\t\t\tid\n\t\t}\n\t}\n"])));function Z(){var e=(0,b.D)(O),t=(0,u.Z)(e,1)[0];return(0,v.useCallback)(function(){var e=(0,s.Z)(p().mark((function e(n){var r,o,i,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t({variables:{input:n}});case 3:if(r=e.sent,o=r.data,!((i=r.errors)&&i.length>0)){e.next=10;break}throw i;case 10:return e.abrupt("return",null!==(a=null===o||void 0===o?void 0:o.adminCreateFeedback)&&void 0!==a?a:null);case 11:e.next=17;break;case 13:throw e.prev=13,e.t0=e.catch(0),e.t0 instanceof g.ApolloError||h.Z.error("Error when admin creates a new feedback",500,e.t0),e.t0;case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(t){return e.apply(this,arguments)}}(),[t])}var w=(0,f.gql)(a||(a=(0,l.Z)(["\n\tmutation AdminUpdateFeedback($input: AdminUpdateFeedbackInput!) {\n\t\tadminUpdateFeedback(input: $input) {\n\t\t\tid\n\t\t}\n\t}\n"])));function k(){var e=(0,b.D)(w),t=(0,u.Z)(e,1)[0];return(0,v.useCallback)(function(){var e=(0,s.Z)(p().mark((function e(n){var r,o,i,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t({variables:{input:n}});case 3:if(r=e.sent,o=r.data,!((i=r.errors)&&i.length>0)){e.next=10;break}throw i;case 10:return e.abrupt("return",null!==(a=null===o||void 0===o?void 0:o.adminUpdateFeedback)&&void 0!==a?a:null);case 11:e.next=17;break;case 13:throw e.prev=13,e.t0=e.catch(0),e.t0 instanceof g.ApolloError||h.Z.error("Error when admin updates feedback",500,e.t0),e.t0;case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(t){return e.apply(this,arguments)}}(),[t])}var C=(0,f.gql)(c||(c=(0,l.Z)(["\n\tmutation AdminDeleteFeedback($feedbackId: String!) {\n\t\tadminDeleteFeedback(feedbackId: $feedbackId) {\n\t\t\tid\n\t\t}\n\t}\n"])));function P(){var e=(0,b.D)(C),t=(0,u.Z)(e,1)[0];return(0,v.useCallback)(function(){var e=(0,s.Z)(p().mark((function e(n){var r,o,i,a;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t({variables:{feedbackId:n}});case 3:if(r=e.sent,o=r.data,!((i=r.errors)&&i.length>0)){e.next=10;break}throw i;case 10:return e.abrupt("return",null!==(a=null===o||void 0===o?void 0:o.adminDeleteFeedback)&&void 0!==a?a:null);case 11:e.next=17;break;case 13:throw e.prev=13,e.t0=e.catch(0),e.t0 instanceof g.ApolloError||h.Z.error("Error when admin deletes feedback",500,e.t0),e.t0;case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(t){return e.apply(this,arguments)}}(),[t])}},41047:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(36822),o=n(69368),i=n(63017),a=n(21477),c=n(59499),s=n(4730),u=n(90044),l=n(67294),d=n(86421),p=n(26613),f=n(25894),b=n(85893),h=["loading","paginationAlign","allowExpandOneRowOnly"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?v(Object(n),!0).forEach((function(t){(0,c.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y={indeterminate:function(e){return e}};function m(e){var t={rows:{style:{font:d.Z.typography.body2.font,fontSize:d.Z.typography.body2.fontSize,fontWeight:d.Z.typography.body2.fontWeight}},headCells:{style:{font:d.Z.typography.body2.font,fontSize:d.Z.typography.body2.fontSize,fontWeight:d.Z.typography.fontWeightBold,"@media print":{breakInside:"avoid"}}}};return e.paginationAlign&&("left"===e.paginationAlign?t.pagination={style:{justifyContent:"flex-start"}}:"center"===e.paginationAlign&&(t.pagination={style:{justifyContent:"center"}})),t}function x(e){var t=(0,l.useState)(),n=t[0],c=t[1],d=e.loading,v=e.paginationAlign,x=e.allowExpandOneRowOnly,O=(0,s.Z)(e,h);return(0,b.jsx)(r.Z,{sx:g({},j.container),children:(0,b.jsx)(u.ZP,g({customStyles:m({paginationAlign:v}),sortIcon:(0,b.jsx)(p.Z,{sx:j.sortIcon}),selectableRowsComponent:o.Z,progressPending:d,progressComponent:(0,b.jsx)(f.Z,{}),highlightOnHover:!0,selectableRowsComponentProps:y,expandableIcon:{collapsed:(0,b.jsx)(a.Z,{}),expanded:(0,b.jsx)(i.Z,{})},expandableRowExpanded:function(e){return!!x&&e===n},onRowExpandToggled:function(e,t){return c(t)}},O))})}var j={container:{margin:d.Z.spacing(1)},sortIcon:{display:"block",marginLeft:d.Z.spacing(.5)}}},20965:function(e,t,n){"use strict";n.d(t,{NU:function(){return r},dd:function(){return a},qb:function(){return i},vP:function(){return o}});var r={width:"70px",center:!0,style:{whiteSpace:"nowrap"}},o={right:!0,minWidth:"50px",maxWidth:"120px",style:{whiteSpace:"nowrap"}},i={width:"155px",style:{whiteSpace:"nowrap"}},a={minWidth:"160px",maxWidth:"200px",style:{whiteSpace:"nowrap"}}},29703:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(59499),o=n(77533),i=n(67720),a=n(36822),c=n(20518),s=n(15861),u=n(93946),l=n(96471),d=(n(67294),n(86421)),p=n(69417),f=n(31812),b=n(85893);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){var t=e.title,n=e.open,r=e.anchor,d=e.children,h=e.onBackClick,v=e.backButtonDisabled,g=e.onClose,m=e.onCancel,x=e.cancelButtonText,j=e.onSubmit,O=e.submitButtonText,Z=e.submitDisabled,w=e.isSubmitting;return(0,b.jsxs)(o.ZP,{anchor:r||"right",open:n,onClose:function(e,t){(!t||"backdropClick"!==t&&"escapeKeyDown"!==t)&&g&&g()},sx:y.drawer,PaperProps:{sx:y.paper},ModalProps:{keepMounted:!0},children:[(0,b.jsxs)(a.Z,{sx:y.header,children:[h&&(0,b.jsx)(u.Z,{title:"Back",size:"small",onClick:h,disabled:v,sx:y.backIconButton,children:(0,b.jsx)(l.Z,{})}),t&&(0,b.jsx)(s.Z,{variant:"h5",ml:1,children:t}),g&&(0,b.jsx)(u.Z,{title:"Close",size:"small",onClick:function(){return g()},sx:y.closeIconButton,disabled:w,children:(0,b.jsx)(c.Z,{})})]}),(0,b.jsx)(i.Z,{orientation:"horizontal",variant:"middle"}),(0,b.jsx)(a.Z,{sx:y.content,children:d}),(m||j)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.Z,{orientation:"horizontal",variant:"middle"}),(0,b.jsxs)(a.Z,{sx:y.footer,children:[m&&(0,b.jsx)(p.Z,{variant:"outlined",onClick:m,sx:y.cancelButton,disabled:w,children:x||"Cancel"}),j&&(0,b.jsx)(f.Z,{variant:"contained",type:"submit",onClick:j,autoFocus:!0,disabled:Z,loading:w,children:O||"Submit"})]})]})]})}var y={drawer:{padding:d.Z.spacing(1)},paper:(0,r.Z)({height:"100%",width:"100%",maxWidth:d.Z.spacing(70),display:"flex"},d.Z.breakpoints.down("xs"),{width:"100%"}),header:{display:"flex",alignItems:"center",padding:d.Z.spacing(2,1,1,1)},backIconButton:{color:d.Z.palette.common.black},closeIconButton:{color:d.Z.palette.common.black,marginLeft:"auto"},content:v(v({display:"flex",flexDirection:"column",padding:d.Z.spacing(2,4),flex:1,overflowX:"scroll"},d.Z.noScrollBar),{},(0,r.Z)({},d.Z.breakpoints.only("xs"),{padding:d.Z.spacing(2)})),footer:{display:"flex",justifyContent:"flex-end",padding:d.Z.spacing(3),height:d.Z.spacing(11)},cancelButton:{marginRight:d.Z.spacing(1.5)}}},30745:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(59499),o=n(50135),i=n(4730),a=n(86421),c=n(85893),s=["onVerify","isDisabled"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){var t=e.onVerify,n=e.isDisabled,l=(0,i.Z)(e,s);return(0,c.jsx)(o.Z,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({autoComplete:"off",label:(0,c.jsxs)(c.Fragment,{children:["Type ",(0,c.jsx)("strong",{children:"Confirm"})," to continue (case sensitive)"]}),fullWidth:!0,style:{marginTop:a.Z.spacing(2)},disabled:n,onChange:function(e){return t("Confirm"===e.target.value)}},l))}},25894:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(36822),o=n(81458),i=n(59499),a=n(86421),c=n(85893);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(){return(0,c.jsx)(r.Z,{sx:u({},d),children:(0,c.jsx)(o.Z,{variant:"indeterminate"})})}var d={width:"100%",marginY:a.Z.spacing(3)}},11593:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return le}});var r=n(67294),o=n(11163),i=n(20197),a=n(28147),c=n(5792),s=n(47157),u=n(59889),l=n(89854),d=n(19796),p=n(7165),f=n(59166),b=n(15861),h=n(36822),v=n(69417),g=n(59499),y=n(41047),m=n(20965),x=n(75282),j=n(72143),O=n(52049),Z=n(93681),w=n(13104),k=n(86421),C=n(86131),P=n(44259),D=n(50135),S=n(29703),F=n(30745),E=n(29565),A=n(15764),I=n(95496),R=n(27701),U=n(10694),B=n(87536),M=n(74231),T=n(85893);function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=M.Ry().shape({severity:M.nK().oneOf(Object.values(w.EM),"must select one."),note:M.Z_().trim().min(2,"must be at least 2 characters").max(5e3,"must be 5000 characters or less").required("required")});function q(e){var t,n=e.selectedUserId,o=e.isDrawerOpen,i=e.onClose,a=e.onSuccess,c=(0,E.cV)(),s=(0,r.useState)(!1),u=s[0],l=s[1],d=(0,R.AX)(),p=(0,B.cI)({defaultValues:{severity:void 0,note:"",confirmationChecked:!1},resolver:(0,I.X)(_)}),f=function(){p.reset(),i()};return(0,T.jsx)(S.Z,{open:o,title:"Add new feedback",onClose:f,onCancel:f,onSubmit:p.handleSubmit((function(e){l(!0),d({userId:n,severity:e.severity,note:e.note}).then((function(){c.success("The feedback was created"),l(!1),p.reset(),a()})).catch((function(e){l(!1),(0,U.gZ)(e,c)}))})),isSubmitting:u,submitDisabled:!p.watch("confirmationChecked"),children:(0,T.jsx)(B.RV,L(L({},p),{},{children:(0,T.jsxs)(h.Z,{sx:$.formContainer,children:[(0,T.jsx)(A.Z,{name:"severity",label:"Severity",options:Object.values(w.EM).map((function(e){return{label:(0,C.xD)(e),value:e}}))}),(0,T.jsx)(D.Z,L(L({},p.register("note")),{},{label:"Note (When did this occur? What client?)",fullWidth:!0,multiline:!0,rows:4,error:!!p.formState.errors.note,helperText:null===(t=p.formState.errors.note)||void 0===t?void 0:t.message})),(0,T.jsx)(B.Qr,{name:"confirmationChecked",control:p.control,render:function(e){var t=e.field.onChange;return(0,T.jsx)(F.Z,{onVerify:function(e){return t(e)}})}})]})}))})}var $={formContainer:{display:"flex",flexDirection:"column",gap:2}};function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?V(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var N=M.Ry().shape({severity:M.nK().oneOf(Object.values(w.EM),"must select one."),note:M.Z_().trim().min(2,"must be at least 2 characters").max(5e3,"must be 5000 characters or less").required("required")});function Q(e){var t,n=e.isDrawerOpen,o=e.feedbackToUpdate,i=e.onClose,a=e.onSuccess,c=(0,E.cV)(),s=(0,r.useState)(!1),u=s[0],l=s[1],d=(0,R.Mh)(),p=(0,B.cI)({defaultValues:{severity:o.severity,note:o.note,confirmationChecked:!1},resolver:(0,I.X)(N)}),f=function(){p.reset(),i()};return(0,T.jsx)(S.Z,{open:n,title:"Update feedback",onClose:f,onCancel:f,onSubmit:p.handleSubmit((function(e){l(!0),d({feedbackId:o.id,severity:e.severity,note:e.note}).then((function(){c.success("The feedback was updated"),l(!1),p.reset(),a()})).catch((function(e){l(!1),(0,U.gZ)(e,c)}))})),isSubmitting:u,submitDisabled:!p.watch("confirmationChecked"),children:(0,T.jsx)(B.RV,z(z({},p),{},{children:(0,T.jsxs)(h.Z,{sx:X.formContainer,children:[(0,T.jsx)(A.Z,{name:"severity",label:"Severity",options:Object.values(w.EM).map((function(e){return{label:(0,C.xD)(e),value:e}}))}),(0,T.jsx)(D.Z,z(z({},p.register("note")),{},{label:"Note (When did this occur? What client?)",fullWidth:!0,multiline:!0,rows:4,error:!!p.formState.errors.note,helperText:null===(t=p.formState.errors.note)||void 0===t?void 0:t.message})),(0,T.jsx)(B.Qr,{name:"confirmationChecked",control:p.control,render:function(e){var t=e.field.onChange;return(0,T.jsx)(F.Z,{onVerify:function(e){return t(e)}})}})]})}))})}var X={formContainer:{display:"flex",flexDirection:"column",gap:2}};var H=n(64666),Y=n(6514),K=n(37645),G=n(66793);function J(e){var t=e.open,n=e.onClose,o=e.feedbackId,i=e.onSuccess,a=(0,G.K)().isMobileOrTablet,c=(0,r.useState)(!1),s=c[0],u=c[1],l=(0,R.o$)(),d=(0,E.cV)();return(0,T.jsxs)(H.Z,{open:t,fullScreen:a,onClose:n,sx:ee.dialogContainer,children:[(0,T.jsx)(K.Z,{component:"div",children:(0,T.jsx)(b.Z,{component:"span",variant:"h5",children:"Delete Feedback"})}),(0,T.jsx)(Y.Z,{sx:ee.dialogContent,children:(0,T.jsxs)(h.Z,{sx:ee.dialogContentBox,children:[(0,T.jsx)(b.Z,{variant:"body2",fontWeight:500,children:"Are you sure you would like to delete this feedback?"}),(0,T.jsxs)(h.Z,{sx:{display:"flex",justifyContent:"flex-end",gap:k.Z.spacing(1)},children:[(0,T.jsx)(v.Z,{variant:"contained",onClick:function(){u(!0),l(o).then((function(){d.success("The feedback was deleted"),u(!1),i()})).catch((function(e){u(!1),(0,U.gZ)(e,d)}))},disabled:s,children:"Delete Feedback"}),(0,T.jsx)(v.Z,{variant:"outlined",onClick:n,disabled:s,children:"Cancel"})]})]})})]})}var ee={dialogContainer:{display:"flex",justifyContent:"center",padding:k.Z.spacing(4),borderRadius:k.Z.spacing(1),border:"1px solid ".concat(k.Z.palette.grey[200])},dialogContent:{padding:k.Z.spacing(2),width:k.Z.spacing(60)},dialogContentBox:{display:"flex",flexDirection:"column",gap:k.Z.spacing(2),marginTop:k.Z.spacing(2)}},te=n(97720);function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e){var t,n,o=e.selectedUserId,i=e.isCreateFeedbackFormOpen,a=e.closeCreateFeedbackForm,c=(0,x.xq)(o),s=c.feedbackList,u=c.feedbackListLoading,l=c.feedbackListFetchError,d=c.feedbackListRefetch,p=(0,r.useState)({editFeedbackForm:!1,deleteFeedbackForm:!1}),f=p[0],b=p[1],g=(0,r.useState)(),k=g[0],D=g[1],S=function(e){b((function(t){var n=re({},t);return n[e]=!(0,Z.$s)(f,e),n}))};return(0,T.jsx)(te.Z,{isLoading:u,isError:!!l,children:(0,T.jsxs)(h.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,T.jsx)(h.Z,{sx:ce.severityHeader,children:Object.values(w.EM).map((function(e){return(0,T.jsx)(ie,{feedbackList:s,severity:e},e)}))}),(0,T.jsx)(y.Z,{columns:(t=function(e){D(e),S("editFeedbackForm")},n=function(e){D(e),S("deleteFeedbackForm")},[{name:"Created by",cell:function(e){return(0,O.BD)(e.CreatedBy.firstname,e.CreatedBy.lastname)},minWidth:"20%"},re(re({},m.qb),{},{name:"Created on",cell:function(e){return(0,O.p6)(e.createdAt,"MMMM d, yyyy")},selector:function(e){return e.createdAt},sortable:!0}),{name:"Severity",cell:function(e){return(0,C.xD)(e.severity)},selector:function(e){return e.severity},sortable:!0},{name:"Updated by",cell:function(e){return e.updatedAt===e.createdAt?"-":(0,O.BD)(e.UpdatedBy.firstname,e.UpdatedBy.lastname)},minWidth:"20%"},re(re({},m.qb),{},{name:"Updated on",cell:function(e){return e.updatedAt===e.createdAt?"-":(0,O.p6)(e.updatedAt,"MMMM d, yyyy")}}),{name:"",center:!0,compact:!0,cell:function(e){return(0,P.d)(new Date,(0,j.Rn)(e.createdAt))>=2?(0,T.jsx)(T.Fragment,{}):(0,T.jsxs)(h.Z,{display:"flex",gap:2,children:[(0,T.jsx)(v.Z,{variant:"text",size:"small",onClick:function(){return t(e)},"aria-label":"edit",children:"Edit"}),(0,T.jsx)(v.Z,{variant:"text",size:"small",onClick:function(){return n(e)},"aria-label":"delete",children:"Delete"})]})}}]),data:s,noDataComponent:"No feedback was found.",expandableRows:!0,expandableRowsComponent:ae}),(0,T.jsx)(q,{selectedUserId:o,isDrawerOpen:i,onClose:a,onSuccess:function(){d(),a()}}
1),k&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Q,{isDrawerOpen:f.editFeedbackForm,feedbackToUpdate:k,onClose:function(){S("editFeedbackForm"),D(void 0)},onSuccess:function(){S("editFeedbackForm"),d()}}),(0,T.jsx)(J,{open:f.deleteFeedbackForm,feedbackId:k.id,onClose:function(){S("deleteFeedbackForm"),D(void 0)},onSuccess:function(){S("deleteFeedbackForm"),d()}})]})]})})}function ie(e){var t=e.feedbackList,n=e.severity;return(0,T.jsxs)(h.Z,{sx:ce.severityCard,children:[(0,T.jsx)(b.Z,{variant:"button",color:k.Z.palette.grey[500],children:(0,C.xD)(n)}),(0,T.jsx)(b.Z,{variant:"h3",children:se(t,n)})]})}function ae(e){var t=e.data;return(0,T.jsx)(h.Z,{paddingX:4,paddingY:3,sx:{backgroundColor:k.Z.palette.grey[50],border:"1px solid ".concat(k.Z.palette.grey[100])},children:(0,T.jsx)(b.Z,{variant:"body2",sx:{whiteSpace:"pre-wrap"},color:k.Z.palette.grey[700],children:t.note})})}var ce={severityHeader:{display:"flex",gap:1,paddingY:4},severityCard:{flex:1,padding:2,border:"1px solid ".concat(k.Z.palette.grey[200]),borderRadius:1}};function se(e,t){return e.reduce((function(e,n){return e+(n.severity===t?1:0)}),0)}function ue(e){var t=e.user,n=(0,o.useRouter)(),b=(0,i.O_)("userId",n.query),h=(0,a.m5)(b),v=h.user,g=h.userLoading,y=h.userFetchError,m=(0,r.useState)(!1),x=m[0],j=m[1],O=v&&(0,c.wQ)(v.roles)?(0,s.H$)(b):(0,s.Qk)(b);return(0,T.jsx)(te.Z,{isLoading:g,isError:!!y,children:v?(0,T.jsxs)(l.Z,{goBackPath:d.nB.Admin.Users.Root,goBackText:"All Users",authUser:t,selectedUser:v,tabRoutes:O,PageActionBar:(0,T.jsx)(p.Z,{selectedUser:v}),fullWidth:!0,buttonText:"New feedback",buttonOnClick:function(){return j(!0)},children:[(0,c.wQ)(v.roles)?(0,T.jsx)(oe,{selectedUserId:v.id,isCreateFeedbackFormOpen:x,closeCreateFeedbackForm:function(){return j(!1)}}):(0,T.jsx)(u.Z,{}),(0,T.jsx)(f.Z,{})]}):(0,T.jsx)(u.Z,{})})}function le(e){var t=e.user;return(0,T.jsx)(ue,{user:t})}},31640:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/users/[userId]/feedback",function(){return n(11593)}])},44259:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var r=n(70530),o=n(32841);function i(e,t){const n=(0,o.Q)(e),r=(0,o.Q)(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}var a=n(72688),c=n(23745);function s(e){const t=(0,o.Q)(e);return+(0,a.i)(t)===+(0,c.V)(t)}function u(e,t){const n=(0,o.Q)(e),a=(0,o.Q)(t),c=(0,r.U)(n,a),u=Math.abs(i(n,a));let l;if(u<1)l=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-c*u);let t=(0,r.U)(n,a)===-c;s((0,o.Q)(e))&&1===u&&1===(0,r.U)(e,a)&&(t=!1),l=c*(u-Number(t))}return 0===l?0:l}}},function(e){e.O(0,[8377,7465,482,5846,1423,9135,4740,7165,9774,2888,179],(function(){return t=31640,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.