1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5535],{73381:function(t,e,n){"use strict";var r=n(91941);e.Z=void 0;var i=r(n(64938)),o=n(85893),a=(0,i.default)((0,o.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}),"ChevronRightOutlined");e.Z=a},23258:function(t,e){"use strict";e.Z=function(t,e=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{t.apply(this,r)}),e)}return r.clear=()=>{clearTimeout(n)},r}},71148:function(t,e,n){"use strict";n.d(e,{Di:function(){return p},TB:function(){return v},YY:function(){return g},p:function(){return f}});var r,i,o,a=n(71383),l=n(50456),s=n(55293),c=n(67294),u=n(56070),d=(0,l.gql)(r||(r=(0,a.Z)(["\n\tquery AdminGetAllCareProfiles($input: GetAllCareProfilesInput!) {\n\t\tadminGetAllCareProfiles(input: $input) {\n\t\t\tcareProfiles {\n\t\t\t\tid\n\t\t\t\treadableId\n\t\t\t\tcreatedAt\n\t\t\t\tupdatedAt\n\t\t\t\tfirstname\n\t\t\t\tlastname\n\t\t\t\trelationship\n\t\t\t\tdescription\n\t\t\t\tdateOfBirth\n\t\t\t\tgender\n\t\t\t\tprofileImageUrl\n\t\t\t\tuserId\n\t\t\t}\n\t\t\tpageInfo {\n\t\t\t\ttotalCount\n\t\t\t}\n\t\t}\n\t}\n"])));function f(t,e,n){var r,i,o,a,l=(0,s.d)(d,{variables:{input:{filters:t,page:e,sort:n}},fetchPolicy:"cache-and-network"}),f=l.data,p=l.loading,g=l.error,h=l.refetch,v=(0,c.useCallback)((function(){h().catch((function(t){u.Z.error("Error when refetching all care profiles",500,t)}))}),[h]);return{loading:p,careProfiles:null!==(r=null===f||void 0===f||null===(i=f.adminGetAllCareProfiles)||void 0===i?void 0:i.careProfiles)&&void 0!==r?r:[],getAllCareProfilesError:g?"There was an unexpected error when trying to fetch care profiles.":null,totalCareProfiles:null!==(o=null===f||void 0===f||null===(a=f.adminGetAllCareProfiles)||void 0===a?void 0:a.pageInfo.totalCount)&&void 0!==o?o:0,refetch:v}}var p=(0,l.gql)(i||(i=(0,a.Z)(["\n\tquery GetCareProfiles($input: GetCareProfilesInput!) {\n\t\tgetCareProfiles(input: $input) {\n\t\t\tid\n\t\t\treadableId\n\t\t\tcreatedAt\n\t\t\tupdatedAt\n\t\t\tfirstname\n\t\t\tlastname\n\t\t\trelationship\n\t\t\tdescription\n\t\t\tdateOfBirth\n\t\t\tgender\n\t\t\tprofileImageUrl\n\t\t\taddress {\n\t\t\t\tid\n\t\t\t\tcareProfileId\n\t\t\t\tstreet\n\t\t\t\tunit\n\t\t\t\tcountry\n\t\t\t\tprovinceState\n\t\t\t\tpostalZip\n\t\t\t\tcity\n\t\t\t\tresidenceType\n\t\t\t\tlat\n\t\t\t\tlon\n\t\t\t}\n\t\t\ttaxRates {\n\t\t\t\tgstRate\n\t\t\t\thstRate\n\t\t\t\tpstRate\n\t\t\t}\n\t\t\tfundingRates {\n\t\t\t\tserviceType\n\t\t\t\tfundingRate\n\t\t\t\tnotes\n\t\t\t}\n\t\t}\n\t}\n"])));function g(t){var e,n={userId:null!==t&&void 0!==t?t:""},r=(0,s.d)(p,{variables:{input:n},skip:void 0===t,fetchPolicy:"cache-and-network"}),i=r.data,o=r.loading,a=r.error,l=r.refetch,d=(0,c.useCallback)((function(){l().catch((function(t){u.Z.error("Error when refetching care profiles",500,t)}))}),[l]);return{loading:o,careProfiles:null!==(e=null===i||void 0===i?void 0:i.getCareProfiles)&&void 0!==e?e:[],getCareProfilesError:a?"There was an unexpected error when trying to fetch the User's Care Profiles.":null,refetch:d}}var h=(0,l.gql)(o||(o=(0,a.Z)(["\n\tquery GetCareProfilesForBooking($input: GetCareProfilesInput!) {\n\t\tgetCareProfiles(input: $input) {\n\t\t\tid\n\t\t\tfirstname\n\t\t\tlastname\n\t\t\trelationship\n\t\t\tdescription\n\t\t\tdateOfBirth\n\t\t\tgender\n\t\t\tprofileImageUrl\n\t\t\ttaxRates {\n\t\t\t\tgstRate\n\t\t\t\thstRate\n\t\t\t\tpstRate\n\t\t\t}\n\t\t\taddress {\n\t\t\t\tunit\n\t\t\t\tstreet\n\t\t\t\tcity\n\t\t\t\tprovinceState\n\t\t\t\tcountry\n\t\t\t\tpostalZip\n\t\t\t\tlat\n\t\t\t\tlon\n\t\t\t}\n\t\t\tfundingRates {\n\t\t\t\tserviceType\n\t\t\t\tfundingRate\n\t\t\t}\n\t\t}\n\t}\n"])));function v(t){var e,n=(0,s.d)(h,{variables:{input:{}},skip:null===t||void 0===t?void 0:t.skip,fetchPolicy:"cache-and-network"}),r=n.data,i=n.loading,o=n.error,a=n.refetch,l=(0,c.useCallback)((function(){a().catch((function(t){u.Z.error("Error when refetching care profiles",500,t)}))}),[a]);return{loading:i,careProfiles:null!==(e=null===r||void 0===r?void 0:r.getCareProfiles)&&void 0!==e?e:[],error:o?"There was an unexpected error when trying to fetch care profiles.":null,refetch:l}}},92388:function(t,e,n){"use strict";n.d(e,{Ci:function(){return d},WN:function(){return c},qg:function(){return u},tF:function(){return p},tP:function(){return s}});var r=n(30926),i=n(20197),o=n(13104),a=n(86131),l=n(5792);function s(t,e){var n,o=(0,i.p3)((0,i.O_)("currentPage",t));return!o||o<=0?null!==(n=null===e||void 0===e?void 0:e.defaultValue)&&void 0!==n?n:r.Kp:o}function c(t,e){var n,o=(0,i.p3)((0,i.O_)("rowsPerPage",t));return!o||o<=0?null!==(n=null===e||void 0===e?void 0:e.defaultValue)&&void 0!==n?n:r.fe:o}var u=[{label:(0,a.VB)(o.Nq.VeteransAffairs),value:o.Nq.VeteransAffairs},{label:(0,a.VB)(o.Nq.ChildFamilyServicesSk),value:o.Nq.ChildFamilyServicesSk},{label:(0,a.VB)(o.Nq.CognitiveDisabilityStrategy),value:o.Nq.CognitiveDisabilityStrategy},{label:(0,a.VB)(o.Nq.IndividualizedFunding),value:o.Nq.IndividualizedFunding},{label:(0,a.VB)(o.Nq.SocialServices),value:o.Nq.SocialServices},{label:(0,a.VB)(o.Nq.AssuredIncomeSeverelyHandicapped),value:o.Nq.AssuredIncomeSeverelyHandicapped},{label:(0,a.VB)(o.Nq.ChildFamilyServicesAb),value:o.Nq.ChildFamilyServicesAb},{label:(0,a.VB)(o.Nq.ClientDirectedHomeCareInvoicingProgramBlue
1Cross),value:o.Nq.ClientDirectedHomeCareInvoicingProgramBlueCross},{label:(0,a.VB)(o.Nq.FamilySupportChildrenDisabilities),value:o.Nq.FamilySupportChildrenDisabilities},{label:(0,a.VB)(o.Nq.PersonDevelopmentalDisabilities),value:o.Nq.PersonDevelopmentalDisabilities},{label:(0,a.VB)(o.Nq.SelfManagedCare),value:o.Nq.SelfManagedCare}],d=[{label:(0,a.Xo)(o.Lb.Marketing),value:o.Lb.Marketing},{label:(0,a.Xo)(o.Lb.MeetAndGreet),value:o.Lb.MeetAndGreet},{label:(0,a.Xo)(o.Lb.NegativeExperience),value:o.Lb.NegativeExperience},{label:(0,a.Xo)(o.Lb.GstRefund),value:o.Lb.GstRefund},{label:(0,a.Xo)(o.Lb.PstRefund),value:o.Lb.PstRefund},{label:(0,a.Xo)(o.Lb.HstRefund),value:o.Lb.HstRefund},{label:(0,a.Xo)(o.Lb.BadDebt),value:o.Lb.BadDebt}],f=[o.Lb.GstRefund,o.Lb.PstRefund,o.Lb.HstRefund,o.Lb.BadDebt];function p(t,e){return!(f.includes(t)&&!(0,l.XZ)(e)&&!(0,l.j5)(e))}},41047:function(t,e,n){"use strict";n.d(e,{Z:function(){return m}});var r=n(36822),i=n(69368),o=n(63017),a=n(21477),l=n(59499),s=n(4730),c=n(90044),u=n(67294),d=n(86421),f=n(26613),p=n(25894),g=n(85893),h=["loading","paginationAlign","allowExpandOneRowOnly"];function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(Object(n),!0).forEach((function(e){(0,l.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var y={indeterminate:function(t){return t}};function P(t){var e={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 t.paginationAlign&&("left"===t.paginationAlign?e.pagination={style:{justifyContent:"flex-start"}}:"center"===t.paginationAlign&&(e.pagination={style:{justifyContent:"center"}})),e}function m(t){var e=(0,u.useState)(),n=e[0],l=e[1],d=t.loading,v=t.paginationAlign,m=t.allowExpandOneRowOnly,j=(0,s.Z)(t,h);return(0,g.jsx)(r.Z,{sx:b({},O.container),children:(0,g.jsx)(c.ZP,b({customStyles:P({paginationAlign:v}),sortIcon:(0,g.jsx)(f.Z,{sx:O.sortIcon}),selectableRowsComponent:i.Z,progressPending:d,progressComponent:(0,g.jsx)(p.Z,{}),highlightOnHover:!0,selectableRowsComponentProps:y,expandableIcon:{collapsed:(0,g.jsx)(a.Z,{}),expanded:(0,g.jsx)(o.Z,{})},expandableRowExpanded:function(t){return!!m&&t===n},onRowExpandToggled:function(t,e){return l(e)}},j))})}var O={container:{margin:d.Z.spacing(1)},sortIcon:{display:"block",marginLeft:d.Z.spacing(.5)}}},20965:function(t,e,n){"use strict";n.d(e,{NU:function(){return r},dd:function(){return a},qb:function(){return o},vP:function(){return i}});var r={width:"70px",center:!0,style:{whiteSpace:"nowrap"}},i={right:!0,minWidth:"50px",maxWidth:"120px",style:{whiteSpace:"nowrap"}},o={width:"155px",style:{whiteSpace:"nowrap"}},a={minWidth:"160px",maxWidth:"200px",style:{whiteSpace:"nowrap"}}},25894:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(36822),i=n(81458),o=n(59499),a=n(86421),l=n(85893);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(){return(0,l.jsx)(r.Z,{sx:c({},d),children:(0,l.jsx)(i.Z,{variant:"indeterminate"})})}var d={width:"100%",marginY:a.Z.spacing(3)}},71008:function(t,e,n){"use strict";n.d(e,{Z:function(){return v}});var r=n(36822),i=n(69417),o=n(50135),a=n(93946),l=n(59499),s=n(87109),c=n(47312),u=(n(67294),n(86421)),d=n(58822),f=n(41652),p=n(85893);function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?g(Object(n),!0).forEach((function(e){(0,l.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t){var e=t.disabled,n=t.title,l=t.hintText,g=t.value,v=t.onValueChange,y=t.onSearchClick,P=t.showSearchButton;return(0,p.jsxs)(r.Z,{children:[(0,p.jsxs)(c.Z,{disabled:e,children:[n,l&&(0,p.jsxs)("span",{style:{fontSize:"12px"},children:["\xa0\xa0",(0,p.jsxs)("em",{children:["(",l,")"]})]})]}),(0,p.jsxs)(r.Z,{display:"flex",alignItems:"center",children:[(0,p.jsx)(o.Z,{id:"search",variant:"outlined",value:g,size:"small",disabled:e,onChange:function(t){return v(t.target.value)},onKeyDown:function(t){"Enter"===t.key&&y()},InputProps:{autoComplete:"off",sx:[e?{backgroundColor:u.Z.extendedPalette.lightestGrey}:{}],startAdornment:(0,p.jsx)(s.Z,{position:"start",children:(0,p.jsx)(d.Z,{})}),endAdornment:(0,p.jsx)(s.Z,{position:"end",children:""!=g?(0,p.jsx)(a.Z,{size:"small",sx:h({},b.clearFiltersButton),onClick:function(){return v(void 0)},children:(0,p.jsx)(f.Z,{fontSize:"small"})}):""})}}),P&&(0,p.jsx)(i.Z,{type:"submit",variant:"outlined",onClick:y,children:"Search"})]})]})}var b={clearFiltersButton:{color:u.Z.extendedPalette.darkGrey}}},86889:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return I}});var r=n(69417),i=n(73381),o=n(59499),a=n(36822),l=n(15861),s=n(69661),c=n(67294),u=n(86421),d=n(20965),f=n(52049),p=n(86131),g=n(13104),h=n(19796),v=n(41664),b=n.n(v),y=n(41047),P=n(30926),m=n(11163),O=n(92388),j=n(89854),w=n(47157),x=n(97540),C=n(10694),Z=n(71148),S=n(71008),q=n(85893);function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function N(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?D(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function A(t){var e,n=t.filters,r=t.onFiltersChanged,i=(0,c.useState)(null!==(e=null===n||void 0===n?void 0:n.name)&&void 0!==e?e:""),o=i[0],a=i[1],l=function(t){a(null!==t&&void 0!==t?t:""),r(N(N({},n),{},{name:t}))};return(0,q.jsx)(S.Z,{title:"Search",hintText:"First name or last name",value:o,onValueChange:function(t){var e;a(null!==(e=null===t||void 0===t?void 0:t.trim())&&void 0!==e?e:""),void 0===t&&l(void 0)},onSearchClick:function(){return l(o.trim())},showSearchButton:!1})}function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var k=[{name:"Care Profile Details",cell:function(t){var e,n=null!==(e=t.profileImageUrl)&&void 0!==e?e:P.ql;return(0,q.jsxs)(a.Z,{display:"flex",alignItems:"center",children:[(0,q.jsx)(s.Z,{sx:B.avatar,src:n}),(0,q.jsx)(a.Z,{children:(0,q.jsx)(l.Z,{variant:"body2",children:(0,f.BD)(t.firstname,t.lastname)})})]})},width:"400px",style:{whiteSpace:"nowrap"}},{name:"Description",cell:function(t){var e;return(0,q.jsx)(l.Z,{variant:"body2",children:""!==t.description&&t.description?(0,f.pI)(null!==(e=t.description)&&void 0!==e?e:""):"Not Provided"})},maxWidth:"150px"},{name:"Relationship",cell:function(t){var e;return(0,q.jsx)(l.Z,{variant:"body2",children:t.relationship?(0,f.pI)(null!==(e=t.relationship)&&void 0!==e?e:""):"Not Provided"})},maxWidth:"150px"},E(E({},d.qb),{},{name:"Created On",id:"createdAt",selector:function(t){return t.createdAt?(0,p.NN)(t.createdAt):"-"},sortable:!0}),{name:"",cell:function(t){return(0,q.jsx)(q.Fragment,{children:(0,q.jsx)(b(),{href:{pathname:h.nB.Admin.Users.Account.CareProfiles,query:{userId:t.userId}},children:(0,q.jsxs)(r.Z,{size:"small",variant:"text",sx:B.editButton,children:["View\xa0",(0,q.jsx)(i.Z,{})]})})})},width:"170px",compact:!0,right:!0}];function I(t){var e=t.user,n=(0,m.useRouter)(),r=(0,O.tP)(n.query),i=(0,O.WN)(n.query),o=(0,c.useState)(r),a=o[0],l=o[1],s=(0,c.useState)(i),u=s[0],d=s[1],f=(0,c.useState)({pagination:{limit:u,offset:a<=0?0:(a-1)*u},filters:{}}),p=f[0],h=f[1],v=(0,Z.p)(p.filters,p.pagination,p.sort),b=v.careProfiles,S=v.loading,D=v.totalCareProfiles,N=v.getAllCareProfilesError;(0,c.useEffect)((function(){n.query.currentPage&&n.query.rowsPerPage?(Number(n.query.currentPage)<=0&&n.replace({query:E(E({},n.query),{},{currentPage:P.Kp})}),Number(n.query.rowsPerPage)<=0&&n.replace({query:E(E({},n.query),{},{rowsPerPage:P.fe})}),r!==a&&n.replace({query:E(E({},n.query),{},{currentPage:a})}),i!==u&&n.replace({query:E(E({},n.query),{},{rowsPerPage:u})})):n.replace({query:E(E({},n.query),{},{currentPage:a,rowsPerPage:u})})}),[a,r,u,i]);return(0,q.jsx)(j.Z,{authUser:e,tabRoutes:(0,w.AY)(),fullWidth:!0,title:"Admin - Care Profiles",showUserSearch:!0,children:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(A,{onFiltersChanged:function(t){h((function(e){return E(E({},e),{},{pagination:{limit:u,offset:0},filters:t})})),l(1)},filters:p.filters}
1),!S&&N&&(0,q.jsx)(x.Z,{type:"error",title:"Unexpected Error",message:C.XO.UNEXPECTED_ERROR_RELOAD,marginTop:0}),(0,q.jsx)(y.Z,{striped:!0,columns:k,data:null!==b&&void 0!==b?b:[],loading:S,noDataComponent:"No Care Profiles were found",pagination:!0,paginationRowsPerPageOptions:[5,10,20,50],paginationServer:!0,paginationTotalRows:D,onChangePage:function(t){h((function(e){return E(E({},e),{},{pagination:{limit:e.pagination.limit,offset:t<=0?0:(t-1)*e.pagination.limit}})})),l(t)},onChangeRowsPerPage:function(t){h((function(e){return E(E({},e),{},{pagination:{limit:t,offset:0}})})),d(t),l(1)},paginationDefaultPage:a,paginationPerPage:u,sortServer:!0,onSort:function(t,e){"createdAt"===t.id&&(h((function(t){return E(E({},t),{},{pagination:{limit:u,offset:0},sort:{field:g.lU.CreatedAt,direction:"asc"===e?g.Sr.Asc:g.Sr.Desc}})})),l(1))}})]})})}var B={container:{margin:u.Z.spacing(1)},avatar:{width:"40px",height:"40px",margin:u.Z.spacing(1.5,1.5,1.5,0)},editButton:{color:u.Z.palette.grey[700]}}},81301:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/care-profiles",function(){return n(86889)}])}},function(t){t.O(0,[5846,1423,4740,9774,2888,179],(function(){return e=81301,t(t.s=e);var e}));var e=t.O();_N_E=e}]);
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.