1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69091],{537719:function(e,t,n){"use strict";n.d(t,{$:function(){return c}});var o=n(557437),r=n(636760),a=n.n(r),s=n(896350),l=n(421208),i=n.n(l);let{TabPane:d}=s.default,c=e=>{let{children:t,headerFontSize:n=16,backgroundBodyColor:r,containerSize:l="default",...d}=e;return(0,o.jsx)("div",{className:i()["tabs-wrapper"],children:(0,o.jsx)(s.default,{...d,className:a()(d.className,i()[l],{[i()["bg-".concat(r)]]:!!r,[i()["header-font-size-".concat(n)]]:!!n}),children:t})})}},199792:function(e,t,n){"use strict";n.d(t,{j:function(){return c}});var o=n(557437),r=n(636760),a=n.n(r),s=n(110321),l=n(797413),i=n.n(l);let{Text:d}=s.default,c=e=>{let{children:t,color:n,fontSize:r,strong:s,italic:l,underline:c,align:u,transform:m,ellipsis:h,onClick:p}=e;return(0,o.jsx)(d,{className:a()({[i()["color-".concat(n)]]:!!n}),style:{fontSize:r,textAlign:u,textTransform:m,cursor:p?"pointer":"inherit"},strong:s,italic:l,underline:c,ellipsis:h,onClick:p,children:t})}},660791:function(e,t,n){"use strict";n.d(t,{S:function(){return c}});var o=n(628297),r=n(520577),a=n(555833),s=n(255086),l=n(868256),i=n(453918),d=n(950617);let c=()=>{let{t:e}=(0,i.G)("translation"),{t:t}=(0,i.e)();return[(0,a.VX)({Component:d.cq,name:"code",rowProps:{gutter:{xs:8,md:16}},colProps:{span:6},label:e("campus_code",{en:"Campus code",vn:"M\xe3 to\xe0, Äá»a Äiá»m"}),rules:[{required:!0,message:s.r.requiredMessage(e("campus_code_is_required",{en:"Campus code is required.",vn:"M\xe3 l\xe0 bắt buá»c."}))}],componentProps:{uppercase:!0,deleteWhiteSpace:!0,placeholder:t("enterCode")}}),(0,a.VX)({Component:o.default,name:"name",colProps:{span:14},label:e("campus_name",{en:"Campus name",vn:"T\xean to\xe0, Äá»a Äiá»m"}),rules:[{required:!0,message:s.r.requiredMessage(e("name_is_required",{en:"Campus name is required.",vn:"T\xean to\xe0 nh\xe0, Äá»a Äiá»m dạy há»c l\xe0 bắt buá»c."}))}],componentProps:{placeholder:e("enter_name",{en:"Enter name",vn:"Nháºp t\xean"})}}),(0,a.VX)({Component:r.Z,name:"totalFloors",colProps:{span:4},label:e("total_floor",{en:"Total Floor",vn:"Sá» tầng"}),componentProps:{min:1,max:999,placeholder:e("enter_total_floor",{en:"Enter total floor",vn:"Nháºp sá» tầng"})}}),(0,l.GA)({name:"orgId",label:e("department",{en:"Department",vn:"Bá» pháºn/Khoa"}),colProps:{span:24}}),(0,a.VX)({Component:o.default,name:"address",colProps:{span:24},label:e("address",{en:"Address",vn:"Äá»a chá»"}),componentProps:{placeholder:e("enter_address",{en:"Enter Address",vn:"Nháºp Äá»a chá»"})}}),(0,a.VX)({Component:o.default,name:"phone",colProps:{span:24},label:e("phone",{en:"Phone",vn:"Äiá»n thoại"}),componentProps:{placeholder:e("enter_phone",{en:"Enter phone",vn:"Nháºp Äiá»n thoại"})}}),(0,a.VX)({Component:o.default.TextArea,name:"description",colProps:{span:24},label:e("description"),componentProps:{rows:6,placeholder:e("user.enter_description")}})]}},649723:function(e,t,n){"use strict";n.d(t,{b:function(){return p},k:function(){return h}});var o=n(75408),r=n(628297),a=n(520577),s=n(555833),l=n(255086),i=n(272296),d=n(660791),c=n(731335),u=n(453918),m=n(270816);let h=()=>{let{t:e}=(0,u.G)("translation");return t=>(0,s.VX)({Component:c.z,name:"campusId",label:e("campus",{en:"Campus, School",vn:"Ph\xf2ng, Äá»a Äiá»m Ä\xe0o tạo"}),rules:[{required:!0,message:l.r.requiredMessage(e("campus_is_required",{en:"Study location is required.",vn:"To\xe0 nh\xe0, Äá»a Äiá»m dạy há»c l\xe0 bắt buá»c."}))}],...null!=t?t:{},componentProps:{showSearch:!0,allowClear:!0,hiddenValues:{type:i.c6.CAMPUS},endpoint:"academic-locations/suggestion",placeholder:e("select a campus",{vn:"Chá»n to\xe0 nh\xe0, Äá»a Äiá»m Ä\xe0o tạo",en:"Select Campus, School"}),optionFilterProp:"children",newItemOption:{modalProps:{width:850},formProps:{schema:d.S,nodeName:"academic-locations",hiddenValues:{type:i.c6.CAMPUS}},label:e("create_academic_campus",{vn:"Tạo to\xe0 nh\xe0, Äá»a Äiá»m Ä\xe0o tạo",en:"Create a Campus, School"})}}})},p=e=>{var t;let{t:n}=(0,u.G)("translation"),{form:p,initialValues:x}=null!=e?e:{},f=null!==(t=o.default.useWatch("campusId",p))&&void 0!==t?t:null==x?void 0:x.campusId;return[h()(),(0,s.VX)({Component:c.z,name:"floorId",label:n("floor",{en:"Floor, Area",vn:"Sá» tầng, khu vá»±c"}),componentProps:{showSearch:!0,allowClear:!0,triggerAutoSearch:!0,hiddenValues:{type:i.c6.FLOOR,campusId:f},endpoint:"academic-locations/suggestion",placeholder:n("select a floor",{vn:"Chá»n tầng, khu vá»±c Ä\xe0o tạo",en:"Select campus, area"}),optionFilterProp:"children",newItemOption:{modalProps:{width:850},formProps:{schema:d.S,nodeName:"academic-locations",hiddenValues:{type:i.c6.FLOOR,parentId:f}},label:n("create_academic_campus",{vn:"Tạo to\xe0 nh\xe0, Äá»a Äiá»m Ä\xe0o tạo",en:"
1Create a Campus, School"})}}}),(0,m.Vp)({name:"trainingTypes",componentProps:{mode:"multiple"}}),(0,s.VX)({Component:r.default,name:"roomPrefix",colProps:{span:14},rowProps:{gutter:{xs:8,md:16}},label:n("room_prefix",{en:"Room prefix",vn:"T\xean ph\xf2ng bắt Äầu vá»i"}),rules:[{required:!0,message:l.r.requiredMessage(n("room_prefix_is_required",{en:"Room prefix is required.",vn:"T\xean ph\xf2ng bắt Äầu vá»i."}))}],componentProps:{placeholder:n("enter_room_prefix",{en:"R, L",vn:"Lop, Phong"})}}),(0,s.VX)({Component:a.Z,name:"total",colProps:{span:5},label:n("total_rooms",{en:"Total Rooms",vn:"Sá» ph\xf2ng"}),componentProps:{min:1,max:999,placeholder:n("enter_total_rooms",{en:"Enter total rooms",vn:"Nháºp ph\xf2ng muá»n tạo"})}}),(0,s.VX)({Component:a.Z,name:"capacity",colProps:{span:5},label:n("study_location_capacity",{en:"Capacity",vn:"Sức chứa/chá» ngá»i"}),componentProps:{min:1,max:5e3,placeholder:n("enter_name",{en:"Enter capacity",vn:"Sức chứa/chá» ngá»i"})}})]}},272296:function(e,t,n){"use strict";n.d(t,{c6:function(){return o},ic:function(){return r}});let o={CAMPUS:"campus",FLOOR:"floor",STUDY_LOCATION:"study_location"},r=e=>(null==e?void 0:e.type)===o.STUDY_LOCATION},270816:function(e,t,n){"use strict";n.d(t,{Vp:function(){return i}}),n(729967);var o=n(693834),r=n(555833),a=n(453918),s=n(255086),l=n(563664);let i=e=>{let{t}=(0,a.G)("translation"),n=(null==e?void 0:e.componentProps)||{},i=(0,l.Kz)("TRAINING_TYPES");return(0,r.VX)({Component:o.default,name:(null==e?void 0:e.name)||"trainingType",colProps:(null==e?void 0:e.colProps)||{span:24},rowProps:null==e?void 0:e.rowProps,label:t("Training type",{vn:"Ph\xe2n loại"}),rules:(null==e?void 0:e.rules)||[{required:!0,message:s.r.requiredMessage(t("training_type_is_required",{en:"Training type is required.",vn:"Ph\xe2n loại l\xe0 bắt buá»c."}))}],componentProps:{className:"w-full",allowClear:!0,options:null==i?void 0:i.map(e=>({value:e.value,label:t(e.name.toLowerCase())})),placeholder:t("select_study_type",{en:"ex: Practice, theory, online",vn:"vd: l\xfd thuyết, thá»±c h\xe0nh"}),...n}})}},734061:function(e,t,n){"use strict";n.d(t,{h:function(){return p},q:function(){return h}});var o=n(557437);n(902265);var r=n(903810),a=n(697784),s=n(310365),l=n(198049),i=n(425628),d=n(43848),c=n(863930),u=n(199792),m=n(763266);let h={CONTEST:"contest",EXAMSHIFT:"examShift"},p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.EXAMSHIFT,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{t:n}=(0,a.G)("translation"),p=(0,i.ZG)();return()=>[s.P4.createTableColumnConfig({title:n("examinee"),dataIndex:"user",render:(e,t)=>{let n=null==t?void 0:t.user,r="".concat((null==n?void 0:n.firstName)||""," ").concat((null==n?void 0:n.lastName)||"");return(0,o.jsxs)(d.u,{flexDirection:"row",alignItems:"center",children:[(0,o.jsx)(d.u,{marginRight:10,children:(0,o.jsx)(c.Z,{user:n})}
1),(0,o.jsx)(u.j,{children:(0,o.jsx)("span",{children:r}),strong:!0})]})}}),s.P4.createTableColumnConfig({title:"Emails",sortable:!0,key:"emails",render:(e,t)=>{var n,a;return(0,o.jsx)("div",{children:null==t?void 0:null===(a=t.user)||void 0===a?void 0:null===(n=a.emails)||void 0===n?void 0:n.map((e,t)=>(0,o.jsx)("div",{className:"m-b-10",children:(0,o.jsx)(r.Z,{color:"green",children:e.email})},t))})}}),s.P4.createTableColumnConfig({title:n("importDate"),dataIndex:"importDate",render:l.M.fullDatetimeConverter}),s.P4.createTableColumnConfig({title:n("examShift"),sortable:!0,key:"examShiftName",hidden:e===h.EXAMSHIFT,render:(e,t)=>{var n;let{examShift:o}=t;return null!==(n=null==o?void 0:o.name)&&void 0!==n?n:"notAddedYet"}}),s.P4.createTableColumnConfig({title:n("action"),render:n=>{let{contestId:r,examShiftId:a,userId:s,id:l,name:i}=n;return(0,o.jsx)(m.ZP,{contestId:r,examShiftId:a,userId:s,searchForm:p,mode:e,id:l,name:i,setSelectedUser:t})}})]}},763266:function(e,t,n){"use strict";n.d(t,{NA:function(){return C},pj:function(){return T},u0:function(){return E}});var o=n(557437),r=n(557271),a=n(902265),s=n(185274),l=n(697784),i=n(305411),d=n(703036),c=n(190193),u=n(502772),m=n(513065),h=n(425628),p=n(302410),x=n(174038),f=n(993499),v=n(570544),g=n(734061),b=n(16537),S=n.n(b),j=n(616703);let P=()=>{let{t:e}=(0,l.G)("translation");return t=>[...new Set(t.map(t=>"- ".concat(e(null==t?void 0:t.reason))))].join("\n")},C=e=>{let{contestId:t,examShiftId:n,userId:a,searchForm:s,children:u=(0,o.jsx)(x.Z,{name:"delete-icon",width:18,className:"cursor-pointer"}),isRemoveList:m=!1,listToRemove:h,disabled:f=!1,message:v="doYouWantToRemoveThisUserFromExamShift",onGotSuccess:g,isRemoveFromContest:b=!1}=e,{t:S}=(0,l.G)("translation"),j=P(),C=(0,d.Eb)();return(0,o.jsx)("div",{className:"flex justify-center items-center",children:(0,o.jsx)(p.G,{onClick:()=>{c.FormUtils.submitForm(m?{listToRemove:h,isRemoveList:m,isRemoveFromContest:b}:{userIds:[a],examShiftId:n,isRemoveList:m,isRemoveFromContest:b},{endpoint:i.H.generateNodeEndpoint("exam-shifts/".concat(t,"/remove-user")),method:"delete",onGotSuccess:e=>{if(g&&g(),e.length>0){r.ZP.error({message:j(e)});return}r.ZP.success({message:S("success")}),null==s||s.submit()},onGotError:e=>{let{message:t}=C(null==e?void 0:e.error);r.ZP.error({message:t})}})},confirmation:{message:S(v)},disabled:f,children:u})})},T=e=>{let{contestId:t,examShiftId:n="",id:s="",list:u=[],onGotSuccess:m=e=>e,children:p=(0,o.jsx)(x.Z,{name:"edit-icon",width:18})}=e,{t:g}=(0,l.G)("translation"),b=(0,d.Eb)(),[j,P]=(0,a.useState)(!1),C=(0,h.ZG)(),[T,_]=(0,a.useState)(n),y=()=>{c.FormUtils.submitForm({newExamShiftId:T},{endpoint:i.H.generateNodeEndpoint("exam-shift-users/".concat(s,"/change-exam-shift")),method:"put",onGotSuccess:e=>{m&&m(e),r.ZP.success({message:g("success")}),null==C||C.submit(),P(!j)},onGotError:e=>{let{message:t}=b(null==e?void 0:e.error);r.ZP.error({message:t})}})},I=()=>{c.FormUtils.submitForm({newExamShiftId:T,list:u},{endpoint:i.H.generateNodeEndpoint("exam-shift-users/change-exam-shift-with-list"),method:"put",onGotSuccess:e=>{if(m&&m(e),null==e?void 0:e.isError){r.ZP.error({message:g("chooseDuplicateExaminee")});return}r.ZP.success({message:g("success")}),null==C||C.submit(),P(!j)},onGotError:e=>{let{message:t}=b(null==e?void 0:e.error);r.ZP.error({message:t})}})};return(0,o.jsxs)("div",{className:"flex justify-center items-center",children:[(0,o.jsx)("div",{className:"cursor-pointer",onClick:()=>{P(!j)},children:p}),(0,o.jsx)(f.ZP,{className:S().modal,width:"70%",height:"70%",title:g("changeExamShift"),destroyOnClose:!0,visible:j,closable:!0,footer:(0,o.jsx)("div",{children:(0,o.jsx)(v.HButton,{onClick:()=>{if(u.length>0){I();return}y()},children:g("submit")})}),onCancel:()=>{P(!1)},children:(0,o.jsx)("div",{children:(0,o.jsx)(E,{contestId:t,setExamShiftSelected:_,examShiftSelected:T})})})]})},E=e=>{let{setExamShiftSelected:t,examShiftSelected:n,contestId:r}=e,a=(0,j.r)({editAble:!1});return(0,o.jsx)("div",{children:(0,o.jsxs)(u.HFeature,{featureId:"exam-shifts",nodeName:"exam-shifts",documentIdName:"examShiftIdToChange",useQueryParams:!1,children:[(0,o.jsx)(m.default,{hiddenFields:{contestId:r,status:{neq:s.BaseStatus.ACTIVE}}}),(0,o.jsx)(u.HTable,{schema:a,rowSelection:{type:"radio",preserveSelectedRowKeys:!1,selectedRowKeys:[n],onSelect:e=>{t(e.id)}}})]})})};t.ZP=e=>{let{id:t,contestId:n,examShiftId:r,userId:a,searchForm:s,mode:l,name:i,setSelectedUser:d}=e;return(0,o.jsxs)("div",{className:"flex justify-center items-center gap-[12px]",children:[l===g.q.CONTEST&&(0,o.jsx)(T,{contestId:n,examShiftId:r,userId:a,searchForm:s,id:t,name:i,onGotSuccess:()=>{d&&d({})}}),(0,o.jsx)(C,{contestId:n,examShiftId:r,userId:a,searchForm:s,isRemoveFromContest:l===g.q.CONTEST,onGotSuccess:()=>{d&&d({})}})]})}},240188:function(e,t,n){"use strict";n.d(t,{R:function(){return j},p:function(){return S}});var o=n(557437),r=n(557271),a=n(673002),s=n(902265),l=n(305411),i=n(703036),d=n(697784),c=n(425628),u=n(190193),m=n(993499),h=n(570544),p=n(559407),x=n(860903),f=n(903810),v=n(198049),g=n(310365);let b=()=>{let{t:e}=(0,d.G)("translation");return()=>[g.P4.createTableColumnConfig({title:e("Organizations"),dataIndex:"org",sortable:!0,key:"orgId",render:v.M.showOrgConverter}),{title:e("fullName"),dataIndex:"firstName",key:"name",render:(e,t)=>(0,o.jsxs)("span",{children:[t.firstName," ",t.lastName]})},g.P4.createTableColumnConfig({title:"Emails",sortable:!0,key:"emails",render:(e,t)=>{var n;return(0,o.jsx)("div",{children:null==t?void 0:null===(n=t.emails)||void 0===n?void 0:n.map((e,t)=>(0,o.jsx)("div",{className:"m-b-10",children:(0,o.jsx)(f.Z,{color:"green",children:e.email})},t))})}}),g.P4.createTableColumnConfig({title:e("hasAccount"),dataIndex:"hasAccount",key:"hasAccount",render:e=>e?"Ok":"-"})]},S=e=>{let{contestId:t,examShiftId:n}=e,{t:p}=(0,d.G)("translation"),f=(0,i.Eb)(),v=(0,c.ZG)(),[g,b]=(0,s.use
1State)(!1),[S,P]=(0,s.useState)({}),[C,T]=(0,s.useState)(null),E=()=>{let e=Object.keys(S);if(0===e.length){r.ZP.error({message:p("pleaseChooseUsersToAdd")});return}u.FormUtils.submitForm({userIds:e,examShiftId:n},{endpoint:l.H.generateNodeEndpoint("exam-shifts/".concat(t,"/add-user")),method:"post",onGotSuccess:e=>{null==v||v.submit();let t={};if((null==e?void 0:e.length)===0){P({}),T({}),r.ZP.success({message:p("success")}),b(!1);return}null==e||e.forEach(e=>{t[e.userId]=e.userId}),T(t),r.ZP.error({message:p("someUserFailedToAdd")})},onGotError:e=>{let{message:t}=f(null==e?void 0:e.error);r.ZP.error({message:t})}})};return(0,o.jsxs)("div",{children:[(0,o.jsx)(a.ZP,{onClick:()=>{b(!g)},children:p("addExaminee")}),(0,o.jsx)(m.ZP,{width:"70%",height:"70%",title:p("addExaminee"),destroyOnClose:!0,visible:g,closable:!0,footer:(0,o.jsxs)("div",{children:[" ",(0,o.jsx)(h.HButton,{onClick:()=>{E()},children:p("submit")})," "]}),onCancel:()=>{P({}),T(null),b(!1)},className:"min-h-[600px]",children:(0,o.jsx)(x.default,{className:"max-h-[70vh]",children:(0,o.jsx)("div",{className:"w-[99%]",children:(0,o.jsx)(j,{setUserSelected:P,userSelected:S,failedRecord:C,setFailedRecord:T,examShiftId:n})})})})]})},j=e=>{let{setUserSelected:t,userSelected:n,failedRecord:r,setFailedRecord:a,examShiftId:s}=e,l=b();return(0,o.jsx)(p.Z,{setSelectedRecord:t,selectedRecord:n,failedRecord:r,setFailedRecord:a,hFeatureProps:{featureId:"users/can-add-to-exam-shift",nodeName:"users/can-add-to-exam-shift/".concat(s),documentIdName:"userIdToAddToShift",useQueryParams:!1},hSearchFormProps:{withRelations:["org"],hiddenValues:{filter:{where:{alwaysReturnWithConditions:{_id:{inq:Object.keys(n)}}}}}},tableSchema:l})}},769091:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return U}});var o=n(557437),r=n(58157),a=n(513065),s=n(190193),l=n(425628),i=n(502772),d=n(616703),c=()=>{let e=(0,d.r)({editAble:!0});return(0,o.jsx)(i.HTable,{schema:e})},u=n(697784),m=n(636760),h=n.n(m),p=n(576375),x=n(174223),f=e=>{var t;let{children:n,className:r,title:a,...s}=e,i=(0,l.b_)();return(0,o.jsx)(p.X,{title:a||(null==i?void 0:i.name)||(null==i?void 0:i.title),...s,titleAlign:"left",className:h()("sub-panel-drawer-page-layout",r),getContainer:null!==(t=document.getElementById(x.j))&&void 0!==t?t:void 0,children:n})},v=n(939304),g=n(894910),b=n(259128),S=n.n(b),j=n(516726),P=n(553898),C=n(577694),T=n(75408),E=n(555833),_=n(6523),y=n(950617),I=n(649723),N=n(531023),A=n(570720);let w=e=>{let{contest:t}=e,n=(0,A.nT)(),{t:r}=(0,u.G)("translation"),a=T.default.useFormInstance(),s=T.default.useWatch("startAt",a);return(0,o.jsx)(_.gK,{schema:()=>[n.createStartAtTimeSchema({name:"startAt",label:r("allowableStartTime"),colProps:{xs:12,sm:12,md:8},componentProps:{selectDateFrom:null==t?void 0:t.contestStartAt,selectDateTo:null==t?void 0:t.contestEndAt}}),n.createDurationTimeSchema({name:"duration",colProps:{xs:12,sm:12,md:8}}),n.createEndAtTimeSchema({name:"endAt",label:r("examEndTime"),colProps:{xs:12,sm:12,md:8},componentProps:{selectDateFrom:null!=s?s:null==t?void 0:t.contestStartAt,selectDateTo:null==t?void 0:t.contestEndAt,disabled:!s}})]})},F=e=>{let{contestRootExamIds:t,contest:n}=e,{t:o}=(0,u.G)("translation"),r=(0,P.lj)(),a=(0,I.k)();return()=>[(0,E.VX)({Component:y.cq,name:"code",colProps:{span:6},label:o("contest.code"),rules:[{required:r}],componentProps:{placeholder:o("contest.code"),disabled:!r,deleteWhiteSpace:!0,uppercase:!0}}),(0,E.VX)({Component:y.cq,name:"name",colProps:{span:18},label:o("contest.name"),rules:[{validator:(e,t)=>t.trim()?Promise.resolve():Promise.reject(Error()),message:o("contest.name_is_required")}],componentProps:{placeholder:o("contest.name")}}),a({rules:[]}),(0,E.VX)({Component:w,componentProps:{contest:n}}),N.G.createRootExamSuggestionElement({label:"".concat(o("selectRootExam")," (").concat(o("youNeedToSelectAnExamForTheContestFirst"),")"),colProps:{span:24},componentProps:{hiddenValues:{id:{inq:t||["notMatch"]}}}},o)]};var Z=n(902265),G=n(185274),R=n(559407),q=n(734061),V=n(240188),k=n(241636);let O=e=>{let{contestId:t,examShiftId:n}=e,[r,a]=(0,Z.useState)({});return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(i.HFeature,{featureId:"exam-shift-users",nodeName:"exam-shift-users",documentIdName:"ExamineeIdOfExamShift",useQueryParams:!0,children:(0,o.jsx)(M,{contestId:t,examShiftId:n,selectedUser:r,setSelectedUser:a})})})},M=e=>{let{contestId:t,examShiftId:n,setSelectedUser:r,selectedUser:a}=e,s=(0,q.h)(q.q.EXAMSHIFT,r),i=(0,l.ZG)();return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(R.R,{setSelectedRecord:r,selectedRecord:a,hSearchFormProps:{withRelations:["user"],hiddenFields:{contestId:t,examShiftId:null!=n?n:"",status:{neq:G.BaseStatus.DELETED}},renderRightSuffix:(0,o.jsx)(X,{contestId:t,examShiftId:n,selectedUser:a,setSelectedUser:r,searchForm:i})},tableSchema:s})})},X=e=>{var t;let{contestId:n,examShiftId:r,selectedUser:a,setSelectedUser:s,searchForm:l}=e,i=null===(t=Object.values(a))||void 0===t?void 0:t.map(e=>{let{id:t,userId:n,examShiftId:o}=e;return{id:t,userId:n,examShiftId:o}});return(0,o.jsxs)("div",{className:"flex justify-center gap-[4px]",children:[(0,o.jsx)(V.p,{contestId:n,examShiftId:r}),!!i.length&&(0,o.jsx)(k.Z,{contestId:n,listToRemove:i,disabled:!1,searchForm:l,onGotSuccess:()=>{s({})}})]})};var B=e=>{let{duration:t,contestId:n,contestRootExamIds:r,contest:a}=e,{t:s}=(0,u.G)("translation"),i=(0,l.b_)(),d=(0,P.lj)(),c=F({contestRootExamIds:r,contest:a}),m=e=>{let t=S()(e);return t.contestId=n,t.isPrivateContest=a.isPrivateContest,t};return d?(0,o.jsx)(j.V,{initialValues:{duration:t},showErrorMessage:!0,schema:c,onDataReadyToSubmit:m}):(0,o.jsxs)(C.Z,{examShiftId:null==i?void 0:i.id,examRootTabHiddenFields:{id:{inq:null==i?void 0:i.rootExamIds}},examTabHiddenFields:{rootExamId:{inq:null==i?void 0:i.rootExamIds}},rootExamIdsInExamShift:null==i?void 0:i.rootExamIds,hiddenCreateButton:!0,showDeleteButton:!1,showGenerateExamButton:!0,children:[(0,o.jsx)(g.Z,{tab:s("examineeManagement"),children:(0,o.jsx)(O,{contestId:n,examShiftId:null==i?void 0:i.id})},"examineeManagement"),(0,o.jsx)(g.Z,{className:"flex justify-center",tab:s("examShiftInfo"),children:(0,o.jsx)(j.V,{className:"mdSize",hideControlButton:!1,hideSubmitAndContinueButton:!1,hideSubmitButton:!0,initialValues:{duration:t},showErrorMessage:!0,schema:c,onDataReadyToSubmit:m})},"examShiftInfo")]})},H=n(889148),D=e=>{var t,n;let{contest:r}=e,{t:a}=(0,u.G)("translation"),s=(0,P.lj)(),i=(0,l.b_)();return s?(0,o.jsx)(H.Fj,{title:a("contest.createNewExamShift"),width:"1000px",hideSubmitAndContinueButton:!0,children:(0,o.jsx)(B,{duration:null==r?void 0:null===(n=r.regulations)||void 0===n?void 0:n.duration,contestId:null==r?void 0:r.id,contestRootExamIds:null==r?void 0:r.rootExamIds,contest:r})}):(0,o.jsx)(f,{footer:null,extra:(0,o.jsx)(v.Z,{endpoint:"exam-shifts/approve-or-cancel-approve/".concat(null==i?void 0:i.id),currentStatus:null==i?void 0:i.status,confirmApproveMessage:a("wantToApproveTheExamShift"),confirmCancelApproveMessage:a("wantToCancelApproveTheExamShift")}),children:(0,o.jsx)(B,{duration:null==r?void 0:null===(t=r.regulations)||void 0===t?void 0:t.duration,contestId:null==r?void 0:r.id,contestRootExamIds:null==r?void 0:r.rootExamIds,contest:r})})},U=()=>{let e=(0,l.b_)();return e.id?(0,o.jsxs)(r.default,{featureId:"exam-shift",nodeName:"exam-shifts",documentIdName:"examShiftId",useQueryParams:!1,children:[(0,o.jsx)(a.HSearchFormWithCreateButton,{hiddenValues:s.FormUtils.createSearchHiddenValues({contestId:e.id})}),(0,o.jsx)(D,{contest:e}),(0,o.jsx)(c,{})]}):null}},616703:function(e,t,n){"use strict";n.d(t,{r:function(){return s}});var o=n(697784),r=n(310365),a=n(570720);let s=e=>{let{editAble:t=!0}=e,{t:n}=(0,o.G)("translation");return()=>{let e=[r.P4.createTableColumnConfig({title:n("contest.name"),dataIndex:"name",sortable:!0,key:"name"}),r.P4.createTableColumnConfig({title:n("contest.code"),dataIndex:"code",sortable:!0,key:"code"}),r.P4.createTableColumnConfig({title:n("contest.examinee"),dataIndex:"examinee",sortable:!0,key:"examinee"}),r.P4.createTableColumnConfig({title:n("contest.duration"),dataIndex:"startAt",sortable:!0,key:"startAt",render:(e,t)=>{let{endAt:n}=t;return(0,a.Ut)(e,n)}}),r.P4.createColumnBaseStatus(n)];return t&&e.push(r.P4.createEditColumn(n("edit"))),e}}},241636:function(e,t,n){"use strict";var o=n(557437),r=n(673002),a=n(697784),s=n(763266);t.Z=e=>{let{contestId:t,listToRemove:n,disabled:l,searchForm:i,onGotSuccess:d,isRemoveFromContest:c=!1}=e,{t:u}=(0,a.G)("translation");return(0,o.jsx)(s.NA,{contestId:t,isRemoveList:!0,listToRemove:n,searchForm:i,disabled:l,isRemoveFromContest:c,message:"doYouWantToRemoveTheseUsersFromExamShift",children:(0,o.jsx)(r.ZP,{disabled:l,children:u("remove")}),onGotSuccess:d})}},577694:function(e,t,n){"use strict";var o=n(557437),r=n(894910),a=n(626579),s=n(697784),l=n(537719),i=n(822375),d=n(570544),c=n(406578);t.Z=e=>{let{t}=(0,s.G)("translation"),{contestId:n,examShiftId:u,children:m,examRootTabHiddenFields:h,examTabHiddenFields:p,onGotSuccessCreateExam:x,rootExamIdsInExamShift:f,showGenerateExamButton:v=!1,showDeleteButton:g=!0,hiddenCreateButton:b=!1}=e;return(0,o.jsxs)(l.$,{type:"card",centered:!0,destroyInactiveTabPane:!0,children:[m,(0,o.jsx)(r.Z,{tab:t("contest.rootExam"),children:(0,o.jsx)(c.default,{contestId:n,examShiftId:u,type:a.ExamTypes.ROOT_EXAM,hiddenCreateButton:b,showDeleteButton:g,showGenerateExamButton:v,onGotSuccessCreateExam:x,hiddenFields:h})},"rootExam"),(0,o.jsx)(r.Z,{tab:t("contest.realExam"),children:(0,o.jsx)(c.default,{contestId:n,examShiftId:u,type:a.ExamTypes.EXAM,hiddenCreateButton:!0,showDeleteButton:g,hiddenFields:p,onGotSuccessCreateExam:x,showApproveAction:!1,controls:(0,o.jsx)(i.Z,{rootExamIdsInExamShift:f,examShiftId:u,rendering:v,children:(0,o.jsx)(d.HButton,{children:t("generateExams")})})})},"exam")]})}},559407:function(e,t,n){"use strict";n.d(t,{R:function(){return l}});var o=n(557437),r=n(502772),a=n(58157),s=n(513065);let l=e=>{let{setSelectedRecord:t,selectedRecord:n,failedRecord:a=null,setFailedRecord:l=null,hSearchFormProps:i,tableSchema:d,rowSelectionProps:c={},isUseSearchForm:u=!0,tableProps:m={}}=e;return(0,o.jsxs)(o.Fragment,{children:[u&&(0,o.jsx)(s.default,{...i,onGotSuccess:()=>{i.onGotSuccess&&i.onGotSuccess(),l&&l(null)}}),(0,o.jsx)(r.HTable,{...m,schema:d,rowSelection:{type:"checkbox",preserveSelectedRowKeys:!1,...c,selectedRowKeys:Object.keys(null!=n?n:{}),onCell:e=>(null==a?void 0:a[e.id])?{className:"bg-[red]"}:a&&(null==n?void 0:n[e.id])?{className:"bg-[green]"}:{},onSelectAll:(e,n,o)=>
1{if(l&&l(null),!e){t({});return}t(e=>{let t=o.reduce((e,t)=>({...e,[t.id]:t}),{});return{...e,...t}})},onSelect:(e,n)=>{if(l&&l(null),!n){t(t=>{let n={...t};return delete n[e.id],n});return}t(t=>({...t,[e.id]:e}))}}})]})};t.Z=e=>{let{setSelectedRecord:t,selectedRecord:n,failedRecord:r,setFailedRecord:s,hFeatureProps:i,hSearchFormProps:d,tableSchema:c,rowSelectionProps:u={}}=e;return(0,o.jsx)("div",{children:(0,o.jsx)(a.default,{...i,children:(0,o.jsx)(l,{setSelectedRecord:t,selectedRecord:n,failedRecord:r,setFailedRecord:s,hSearchFormProps:d,tableSchema:c,rowSelectionProps:u})})})}},421208:function(e){e.exports={"bg-grey":"h-tabs_bg-grey__rGanf","header-font-size-16":"h-tabs_header-font-size-16__sguPe","header-font-size-18":"h-tabs_header-font-size-18__tFQzg",small:"h-tabs_small__BbBJR",middle:"h-tabs_middle__23Nt1",large:"h-tabs_large__WR7JO","tabs-wrapper":"h-tabs_tabs-wrapper__bVBa7"}},16537:function(e){e.exports={modal:"exam-shift-detail_modal__iRfAB"}}}]);
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.