PageSourceSearch

https://pro.foodsafesystem.com/static/js/4763.d26f2c7a.chunk.js

js foodsafesystem.com collected 2026-09-30 16:51:35 UTC 14,199 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkfss=globalThis.webpackChunkfss||[]).push([[4763],{87928(e,t,a){a.d(t,{Ay:()=>d,uy:()=>s});var n=a(34619);a(61770),a(44414);var i=a(23334),r=a.n(i),l=a(14857),o=a(97497);function s(e){const t=(0,l.A)(),a={show:!0,label:"Total",color:t.palette.text.secondary,fontSize:t.typography.subtitle2.fontSize,fontWeight:t.typography.subtitle2.fontWeight,lineHeight:t.typography.subtitle2.lineHeight},n={offsetY:8,color:t.palette.text.primary,fontSize:t.typography.h3.fontSize,fontWeight:t.typography.h3.fontWeight,lineHeight:t.typography.h3.lineHeight},i={colors:[t.palette.primary.main,t.palette.warning.main,t.palette.info.main,t.palette.error.main,t.palette.success.main,t.palette.warning.dark,t.palette.success.darker,t.palette.info.dark,t.palette.info.darker],chart:{toolbar:{show:!1},zoom:{enabled:!1},foreColor:t.palette.text.disabled,fontFamily:t.typography.fontFamily},states:{hover:{filter:{type:"lighten",value:.04}},active:{filter:{type:"darken",value:.88}}},fill:{opacity:1,gradient:{type:"vertical",shadeIntensity:0,opacityFrom:.4,opacityTo:0,stops:[0,100]}},dataLabels:{enabled:!1},stroke:{width:3,curve:"smooth",lineCap:"round"},grid:{strokeDashArray:3,borderColor:t.palette.divider},xaxis:{axisBorder:{show:!1},axisTicks:{show:!1}},markers:{size:0,strokeColors:t.palette.background.paper},tooltip:{x:{show:!1}},legend:{show:!0,fontSize:String(13),position:"top",horizontalAlign:"right",markers:{radius:12},fontWeight:500,itemMargin:{horizontal:12},labels:{colors:t.palette.text.primary}},plotOptions:{bar:{borderRadius:4,columnWidth:"28%"},pie:{donut:{labels:{show:!0,value:n,total:a}}},radialBar:{track:{strokeWidth:"100%",background:(0,o.X4)(t.palette.grey[500],.16)},dataLabels:{value:n,total:a}},radar:{polygons:{fill:{colors:["transparent"]},strokeColors:t.palette.divider,connectorColors:t.palette.divider}},polarArea:{rings:{strokeColor:t.palette.divider},spokes:{connectorColors:t.palette.divider}}},responsive:[{breakpoint:t.breakpoints.values.sm,options:{plotOptions:{bar:{columnWidth:"40%"}}}},{breakpoint:t.breakpoints.values.md,options:{plotOptions:{bar:{columnWidth:"32%"}}}}]};return r()(i,e)}const d=n.A},86841(e,t,a){a.d(t,{oM:()=>o,dO:()=>d,er:()=>x});a(9950);var n=a(9213),i=a(59254),r=a(44414);const l=(0,i.Ay)(n.A)(e=>{let{theme:t}=e;return{cursor:"pointer","&:nth-of-type(odd)":{padding:t.spacing(0,1),color:t.palette.text.secondary,backgroundColor:t.palette.background.neutral,borderBottom:`1px solid ${t.palette.divider}`},whiteSpace:"nowrap","& .MuiTableCell-sizeSmall":{padding:"5px 6px 5px 10px"}}});function o(e){return(0,r.jsx)(l,{...e,children:e.children})}a(63575);var s=a(21671);function d(e){let{emptyRows:t,height:a}=e;return t?(0,r.jsx)(n.A,{sx:{...a&&{height:a*t}},children:(0,r.jsx)(s.A,{colSpan:5})}):null}var c=a(69780),p=a(83274),h=a(7251),u=a(53011),m=a(33507);const g={border:0,margin:-1,padding:0,width:"1px",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",clip:"rect(0 0 0 0)"};function x(e){let{order:t,headLabel:a,onSort:i}=e;const{user:l}=(0,m.A)();return(0,r.jsx)(c.A,{children:(0,r.jsx)(n.A,{children:a.map(e=>{var a,n;return"switch"===e.id?(1===(null===l||void 0===l||null===(a=l.roles[0])||void 0===a?void 0:a.id)||2===(null===l||void 0===l||null===(n=l.roles[0])||void 0===n?void 0:n.id))&&(0,r.jsx)(s.A,{align:e.align,padding:e.disablePadding?"none":"normal",sortDirection:t.id===e.id&&t.direction,sx:{background:e=>e.palette.background.paper,whiteSpace:"nowrap",fontWeight:"bold"},children:e.sort?(0,r.jsx)(p.A,{title:"Sort",placement:"right"===e.align?"bottom-end":"bottom-start",enterDelay:300,children:(0,r.jsxs)(h.A,{active:t.id===e.id,direction:t.direction,onClick:i(e.id),children:[e.label,t.id===e.id?(0,r.jsx)(u.A,{component:"span",sx:g,children:"desc"===t?"sorted descending":"sorted ascending"}):null]})}):(0,r.jsx)(r.Fragment,{children:e.label})},e.id):(0,r.jsx)(s.A,{align:e.align,padding:e.disablePadding?"none":"normal",sortDirection:t.id===e.id&&t.direction,sx:{background:e=>e.palette.background.paper,whiteSpace:"nowrap",fontWeight:"bold"},children:e.sort?(0,r.jsx)(p.A,{title:"Sort",placement:"right"===e.align?"bottom-end":"bottom-start",enterDelay:300,children:(0,r.jsxs)(h.A,{active:t.id===e.id,direction:t.direction,onClick:i(e.id),children:[e.label,t.id===e.id?(0,r.jsx)(u.A,{component:"span",sx:g,children:"desc"===t?"sorted descending":"sorted ascending"}):null]})}):(0,r.jsx)(r.Fragment,{children:e.label})},e.id)})})})}},38861(e,t,a){a.d(t,{Ay:()=>i,xl:()=>r});var n=a(9950);
1function i(e){const[t,a]=(0,n.useState)((null===e||void 0===e?void 0:e.defaultDense)||!1),[i,r]=(0,n.useState)((null===e||void 0===e?void 0:e.defaultOrderBy)||"name"),[l,o]=(0,n.useState)((null===e||void 0===e?void 0:e.defaultOrder)||"asc"),[s,d]=(0,n.useState)((null===e||void 0===e?void 0:e.defaultCurrentPage)||0),[c,p]=(0,n.useState)((null===e||void 0===e?void 0:e.defaultRowsPerPage)||5),[h,u]=(0,n.useState)((null===e||void 0===e?void 0:e.defaultSelected)||[]);return{dense:t,order:l,page:s,setPage:d,orderBy:i,rowsPerPage:c,selected:h,setSelected:u,onSelectRow:e=>{const t=h.indexOf(e);let a=[];-1===t?a=a.concat(h,e):0===t?a=a.concat(h.slice(1)):t===h.length-1?a=a.concat(h.slice(0,-1)):t>0&&(a=a.concat(h.slice(0,t),h.slice(t+1))),u(a)},onSelectAllRows:(e,t)=>{u(e?t:[])},onSort:e=>{""!==e&&(o(i===e&&"asc"===l?"desc":"asc"),r(e))},onChangePage:(e,t)=>{d(t)},onChangeDense:e=>{a(e.target.checked)},onChangeRowsPerPage:e=>{p(parseInt(e.target.value,10)),d(0)}}}function r(e,t,a){return e>0?Math.max(0,(1+e)*t-a):0}},26089(e,t,a){a.d(t,{A:()=>P});var n=a(9950),i=a(96583),r=a(83239),l=a(82053),o=a(1320),s=a(15769),d=a(34075),c=a(9213),p=a(21671),h=a(53011),u=a(48089),m=a(45180),g=a(50704),x=a(60899),v=a(18216),y=a(9449),b=a(27081),A=a(28095),k=a(46639),f=a(60666),j=a(59051),_=a.n(j),w=a(2235),S=a(26473),C=a(8115),R=a(77432),T=a(95468),D=a(47258),W=a(63477),M=a(44414);function P(e){let{open:t,onClose:a,taskData:j,onSuccess:P}=e;const[z,H]=(0,n.useState)([]),[N]=(0,n.useState)(!0),$=(0,b.wA)(),{isUpdate:O}=(0,D.b)(),F=f.Ik().shape({task_value:f.Yj().notRequired().test("len","Notes must be at least 3 characters and not more than 500",e=>!e||e.length>=3&&e.length<=500)}),E=(0,y.mN)({resolver:(0,S.t)(F),defaultValues:{title:"",kitchen:"",kitchen_id:"",task_id:"",assignedTo:"",dueDate:"",remarks:"",task_value:"",tasks_new_image:""}}),{reset:Y,handleSubmit:I,formState:{isSubmitting:V}}=E,B=(0,b.d4)(e=>{let{loading:t}=e;return t.loading3}),L=1===(null===j||void 0===j?void 0:j.is_photo_mandatory),[U,K]=(0,n.useState)("");(0,n.useEffect)(()=>{var e,t,a,n;if(j)if(Y({title:j.title||"",task_id:(null===j||void 0===j?void 0:j.id)||"",kitchen_name:(null===j||void 0===j||null===(e=j.kitchen)||void 0===e?void 0:e.kitchen_name)||"",kitchen_id:j.kitchen_id||"",assigned_to:"user"===j.assignee_type?`User : ${(null===(t=j.assigned_to)||void 0===t?void 0:t.name)||"N/A"}`:"kitchen"===j.assignee_type?`Kitchen : ${(null===(a=j.kitchen)||void 0===a?void 0:a.kitchen_name)||"N/A"}`:"N/A",due_date:null!==j&&void 0!==j&&j.due_date?_().utc(j.due_date).local().format("DD MMM YYYY, HH:mm"):"",remarks:j.remarks||"",task_value:j.task_value||"",tasks_new_image:null}),(null===j||void 0===j||null===(n=j.tasks_new_image)||void 0===n?void 0:n.length)>0){const e=j.tasks_new_image.map(e=>({url:e.thumbnail||e.url,file_name:e.file_name,name:e.file_name,type:"image/png"}));H(e)}else H([])},[j,Y]);const q=(0,n.useCallback)((e,t)=>{const a=z.map(e=>e.name),n=e.filter(e=>!a.includes(e.name)),i=z.length+n.length;i>3&&t.push({file:{name:"File limit exceeded"},errors:[{code:"too-many-files",message:"You cannot upload more than 3 files."}]}),e.forEach(e=>{a.includes(e.name)&&t.push({file:e,errors:[{code:"duplicate-file",message:"Duplicates are not allowed."}]})});const r=i>3?n.slice(0,3-z.length):n;H(e=>[...e,...r.map(e=>Object.assign(e,{preview:URL.createObjectURL(e)}))]),K("")},[z]);return(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(i.A,{open:t,fullWidth:!0,maxWidth:"sm",disableEscapeKeyDown:!0,"aria-labelledby":"form-dialog-title",classes:{paper:"rounded-8"},disableRestoreFocus:!0,children:(0,M.jsx)(y.Op,{...E,children:(0,M.jsxs)("form",{onSubmit:I(async e=>{const t=new FormData;t.append("kitchen_id",e.kitchen_id),t.append("task_id",e.task_id),t.append("task_value",e.task_value);const a=z.length>0;!L||a?(z.forEach(e=>{e.url&&e.file_name?t.append("existing_tasks_new_image[]",e.file_name):t.append("tasks_new_image[]",e)}),z.some(e=>e.url&&e.file_name)||t.append("existing_tasks_new_image[]",""),$((0,R.ce)(t)).then(e=>{var t;null!==e&&void 0!==e&&null!==(t=e.payload)&&void 0!==t&&t.status&&P()})):K("Please upload a live photo.")}),children:[(0,M.jsx)(r.A,{children:(0,M.jsx)(l.A,{variant:"h5",color:"primary",children:"Custom Task Execution"})}),(0,M.jsx)(o.A,{sx:{px:2},children:(0,M.jsxs)(w.A,{children:[(0,M.jsx)(s.A,{"aria-label":"simple table",size:"small",children:(0,M.jsxs)(d.A,{children:[(0,M.jsxs)(c.A,{children:[(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",color:"gray",children:"Title"})}),(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",children:E.getValues("title")})})]}),(0,M.jsxs)(c.A,{children:[(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",color:"gray",children:"Kitchen"})}),(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",children:E.getValues("kitchen_n
1ame")})})]}),(0,M.jsxs)(c.A,{children:[(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",color:"gray",children:"Assigned To"})}),(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",children:E.getValues("assigned_to")})})]}),(0,M.jsxs)(c.A,{children:[(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",color:"gray",children:"Due Date"})}),(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",children:E.getValues("due_date")})})]}),(0,M.jsxs)(c.A,{children:[(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",color:"gray",children:"Remarks"})}),(0,M.jsx)(p.A,{children:(0,M.jsx)(l.A,{variant:"subtitle2",children:E.getValues("remarks")})})]})]})}),(0,M.jsx)("br",{}),(0,M.jsx)(T.o3,{name:"task_value",label:"Task Value",size:"small",fullWidth:!0,multiline:!0,minRows:3,InputLabelProps:{shrink:!0}}),(0,M.jsx)(h.A,{style:{paddingTop:10},children:(0,M.jsxs)(u.A,{sx:{color:"gray"},children:[(0,M.jsx)(m.A,{title:"Upload Image"}),(0,M.jsxs)(g.A,{children:[(0,M.jsx)(C._O,{multiple:!0,thumbnail:N,files:z,maxSize:5e6,onDrop:q,onRemove:e=>{const t=z.filter(t=>t!==e);H(t)},onRemoveAll:()=>{H([])},helperText:(0,M.jsxs)(l.A,{variant:"caption",sx:{mt:2,mx:"auto",display:"block",textAlign:"center",color:"text.secondary"},children:["Max size of ",(0,W.tm)(5e6)]})}),U&&(0,M.jsx)(l.A,{variant:"caption",color:"error",sx:{mt:1,ml:2},children:U})]})]})}),(0,M.jsx)("br",{}),(0,M.jsxs)(x.Ay,{container:!0,sx:{mt:1,mb:2},justifyContent:"space-between",alignItems:"baseline",children:[(0,M.jsx)(x.Ay,{item:!0,children:(0,M.jsx)(A.A,{sx:{mt:1,mb:.5,px:4,minWidth:130,whiteSpace:"nowrap",backgroundColor:"primary.main"},variant:"contained",type:"submit",disabled:B,color:"primary",loading:V,children:B?(0,M.jsx)(k.A,{size:24,color:"inherit"}):O?"Update":"Finish Task"})}),(0,M.jsx)(x.Ay,{item:!0,children:(0,M.jsx)(v.A,{sx:{mt:1,mb:.5,px:5,minWidth:130,whiteSpace:"nowrap",backgroundColor:"warning.main"},variant:"contained",color:"warning",onClick:()=>a(),children:"Cancel"})})]})]})})]})})})})}},56354(e,t,a){a.d(t,{g:()=>n});const n=e=>{if(!e)return"-";const t=e.cron_repeat_help?e:e.parent_task||{},{cron_repeat_help:a,cron_repeat_every:n,cron_interval:i,cron_days:r=[]}=t;if(!a)return"";if("weekly"===a)return"Weekly"+(r.length>0?` (${r.join(", ")})`:"");if("weekdays"===a)return"Weekdays"+(r.length>0?` (${r.join(", ")})`:"");if("custom"===a){let e="";return"days"===i?e="1"===n?"Daily":`Every ${n} days`:"weeks"===i?(e="1"===n?"Weekly":`Every ${n} weeks`,r.length&&(e+=` (${r.join(", ")})`)):"months"===i?e="1"===n?"Monthly":`Every ${n} months`:"years"===i&&(e="1"===n?"Yearly":`Every ${n} years`),e}return"daily"===a?"Daily":"monthly"===a?"Monthly":"yearly"===a?"Yearly":""}},45180(e,t,a){a.d(t,{A:()=>k});var n=a(98587),i=a(58168),r=a(9950),l=a(72004),o=a(88465),s=a(82053),d=a(18463),c=a(59254),p=a(1763),h=a(423);function u(e){return(0,h.Ay)("MuiCardHeader",e)}const m=(0,p.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]);var g=a(44414);const x=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],v=(0,c.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,i.A)({[`& .${m.title}`]:t.title,[`& .${m.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),y=(0,c.Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),b=(0,c.Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),A=(0,c.Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),k=r.forwardRef(function(e,t){const a=(0,d.b)({props:e,name:"MuiCardHeader"}),{action:r,avatar:c,className:p,component:h="div",disableTypography:m=!1,subheader:k,subheaderTypographyProps:f,title:j,titleTypographyProps:_}=a,w=(0,n.A)(a,x),S=(0,i.A)({},a,{component:h,disableTypography:m}),C=(e=>{const{classes:t}=e;return(0,o.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},u,t)})(S);let R=j;null==R||R.type===s.A||m||(R=(0,g.jsx)(s.A,(0,i.A)({variant:c?"body2":"h5",className:C.title,component:"span",display:"block"},_,{children:R})));let T=k;return null==T||T.type===s.A||m||(T=(0,g.jsx)(s.A,(0,i.A)({variant:c?"body2":"body1",className:C.subheader,color:"text.secondary",component:"span",display:"block"},f,{children:T}))),(0,g.jsxs)(v,(0,i.A)({className:(0,l.A)(C.root,p),as:h,ref:t,ownerState:S},w,{children:[c&&(0,g.jsx)(y,{className:C.avatar,ownerState:S,children:c}),(0,g.jsxs)(A,{className:C.content,ownerState:S,children:[R,T]}),r&&(0,g.jsx)(b,{className:C.action,ownerState:S,children:r})]}))})}}]);

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.