PageSourceSearch

https://www.bcpcouncil.gov.uk/_mk7dvA_e6bfaad7-9b78-4ed1-813d-b97e…Dashboard.template.736c5b04e29bd93ee942.mjs

js bcpcouncil.gov.uk collected 2026-10-02 02:51:59 UTC 6,085 bytes, 38 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8287],{93903(k,h,r){r.r(h),r.d(h,{default:()=>Q});var e=r(48322),s=r(34500),i=r(67820),y=r(4229),v=r(21937),M=r(84483),O=r(67035),D=r(91507),u=r(97286),P=r(72177),m=r(55141),A=r(62891),N=r(5459),d=r(77120),L=Object.defineProperty,T=Object.defineProperties,U=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,x=(t,n,l)=>n in t?L(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,_=(t,n)=>{for(var l in n||(n={}))S.call(n,l)&&x(t,l,n[l]);if(C)for(var l of C(n))I.call(n,l)&&x(t,l,n[l]);return t},B=(t,n)=>T(t,U(n));const{login:K}=M.p,{fosteringForm:R,manageHousehold:b}=v.N,$=()=>e.createElement(N.A,{pageTitle:"Dashboard"},e.createElement(F,null),e.createElement("aside",{className:"[ page-aside page-aside--border ]"},e.createElement(i.A,{path:b},"Create Household"))),F=()=>{const{user:{username:t},logoutUser:n}=(0,y.vz)(),l=t,{user:a}=(0,d.n)();return e.createElement(W,{className:"page-main"},l?e.createElement("div",null,"You are logged in as: ",l):null,e.createElement(H,null,e.createElement(D.A,{onClick:()=>n(K)},"Log out"),e.createElement(i.A,{path:R},"Create new blank form")),a!=null&&a.name?e.createElement(z,{user:a}):null,a!=null&&a.name?null:e.createElement(j,null),e.createElement(G,{households:a==null?void 0:a.households}))},W=s.default.article`
2  display: flex;
3  flex-direction: column;
4  gap: ${({theme:t})=>t.spacing.xs};
5`,H=s.default.div`
6  display: flex;
7  flex-direction: row;
8  gap: ${({theme:t})=>t.spacing.xxs};
9  align-items: center;
10`,z=({user:t})=>{const{name:n,contactEmail:l,contactName:a,contactTelephone:o}=t;return e.createElement(E,null,e.createElement("h2",null,"Your user profile"),e.createElement("div",null,e.createElement(Z,null,n?e.createElement(p,null,e.createElement("dt",null,"Name:"),e.createElement("dd",null,n)):null,a?e.createElement(p,null,e.createElement("dt",null,"Contact Name:"),e.createElement("dd",null,a)):null,o?e.createElement(p,null,e.createElement("dt",null,"Contact Telephone:"),e.createElement("dd",null,o)):null,l?e.createElement(p,null,e.createElement("dt",null,"Contact Email:"),e.createElement("dd",null,l)):null)),e.createElement(E,{as:"details"},e.createElement("summary",null,"Edit details"),e.createElement(Y,{user:t})))},E=s.default.div`
11  display: flex;
12  flex-direction: column;
13  gap: ${({theme:t})=>t.spacing.xxxs};
14`,Z=s.default.dl`
15  display: flex;
16  flex-direction: column;
17  gap: ${({theme:t})=>t.spacing.xxxs};
18`,p=s.default.div`
19  display: grid;
20  grid-template-columns: repeat(2, minmax(0, 1fr));
21  gap: ${({theme:t})=>t.spacing.xxs};
22`,j=()=>{const{createUser:t}=(0,d.n)(),[n,l]=(0,e.useState)(!1),a=(0,u.mN)(),{handleSubmit:o,formState:{errors:c}}=a,f=o(g=>{l(!0),t(g).then(()=>l(!1))});return e.createElement(E,null,e.createElement("h2",null,"Create your user profile"),e.createElement(u.Op,_({},a),e.createElement(P.A,{onSubmit:f},e.createElement(A.Ay,{errors:c}),e.createElement(m.pd,{name:"txtName",label:"Language School / Guardianship Company Name",bold:!1,rules:{required:"Name is required"}}),e.createElement(m.pd,{name:"txtContactName",label:"Contact Name",bold:!1,rules:{required:"Name is required"}}),e.createElement(m.pd,{name:"txtContactTel",label:"Contact Telephone Number",bold:!1,rules:{required:"Telephone number is required",pattern:{value:/^[0-9\s]*$/,message:"Enter a valid telephone number"}}}),e.createElement(m.pd,{name:"txtContactEmail",label:"Contact Email address",bold:!1,rules:{required:"Email is required",pattern:{value:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/,message:"Enter an email address in the correct format, like [email protected]"}}}),e.createElement(O.A,null,n?"Submitting...":"Create Profile"))))},Y=({user:t})=>{const{editUser:n}=(0,d.n)(),[l,a]=(0,e.useState)(!1),o=(0,u.mN)(),{handleSubmit:c,formState:{errors:f}}=o,g=c(w=>{a(!0),n(w).then(()=>a(!1))});return t?e.createElement(u.Op,_({},o),e.createElement(P.A,{onSubmit:g},e.createElement(A.Ay,{errors:f}),e.createElement(m.pd,{name:"txtName",label:"Language School / Guardianship Company Name",bold:!1,rules:{required:"Name is required"},value:t.name}),e.createElement(m.pd,{name:"txtContactName",label:"Contact Name",bold:!1,rules:{required:"Name is required"},value:t.contactName}),e.createElement(m.pd,{name:"txtContactTel",label:"Contact Telephone Number",bold:!1,rules:{required:"Telephone number is required",pattern:{value:/^[0-9\s]*$/,message:"Enter a valid telephone number"}},value:t.contactTelephone}),e.createElement(m.pd,{name:"txtContactEmail",label:"Contact Email address",bold:!1,rules:{required:"Email is required",pattern:{value:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/,message:"Enter an email address in the correct format, like [email protected]"}},value:t.contactEmail}),e.createElement(O.A,null,l?"Submitting...":"Update Profile"))):null},G=({households:t})=>{const{deleteHousehold:n}=(0,d.n)(),[l,a]=(0,e.useState)(!1),o=c=>{a(!0),n(c).then(()=>a(!1))};return t!=null&&t.length?e.createElement(E,null,e.createElement("h2",null,"Your saved households"),e.createElement(q,null,t.map(c=>e.createElement(V,B(_({key:c.id},c),{handleDelete:o}))),e.createElement("span",null,l?"Deleting...":null))):null},q=s.default.ul`
23  display: flex;
24  flex-direction: column;
25  gap: ${({theme:t})=>t.spacing.xxxs};
26  list-style: none;
27  margin: 0;
28  padding: 0;
29`,V=({id:t,title:n,handleDelete:l})=>e.createElement(X,{key:t},e.createElement("span",null,n),e.createElement(J,null,e.createElement("span",null,e.createElement(i.A,{path:`${v.N.fosteringForm}?hhid=${t}`},"Create new form")),e.createElement("span",null,e.createElement(i.A,{path:`${b}?hhid=${t}`},"Edit")),e.createElement("span",null,e.createElement(D.A,{onClick:()=>l(t)}
29,"Delete")))),X=s.default.li`
30  display: flex;
31  justify-content: space-between;
32  align-items: center;
33  gap: ${({theme:t})=>t.spacing.xxxs};
34`,J=s.default.div`
35  display: flex;
36  align-items: center;
37  gap: ${({theme:t})=>t.spacing.xxxs};
38`,Q=$}}]);

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.