1"use strict";(self.webpackChunkgroovio=self.webpackChunkgroovio||[]).push([[1669],{"0j0n":(e,t,n)=>{n.d(t,{A:()=>w});var o=n("nKUr"),r=n("q1tI"),s=n("y2R7"),i=n("tYjL"),a=n("V4z/"),l=n("g02y"),u=n("vvQw"),c=n("CbZc"),d=n("8VpX"),f=n("FqUe"),p=n("PSD3"),v=n.n(p),h=n("vj2F"),b=n("dlyO"),m=n("U8Cb"),x=n("kKzx"),y=n("/hAV"),_=n("WBKt"),j=function(e,t,n,o){return new(n||(n=Promise))(function(r,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,a)}l((o=o.apply(e,t||[])).next())})},N=function(e,t){var n,o,r,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,o&&(r=2&a[0]?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],o=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},g={width:"100%","& .MuiOutlinedInput-root":{borderRadius:"8px",backgroundColor:"#ffffff",transition:"all 0.3s ease","& fieldset":{borderColor:"var(--violet)",borderWidth:"2px"},"&:hover":{"& fieldset":{borderColor:"var(--violet-deep)",borderWidth:"2px"}},"&.Mui-focused":{boxShadow:"0 0 0 3px var(--violet-tint-strong)","& fieldset":{borderColor:"var(--violet)",borderWidth:"2px"}}},"& .MuiInputBase-input":{padding:"12px 8px",fontSize:"14px","&::placeholder":{color:"#6c757d",opacity:1}}};const w=function(){var e=(0,u.wA)(),t=(0,a.Zp)(),n=(0,u.d4)(function(e){return e.GetStudioProfileState}).studio_profile_data,p=(0,u.d4)(function(e){return e.PersonalNoteListState}),w=(0,u.d4)(function(e){return e.PersonalNoteAddState}),S=(0,u.d4)(function(e){return e.PersonalNoteDeleteState}),k=(0,r.useState)([]),C=k[0],A=k[1],E=(0,r.useState)(0),I=E[0],P=E[1],O=(0,r.useState)(0),U=O[0],F=O[1],M=(0,r.useState)(!0),Z=M[0],z=M[1],D=(0,r.useState)(""),R=D[0],B=D[1],G=(0,r.useState)(""),Y=G[0],Q=G[1],T=(0,m.o_)(Y,300);(0,r.useEffect)(function(){e({type:h.pbl,personal_note_update:null}),e({type:h.t5s,personal_note_add:null}),e({type:h.uFW,personal_note_data:null}),e({type:h.FQz,personal_note_delete:null})},[e]);var V=function(){return j(void 0,void 0,void 0,function(){var t;return N(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=(0,c.R7)(10,U+1,T.trim()),[4,e((0,f.pF)(t))];case 1:return n.sent(),[3,3];case 2:return n.sent(),[3,3];case 3:return z(!1),[2]}})})};(0,r.useEffect)(function(){F(0)},[T]),(0,r.useEffect)(function(){V()},[U,T]),(0,r.useEffect)(function(){var e,t,n,o=null===(e=null==p?void 0:p.personal_note_list)||void 0===e?void 0:e.data,r=null!==(t=null==o?void 0:o.results)&&void 0!==t?t:[];A(r),P(null!==(n=null==o?void 0:o.count)&&void 0!==n?n:0),U>0&&0===r.length&&F(function(e){return Math.max(0,e-1)})},[p]),(0,r.useEffect)(function(){!0===(null==w?void 0:w.status)&&(B(""),0===U?V():F(0),e({type:h.t5s,personal_note_add:null}))},[w]),(0,r.useEffect)(function(){!0===(null==S?void 0:S.status)&&(V(),e({type:h.FQz,personal_note_delete:null}))},[S]);var q=Math.max(1,Math.ceil(I/10)),K=0===I?0:10*U+1,L=Math.min(I,10*(U+1));return(0,o.jsxs)("div",{className:"main-right w-100",children:[(null==w?void 0:w.loading)?(0,o.jsx)(i.A,{}):"",(0,o.jsx)("div",{className:"right-side-main",children:(0,o.jsxs)("div",{className:"studio-notes",children:[(0,o.jsx)("p",{className:"studio-notes__subtitle",children:"Internal notes visible to staff only"}),(0,o.jsxs)("div",{className:"studio-notes__composer",children:[(0,o.jsx)("textarea",{className:"studio-notes__input",placeholder:"Type a note...",value:R,onChange:function(e){return B(e.target.value)},rows:1}),(0,o.jsx)("button",{type:"button",className:"btn-secondry studio-notes__add",onClick:function(){var n=R.trim();
1n?e((0,f.G1)({notes:(0,d.N)(n)})):t(l.OZ+"/studio-notes/create")},children:"+ Add Note"})]}),(0,o.jsx)("div",{className:"d-flex justify-content-end mb-3",children:(0,o.jsx)("button",{type:"button",className:"btn btn-link btn-sm p-0",onClick:function(){return t(l.OZ+"/studio-notes/create")},children:"Open full editor"})}),(0,o.jsx)("div",{className:"mb-3",children:(0,o.jsx)(y.A,{value:Y,onChange:function(e){return Q(e.target.value)},placeholder:"Search notes...",variant:"outlined",size:"medium",InputProps:{startAdornment:(0,o.jsx)(_.A,{position:"start",children:(0,o.jsx)(x.A,{sx:{color:"#6c757d"}})})},sx:g})}),Z?(0,o.jsx)(s.A,{}):0===C.length?(0,o.jsx)("p",{className:"studio-notes__empty",children:T.trim()?"No notes match your search.":"No notes yet. Add your first note above."}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"studio-notes__list",children:C.map(function(r){var s;return(0,o.jsxs)("div",{className:"detail-card studio-notes__card",children:[(0,o.jsx)("div",{className:"studio-notes__body editor-data-arrange",dangerouslySetInnerHTML:{__html:b.default.sanitize((null==r?void 0:r.notes)||"")}}),(0,o.jsxs)("div",{className:"studio-notes__meta",children:[(0,o.jsx)("span",{className:"studio-notes__date",children:(null==r?void 0:r.created_date)?(0,c.SH)(null==r?void 0:r.created_date,null===(s=null==n?void 0:n.data)||void 0===s?void 0:s.currency):"-"}),(0,o.jsxs)("div",{className:"studio-notes__actions",children:[(0,o.jsx)("button",{type:"button",className:"studio-notes__action",onClick:function(){return t(l.OZ+"/studio-notes/update/"+(0,c.AU)(null==r?void 0:r.id))},children:"Edit"}),(0,o.jsx)("button",{type:"button",className:"studio-notes__action studio-notes__action--danger",onClick:function(){return t=null==r?void 0:r.id,void v().fire({title:"Are you sure?",text:"You won't be able to revert this!",icon:"warning",showCancelButton:!0,confirmButtonColor:"rgb(26, 26, 58)",cancelButtonColor:"#d33",confirmButtonText:"Yes, Confirm"}).then(function(n){n.isConfirmed&&e((0,f.Se)(t))});var t},children:"Delete"})]})]})]},null==r?void 0:r.id)})}),I>10&&(0,o.jsxs)("div",{className:"studio-notes__pager",children:[(0,o.jsx)("button",{type:"button",className:"studio-notes__page-btn",disabled:0===U,onClick:function(){return F(function(e){return Math.max(0,e-1)})},children:"Prev"}),(0,o.jsxs)("span",{className:"studio-notes__range",children:[K,"â",L," of ",I]}),(0,o.jsx)("button",{type:"button",className:"studio-notes__page-btn",disabled:U+1>=q,onClick:function(){return F(function(e){return e+1<q?e+1:e})},children:"Next"})]})]})]})})]})}},"2H4D":(e,t,n)=>{n.d(t,{A:()=>y});var o=n("nKUr"),r=n("q1tI"),s=n("vvQw"),i=n("js9I"),a=n("gSgn"),l=n("GE9s"),u=n("8Aud"),c=n("DcvE"),d=n("tYjL"),f=n("TBRL"),p=n("V4z/"),v=n("SOjZ"),h=n("FqUe"),b=n("CbZc"),m=function(e,t,n,o){return new(n||(n=Promise))(function(r,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,a)}l((o=o.apply(e,t||[])).next())})},x=function(e,t){var n,o,r,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,o&&(r=2&a[0]?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],o=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};const y=function(){var e=(0,p.g)(),t=e.type,n=e.id,y=(0,p.Zp)(),_=(0,s.wA)(),j=(0,s.d4)(function(e){return e.PersonalNoteGet
1State}),N=(0,s.d4)(function(e){return e.PersonalNoteAddState}),g=(0,s.d4)(function(e){return e.PersonalNoteUpdateState}),w=(0,r.useState)(""),S=w[0],k=w[1],C=i.Ik().shape({notes:i.Yj().nullable().required((null===c.c8||void 0===c.c8?void 0:c.c8.ANY_REQUIRED)+"studio note").trim((null===c.c8||void 0===c.c8?void 0:c.c8.ANY_REQUIRED)+"studio note")}),A=(0,l.mN)({resolver:(0,a.t)(C)}),E=A.reset,I=A.formState.errors,P=A.handleSubmit,O=A.setValue;return(0,r.useEffect)(function(){"update"===t&&_((0,h.dx)((0,b.kI)(n)))},[_,t,n]),(0,r.useEffect)(function(){var e;if((null==j?void 0:j.status)&&"update"===t){var n=null===(e=null==j?void 0:j.personal_note_data)||void 0===e?void 0:e.notes;O("notes",n),k(n)}},[j,t,O]),(0,r.useEffect)(function(){O("notes",S)},[S,O]),(0,r.useEffect)(function(){!0===(null==N?void 0:N.status)&&(y("create"===t?"/studio-notes":-1),E())},[N,t,y,E]),(0,r.useEffect)(function(){!0===(null==g?void 0:g.status)&&(y("update"===t?"/studio-notes":-1),E())},[g,y,E,t]),(0,o.jsxs)(o.Fragment,{children:[(null==j?void 0:j.loading)||(null==g?void 0:g.loading)||(null==N?void 0:N.loading)?(0,o.jsx)(d.A,{}):"",(0,o.jsxs)("div",{className:"main-right w-100 h-100 bg-gray",children:[(0,o.jsx)("div",{className:"tab-ul schedule-top",children:(0,o.jsxs)("div",{className:"d-flex align-items-center",children:[(0,o.jsx)(v.N_,{className:"back-bg",to:"/studio-notes",children:(0,o.jsx)("span",{className:"icon-arrow"})}),(0,o.jsxs)("h5",{children:["update"===t?"Update":"Create New"," Studio Note"]})]})}),(0,o.jsx)("div",{className:"right-side-main",children:(0,o.jsx)("div",{className:"row form-input-box",children:(0,o.jsx)("div",{className:"col-md-7",children:(0,o.jsxs)("form",{onSubmit:P(function(e){return m(void 0,void 0,void 0,function(){return x(this,function(o){switch(o.label){case 0:return"create"!==t?[3,2]:[4,_((0,h.G1)(e))];case 1:return o.sent(),[3,4];case 2:return[4,_((0,h.mZ)((0,b.kI)(n),e))];case 3:o.sent(),o.label=4;case 4:return[2]}})})}),children:[(0,o.jsxs)("div",{className:"mb-3",children:[(0,o.jsx)(f.A,{defaultValue:(null==S?void 0:S.length)?S:"",setData:k}),(0,o.jsx)(u.K,{errors:I,name:"notes",render:function(e){var t=e.message;return(0,o.jsx)("p",{style:{color:"red"},children:t})}})]}),(0,o.jsx)("div",{className:"col-md-12",children:(0,o.jsx)("div",{children:(0,o.jsx)("button",{type:"submit",className:"btn-secondry",children:"update"===t?"Save & update studio note":"Save & create studio note"})})})]})})})})]})]})}}}]);
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.