PageSourceSearch

https://app.salesroute.ai/static/js/6263.7fda31a1.chunk.js

js salesroute.ai collected 2026-10-05 13:58:30 UTC 10,329 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksalesrouteadmin=self.webpackChunksalesrouteadmin||[]).push([[6263],{84246:(e,t,a)=>{a.d(t,{A:()=>o});a(65043);var n=a(74117),l=a(70579);const o=e=>{let{text:t="Edit",color:a,backgroundColor:o,padding:i,onClick:s,animate:c=!1,...r}=e;const{t:d}=(0,n.Bd)();return(0,l.jsx)("div",{onClick:s,...r,className:`edit-button common-text ftw-4 ${i?"padding-cus":""} ${c?"edit-button-animate":""}`,style:{color:a||"#FFF",backgroundColor:o||"#094C80",cursor:"pointer"},children:d(t)})}},56597:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(65043),l=(a(98455),a(74117)),o=a(71087),i=a(70579);const s=e=>{let{label:t,defaultValue:a="",onChange:s,type:c="text",validators:r=[],name:d,disablePastDates:u,textTransform:h="none",disableFutureDates:p,border:m="",startDate:v,isRequired:x=!1,important:f=!1,readOnly:C=!1,error:b,numbersOnly:g=!1,labelClassName:y="",maxLength:j=null,redirection:w="disabled",onRedirectionClick:A,autoComplete:_="off",...k}=e;const[N,V]=(0,n.useState)(null!==a&&void 0!==a?a:""),[O,D]=(0,n.useState)([]),$=(0,n.useRef)(null),{t:E}=(0,l.Bd)();(0,n.useEffect)((()=>{V(null!==a&&void 0!==a?a:"")}),[a]);const S=Array.isArray(r)?r:r?[r]:[],H=x?[...S,e=>null!==e&&void 0!==e&&""!==e||"This field is required"]:S,B=(0,o.q9)(),L=(0,o.EA)(),M=b?[b]:O,q="date"===c||"datetime-local"===c;return(0,i.jsxs)("div",{className:"large-input-box-container posrel",children:[(0,i.jsx)("input",{className:`input-box common-text ftw-4 ${q?"hide-native-icon":""} ${"enabled"===w?"input-box-with-redirection":""} ${M.length>0?"input-error":""} ${m}`,type:c,value:!C||""!==N&&null!==N&&void 0!==N?null!==N&&void 0!==N?N:"":"-",onChange:e=>{let t=e.target.value;if(null!==j&&void 0!==j&&Number(j)>0&&t.length>Number(j)&&(t=t.slice(0,Number(j))),"lowercase"===h?t=t.toLowerCase():"uppercase"===h&&(t=t.toUpperCase()),g&&"date"!==c&&"datetime-local"!==c){t=t.replace(/[^0-9.]/g,"");const e=t.split(".");e.length>2&&(t=e[0]+"."+e.slice(1).join(""))}const a=(e=>{const t=H.map((t=>{if("function"===typeof t){const a=v?t(e,v):t(e);return!0===a?null:a}return null})).filter((e=>"string"===typeof e));return t})(t);V(t),D(a),s&&s({...e,target:{...e.target,value:t}})},onKeyDown:e=>{if(g){const t=["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"];if(e.ctrlKey||e.metaKey||t.includes(e.key))return;if(!/^[0-9.]$/.test(e.key))return void e.preventDefault();"."===e.key&&N.includes(".")&&e.preventDefault()}},placeholder:"",ref:q?$:null,name:d,readOnly:C,min:v||(u?"datetime-local"===c?L:B:void 0),max:(()=>{if(p)return"datetime-local"===c?L:B})(),inputMode:g?"numeric":void 0,maxLength:j,autoComplete:_}),(0,i.jsxs)("label",{className:`input-date-label input-label common-text ftw-4 ${y} ${N||C&&(""===N||null===N||void 0===N)?"has-value":""} `,children:[E(t),f&&(0,i.jsx)("span",{className:"required-asterisk",children:"*"})]}),q&&(0,i.jsx)("div",{className:"calendar-icon",onClick:()=>{$.current&&$.current.showPicker()},children:(0,i.jsxs)("svg",{className:"calendor-icon-svg",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,i.jsx)("path",{opacity:"0.5",d:"M20 8H0V17C0 17.7956 0.316071 18.5587 0.87868 19.1213C1.44129 19.6839 2.20435 20 3 20H17C17.7956 20 18.5587 19.6839 19.1213 19.1213C19.6839 18.5587 20 17.7956 20 17V8ZM5 6C4.73478 6 4.48043 5.89464 4.29289 5.70711C4.10536 5.51957 4 5.26522 4 5V1C4 0.734784 4.10536 0.48043 4.29289 0.292893C4.48043 0.105357 4.73478 0 5 0C5.26522 0 5.51957 0.105357 5.70711 0.292893C5.89464 0.48043 6 0.734784 6 1V5C6 5.26522 5.89464 5.51957 5.70711 5.70711C5.51957 5.89464 5.26522 6 5 6ZM15 6C14.7348 6 14.4804 5.89464 14.2929 5.70711C14.1054 5.51957 14 5.26522 14 5V1C14 0.734784 14.1054 0.48043 14.2929 0.292893C14.4804 0.105357 14.7348 0 15 0C15.2652 0 15.5196 0.105357 15.7071 0.292893C15.8946 0.48043 16 0.734784 16 1V5C16 5.26522 15.8946 5.51957 15.7071 5.70711C15.5196 5.89464 15.2652 6 15 6Z",fill:"#6D6D6D"}),(0,i.jsx)("path",{d:"M17 2H16V5C16 5.26522 15.8946 5.51957 15.7071 5.70711C15.5196 5.89464 15.2652 6 15 6C14.7348 6 14.4804 5.89464 14.2929 5.70711C14.1054 5.51957 14 5.26522 14 5V2H6V5C6 5.26522 5.89464 5.51957 5.70711 5.70711C5.51957 5.89464 5.26522 6 5 6C4.73478 6 4.48043 5.89464 4.29289 5.70711C4.10536 5.51957 4 5.26522 4 5V2H3C2.20435 2 1.44129 2.31607 0.87868 2.87868C0.316071 3.44129 0 4.20435 0 5V8H20V5C20 4.20435 19.6839 3.44129 19.1213 2.87868C18.5587 2.31607 17.7956 2 17 2Z",fill:"#454545"})]})}),"enabled"===w&&(0,i.jsx)("div",{className:"redirection-icon",onClick:A,...k,children:(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,i.jsx)("path",{d:"M7 7H17V17",stroke:"#1A73E8","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,i.jsx)("path",{d:"M7 17L17 7",stroke:"#1A73E8","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]})})]})}},48741:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(65043),l=(a(51326),a(74117)),o=a(70579);const i=e=>
1{let{label:t,defaultValue:a="",onChange:i,readOnly:s,validators:c=[],isRequired:r=!1,error:d,border:u="",rows:h=3,important:p,maxLength:m=200}=e;const[v,x]=(0,n.useState)(a),[f,C]=(0,n.useState)([]),{t:b}=(0,l.Bd)();(0,n.useEffect)((()=>{x(a)}),[a]);const g=Array.isArray(c)?c:c?[c]:[],y=r?[..."function"===typeof g?[g]:g,e=>null!==e&&void 0!==e&&""!==e||"This field is required"]:g,j=d?[d]:f;return(0,o.jsxs)("div",{className:"text-box-container common-text ftw-4",children:[(0,o.jsx)("textarea",{className:`text-box common-text ftw-4 ${j.length>0?"input-error":""} ${u}`,value:!s||""!==v&&null!==v&&void 0!==v?v:"-",onChange:e=>{const t=e.target.value;if(t.length>m)return;const a=(e=>{const t=y.map((t=>{if("function"===typeof t){const a=t(e);return!0===a?null:a}return null})).filter((e=>"string"===typeof e));return t})(t);x(t),C(a),i&&i(e)},placeholder:" ",rows:h,readOnly:s,maxLength:m}),s?(0,o.jsx)("label",{className:"text-label common-text ftw-4 has-value ",children:b(t)}):(0,o.jsxs)("label",{className:"text-label common-text ftw-4 "+(v?"has-value":""),children:[b(t),p&&(0,o.jsx)("span",{className:"required-asterisk",children:"*"})]})]})}},6263:(e,t,a)=>{a.r(t),a.d(t,{default:()=>y});var n=a(65043),l=a(74117),o=a(73216),i=a(68417),s=a(19165),c=a(50374),r=a(9950),d=a(64002),u=a(37355),h=a(51291),p=a(56597),m=a(48741),v=a(23971),x=(a(40920),a(46838)),f=a(84246),C=a(15940),b=a(11744),g=a(70579);const y=()=>{const{t:e}=(0,l.Bd)(),t=(0,o.Zp)(),{id:a}=(0,o.g)(),[y,j]=(0,n.useState)(!1),[w,A]=(0,b.v)(),[_,k]=(0,n.useState)(!1),[N,V]=(0,n.useState)(null),[O,D]=(0,n.useState)({code:"",account_name:"",account:"",income_expense_type:"",description:"",is_sub_account:!1,parent_account:""}),$=(0,n.useCallback)((async e=>{A(!0);try{const a=await(0,i.PK)(e);if(null!==a&&void 0!==a&&a.data){var t;const e=a.data;D({code:e.code||"",account_name:e.account_name||"",account:(null===(t=e.account)||void 0===t?void 0:t.name)||"",income_expense_type:e.income_expense_type||"",description:e.description||"",is_sub_account:e.is_sub_account||!1,parent_account:e.parent_account?`${e.parent_account.code} - ${e.parent_account.account_name}`:"",id:e.id||""}),V(e)}}catch{}finally{A(!1)}}),[A]);(0,n.useEffect)((()=>{a&&$(a)}),[a,$]);const E=(0,n.useCallback)((()=>{t("/accounts/configuration/chart-of-account")}),[t]),S=(0,n.useCallback)((()=>{j(!0),setTimeout((()=>j(!1)),800),t(`/accounts/configuration/chart-of-account/edit/${a}`)}),[t,a]),H=()=>{k(!0)},B=()=>{k(!1)};return(0,g.jsxs)("div",{className:"whole-container",children:[(0,g.jsx)("div",{className:"path-header",children:(0,g.jsx)(u.A,{breadcrumbs:[{label:"Accounts"},{label:"Configurations"},{label:"Chart of Accounts",path:"/accounts/configuration/chart-of-account"},{label:"Details"}]})}),(0,g.jsxs)("div",{className:"page-actions-bar",children:[(0,g.jsxs)("div",{className:"name-utility",children:[(0,g.jsx)("div",{className:"title-heading",children:e("Chart Of Account Details")}),(0,g.jsx)(C.A,{children:(0,g.jsx)(x.A,{"data-tooltip-id":"global-tooltip","data-tooltip-content":e("Actions"),onArchive:H,isArchived:(null===N||void 0===N?void 0:N.is_archived)||!1})}),(0,g.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2",height:"17",viewBox:"0 0 2 17",fill:"none",children:(0,g.jsx)("path",{d:"M1 0V17",stroke:"#CDCDCD"})}),(0,g.jsx)(v.A,{"data-tooltip-id":"global-tooltip","data-tooltip-content":e("Activity Log"),objectId:O.id,modelName:"OrganizationChartOfAccounts",name:"Chart Of Account"})]}),(0,g.jsxs)("div",{className:"page-name-rightside-icons",children:[(0,g.jsx)(f.A,{"data-tooltip-id":"global-tooltip","data-tooltip-content":e("Edit"),onClick:S,animate:y}),(0,g.jsx)(h.A,{"data-tooltip-id":"global-tooltip","data-tooltip-content":e("Close"),onClick:E})]})]}),(0,g.jsx)(c.A,{isArchived:(null===N||void 0===N?void 0:N.is_archived)||!1,documentName:e("chart of account"),onRestore:H}),(0,g.jsx)("div",{className:"penalty-section",children:(0,g.jsxs)("div",{className:"penalty-fields-card chart-fields-card box-pad",children:[(0,g.jsx)(p.A,{label:"Code",defaultValue:O.code,readOnly:!0}),(0,g.jsx)(p.A,{label:"Account Name",defaultValue:O.account_name,readOnly:!0}),(0,g.jsx)(p.A,{label:"Account Type",defaultValue:O.account,readOnly:!0}),O.income_expense_type&&(0,g.jsx)(p.A,{label:"Income / Expense Type",defaultValue:O.income_expense_type,readOnly:!0}),(0,g.jsx)(p.A,{label:"Is Sub Account",defaultValue:O.is_sub_account?"Yes":"No",readOnly:!0}),O.is_sub_account&&(0,g.jsx)(p.A,{label:"Parent Account",defaultValue:O.parent_account,readOnly:!0}),(0,g.jsx)(m.A,{label:"Description",defaultValue:O.description,readOnly:!0})]})}),(0,g.jsx)(C.A,{children:(0,g.jsx)(s.A,{isOpen:_,archivename:(null===O||void 0===O?void 0:O.account_name)||"",onSave:async()=>
1{if(null!==O&&void 0!==O&&O.id){A(!0);try{const t=await(0,i.fH)(O.id,null);null!==t&&void 0!==t&&t.data&&(B(),await $(a),(0,r.b)(null!==N&&void 0!==N&&N.is_archived?e("Chart Of Account unarchived successfully!"):e("Chart Of Account archived successfully!"),"success"))}catch(l){var t,n;(0,d.showAlert)((null===(t=l.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.message)||e("Something went wrong"))}finally{A(!1)}}},onClose:B,isArchived:(null===N||void 0===N?void 0:N.is_archived)||!1})})]})}},40920:()=>{}}]);
2//# sourceMappingURL=6263.7fda31a1.chunk.js.map

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.