changes 1

This commit is contained in:
2026-10-29 15:24:44 +03:30
parent 6a52b845fc
commit 400fecf271
48 changed files with 869 additions and 360 deletions
@@ -1 +1 @@
import{A as e,ct as t,et as n,g as r,l as i}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{a}from"./http-CTjL79ty.js";import{B as o}from"./index-DWlOII4H.js";import{t as s}from"./BaseSwitch-Dz4ODUhf.js";function c(e=480){return new Promise(t=>{window.setTimeout(t,e)})}function l(e){let t=n(null),r=n(null),i=a();async function o(n,a){if(t.value)return a;let o=!a;if(!o&&e.confirmOff&&!await e.confirmOff())return a;t.value=n,r.value=null;let s=a;try{return await e.onPersist(o),i.success(e.successMessage?.(o)??(o?`وضعیت فعال شد.`:`وضعیت غیرفعال شد.`)),o}catch{return r.value=n,i.error(e.errorMessage??`به‌روزرسانی وضعیت انجام نشد.`),s}finally{t.value=null}}function s(e){return t.value===e}function c(e){return r.value===e}return{toggle:o,isLoading:s,hasError:c}}var u=r({__name:`ActiveSwitchCell`,props:{id:{},modelValue:{type:Boolean},entityName:{},entityType:{},persist:{type:Function}},emits:[`update:modelValue`],setup(n,{emit:r}){let a=n,u=r,{toggle:d,isLoading:f,hasError:p}=l({onPersist:async e=>{a.persist?await a.persist(a.id,e):await c()},successMessage:e=>e?`${a.entityType??`مورد`} «${a.entityName}» فعال شد.`:`${a.entityType??`مورد`} «${a.entityName}» غیرفعال شد.`});async function m(e){if(e===a.modelValue)return;let t=a.entityType??`مورد`;if(!await o({title:e?`فعال‌سازی ${t}`:`غیرفعال‌سازی ${t}`,message:e?`آیا از فعال کردن «${a.entityName}» مطمئن هستید؟`:`آیا از غیرفعال کردن «${a.entityName}» مطمئن هستید؟`,tone:e?`primary`:`danger`,confirmLabel:e?`فعال کردن`:`غیرفعال کردن`,cancelLabel:`انصراف`}))return;let n=await d(a.id,a.modelValue);u(`update:modelValue`,n)}return(r,a)=>(e(),i(s,{"model-value":n.modelValue,loading:t(f)(n.id),error:t(p)(n.id),"onUpdate:modelValue":m},null,8,[`model-value`,`loading`,`error`]))}});export{u as t};
import{A as e,ct as t,et as n,g as r,l as i}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{a}from"./http-CTjL79ty.js";import{B as o}from"./index-BWgYBNME.js";import{t as s}from"./BaseSwitch-Dz4ODUhf.js";function c(e=480){return new Promise(t=>{window.setTimeout(t,e)})}function l(e){let t=n(null),r=n(null),i=a();async function o(n,a){if(t.value)return a;let o=!a;if(!o&&e.confirmOff&&!await e.confirmOff())return a;t.value=n,r.value=null;let s=a;try{return await e.onPersist(o),i.success(e.successMessage?.(o)??(o?`وضعیت فعال شد.`:`وضعیت غیرفعال شد.`)),o}catch{return r.value=n,i.error(e.errorMessage??`به‌روزرسانی وضعیت انجام نشد.`),s}finally{t.value=null}}function s(e){return t.value===e}function c(e){return r.value===e}return{toggle:o,isLoading:s,hasError:c}}var u=r({__name:`ActiveSwitchCell`,props:{id:{},modelValue:{type:Boolean},entityName:{},entityType:{},persist:{type:Function}},emits:[`update:modelValue`],setup(n,{emit:r}){let a=n,u=r,{toggle:d,isLoading:f,hasError:p}=l({onPersist:async e=>{a.persist?await a.persist(a.id,e):await c()},successMessage:e=>e?`${a.entityType??`مورد`} «${a.entityName}» فعال شد.`:`${a.entityType??`مورد`} «${a.entityName}» غیرفعال شد.`});async function m(e){if(e===a.modelValue)return;let t=a.entityType??`مورد`;if(!await o({title:e?`فعال‌سازی ${t}`:`غیرفعال‌سازی ${t}`,message:e?`آیا از فعال کردن «${a.entityName}» مطمئن هستید؟`:`آیا از غیرفعال کردن «${a.entityName}» مطمئن هستید؟`,tone:e?`primary`:`danger`,confirmLabel:e?`فعال کردن`:`غیرفعال کردن`,cancelLabel:`انصراف`}))return;let n=await d(a.id,a.modelValue);u(`update:modelValue`,n)}return(r,a)=>(e(),i(s,{"model-value":n.modelValue,loading:t(f)(n.id),error:t(p)(n.id),"onUpdate:modelValue":m},null,8,[`model-value`,`loading`,`error`]))}});export{u as t};
@@ -1 +1 @@
import{A as e,Ot as t,d as n,g as r,s as i,t as a}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{c as o,r as s}from"./index-DWlOII4H.js";var c=[`id`,`value`,`placeholder`,`disabled`],l=a(r({__name:`AdminCurrencyInput`,props:{modelValue:{default:null},placeholder:{default:``},disabled:{type:Boolean,default:!1},id:{},inputClass:{default:`admin-input`},allowEmpty:{type:Boolean,default:!0}},emits:[`update:modelValue`],setup(r,{emit:a}){let l=r,u=a,d=i(()=>l.modelValue==null||!Number.isFinite(l.modelValue)?``:o(l.modelValue));function f(e){let t=e.target,n=s(t.value);if(!n){u(`update:modelValue`,l.allowEmpty?null:0),t.value=``;return}let r=Number(n);u(`update:modelValue`,r),t.value=o(r)}return(i,a)=>(e(),n(`input`,{id:r.id,type:`text`,inputmode:`numeric`,dir:`ltr`,class:t([`admin-currency-input`,r.inputClass]),value:d.value,placeholder:r.placeholder,disabled:r.disabled,onInput:f},null,42,c))}}),[[`__scopeId`,`data-v-56435fc8`]]);export{l as t};
import{A as e,Ot as t,d as n,g as r,s as i,t as a}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{c as o,r as s}from"./index-BWgYBNME.js";var c=[`id`,`value`,`placeholder`,`disabled`],l=a(r({__name:`AdminCurrencyInput`,props:{modelValue:{default:null},placeholder:{default:``},disabled:{type:Boolean,default:!1},id:{},inputClass:{default:`admin-input`},allowEmpty:{type:Boolean,default:!0}},emits:[`update:modelValue`],setup(r,{emit:a}){let l=r,u=a,d=i(()=>l.modelValue==null||!Number.isFinite(l.modelValue)?``:o(l.modelValue));function f(e){let t=e.target,n=s(t.value);if(!n){u(`update:modelValue`,l.allowEmpty?null:0),t.value=``;return}let r=Number(n);u(`update:modelValue`,r),t.value=o(r)}return(i,a)=>(e(),n(`input`,{id:r.id,type:`text`,inputmode:`numeric`,dir:`ltr`,class:t([`admin-currency-input`,r.inputClass]),value:d.value,placeholder:r.placeholder,disabled:r.disabled,onInput:f},null,42,c))}}),[[`__scopeId`,`data-v-56435fc8`]]);export{l as t};
@@ -1 +1 @@
import{A as e,At as t,N as n,O as r,Ot as i,P as a,V as o,W as s,a as c,c as l,d as u,et as d,g as f,h as p,jt as m,l as h,r as g,s as _,t as v,u as y,w as b}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{d as x,m as S,p as C}from"./http-CTjL79ty.js";import{L as w,M as T}from"./index-DWlOII4H.js";import{n as E,r as D,t as O}from"./selectOptionSearch-BUIO0UgP.js";var k=[`id`],A=[`aria-label`,`aria-expanded`],j={class:`admin-select__trigger-content`},ee={class:`admin-select__value`},te={class:`admin-select__chevron`,"aria-hidden":`true`},M=[`aria-label`],N={key:0,class:`admin-select__search`,role:`presentation`},P=[`placeholder`],F={key:1,class:`admin-select__empty`,role:`presentation`},I=[`aria-selected`,`onClick`,`onKeydown`],L={class:`admin-select__option-label`},R=v(f({__name:`AdminSelect`,props:{modelValue:{},options:{},placeholder:{default:`انتخاب کنید`},ariaLabel:{default:`انتخاب`},block:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`جستجو…`},id:{default:void 0}},emits:[`update:modelValue`],setup(f,{emit:v}){let R=f,z=v,B=d(!1),V=d(``),H=d(null),U=d(null),W=d(null),G=d({});T(H,()=>{B.value=!1,V.value=``},{ignore:[U]});let K=_(()=>R.options.find(e=>e.value===R.modelValue)),q=_(()=>K.value?.label??R.placeholder),J=_(()=>O(R.options,V.value));function Y(e){e.key===`ArrowDown`?(e.preventDefault(),D(U.value,`first`)):e.key===`ArrowUp`&&(e.preventDefault(),D(U.value,`last`))}function X(e,t){let n=e.currentTarget;e.key===`ArrowDown`?(e.preventDefault(),E(n,1)):e.key===`ArrowUp`?(e.preventDefault(),E(n,-1)):(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),$(t))}function Z(){let e=H.value;if(!e)return;let t=e.getBoundingClientRect(),n=Math.min(320,window.innerHeight*.5),r=window.innerHeight-t.bottom-6,i=t.top-6,a=r<Math.min(160,n)&&i>r,o=Math.max(120,Math.min(n,a?i:r));G.value={position:`fixed`,left:`${Math.max(8,Math.min(t.left,window.innerWidth-Math.max(t.width,220)-8))}px`,width:`${Math.max(t.width,220)}px`,zIndex:`1100`,maxHeight:`${o}px`,...a?{top:`auto`,bottom:`${window.innerHeight-t.top+6}px`}:{top:`${t.bottom+6}px`,bottom:`auto`}}}function Q(e){e?(window.addEventListener(`resize`,Z),window.addEventListener(`scroll`,Z,!0)):(window.removeEventListener(`resize`,Z),window.removeEventListener(`scroll`,Z,!0))}async function ne(){B.value=!B.value,B.value&&(V.value=``,await b(),Z(),R.searchable&&(await b(),W.value?.focus()))}function $(e){z(`update:modelValue`,e),B.value=!1,V.value=``}return o(B,e=>{Q(e),e&&b(()=>Z())}),r(()=>{Q(!1)}),(r,o)=>(e(),u(`div`,{id:f.id,ref_key:`rootRef`,ref:H,class:i([`admin-select`,{"admin-select--open":B.value,"admin-select--block":f.block}])},[l(`button`,{type:`button`,class:`admin-select__trigger`,"aria-label":f.ariaLabel,"aria-expanded":B.value,"aria-haspopup":`listbox`,onClick:ne},[l(`span`,j,[a(r.$slots,`option-leading`,{option:K.value},void 0,!0),l(`span`,ee,m(q.value),1)]),l(`span`,te,[p(w,{name:`chevron-down`,size:16})])],8,A),(e(),h(c,{to:`body`},[B.value?(e(),u(`ul`,{key:0,ref_key:`menuRef`,ref:U,class:`admin-select__menu`,"data-select-menu":``,role:`listbox`,"aria-label":f.ariaLabel,style:t(G.value)},[f.searchable?(e(),u(`li`,N,[s(l(`input`,{ref_key:`searchInputRef`,ref:W,"onUpdate:modelValue":o[0]||=e=>V.value=e,type:`search`,class:`admin-select__search-input`,placeholder:f.searchPlaceholder,onClick:o[1]||=S(()=>{},[`stop`]),onKeydown:[o[2]||=C(S(e=>B.value=!1,[`stop`]),[`esc`]),Y]},null,40,P),[[x,V.value]])])):y(``,!0),J.value.length?y(``,!0):(e(),u(`li`,F,` موردی یافت نشد `)),(e(!0),u(g,null,n(J.value,t=>(e(),u(`li`,{key:t.value,role:`presentation`},[l(`button`,{type:`button`,class:i([`admin-select__option`,{"admin-select__option--active":t.value===f.modelValue}]),"data-select-option":``,role:`option`,"aria-selected":t.value===f.modelValue,onClick:e=>$(t.value),onKeydown:e=>X(e,t.value)},[l(`span`,L,[a(r.$slots,`option-leading`,{option:t},void 0,!0),l(`span`,null,m(t.label),1)]),t.value===f.modelValue?(e(),h(w,{key:0,name:`check`,size:16,class:`admin-select__check`})):y(``,!0)],42,I)]))),128))],12,M)):y(``,!0)]))],10,k))}}),[[`__scopeId`,`data-v-4ee349a1`]]);export{R as t};
import{A as e,At as t,N as n,O as r,Ot as i,P as a,V as o,W as s,a as c,c as l,d as u,et as d,g as f,h as p,jt as m,l as h,r as g,s as _,t as v,u as y,w as b}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{d as x,m as S,p as C}from"./http-CTjL79ty.js";import{L as w,M as T}from"./index-BWgYBNME.js";import{n as E,r as D,t as O}from"./selectOptionSearch-DNMc9NzZ.js";var k=[`id`],A=[`aria-label`,`aria-expanded`],j={class:`admin-select__trigger-content`},ee={class:`admin-select__value`},te={class:`admin-select__chevron`,"aria-hidden":`true`},M=[`aria-label`],N={key:0,class:`admin-select__search`,role:`presentation`},P=[`placeholder`],F={key:1,class:`admin-select__empty`,role:`presentation`},I=[`aria-selected`,`onClick`,`onKeydown`],L={class:`admin-select__option-label`},R=v(f({__name:`AdminSelect`,props:{modelValue:{},options:{},placeholder:{default:`انتخاب کنید`},ariaLabel:{default:`انتخاب`},block:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},searchPlaceholder:{default:`جستجو…`},id:{default:void 0}},emits:[`update:modelValue`],setup(f,{emit:v}){let R=f,z=v,B=d(!1),V=d(``),H=d(null),U=d(null),W=d(null),G=d({});T(H,()=>{B.value=!1,V.value=``},{ignore:[U]});let K=_(()=>R.options.find(e=>e.value===R.modelValue)),q=_(()=>K.value?.label??R.placeholder),J=_(()=>O(R.options,V.value));function Y(e){e.key===`ArrowDown`?(e.preventDefault(),D(U.value,`first`)):e.key===`ArrowUp`&&(e.preventDefault(),D(U.value,`last`))}function X(e,t){let n=e.currentTarget;e.key===`ArrowDown`?(e.preventDefault(),E(n,1)):e.key===`ArrowUp`?(e.preventDefault(),E(n,-1)):(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),$(t))}function Z(){let e=H.value;if(!e)return;let t=e.getBoundingClientRect(),n=Math.min(320,window.innerHeight*.5),r=window.innerHeight-t.bottom-6,i=t.top-6,a=r<Math.min(160,n)&&i>r,o=Math.max(120,Math.min(n,a?i:r));G.value={position:`fixed`,left:`${Math.max(8,Math.min(t.left,window.innerWidth-Math.max(t.width,220)-8))}px`,width:`${Math.max(t.width,220)}px`,zIndex:`1100`,maxHeight:`${o}px`,...a?{top:`auto`,bottom:`${window.innerHeight-t.top+6}px`}:{top:`${t.bottom+6}px`,bottom:`auto`}}}function Q(e){e?(window.addEventListener(`resize`,Z),window.addEventListener(`scroll`,Z,!0)):(window.removeEventListener(`resize`,Z),window.removeEventListener(`scroll`,Z,!0))}async function ne(){B.value=!B.value,B.value&&(V.value=``,await b(),Z(),R.searchable&&(await b(),W.value?.focus()))}function $(e){z(`update:modelValue`,e),B.value=!1,V.value=``}return o(B,e=>{Q(e),e&&b(()=>Z())}),r(()=>{Q(!1)}),(r,o)=>(e(),u(`div`,{id:f.id,ref_key:`rootRef`,ref:H,class:i([`admin-select`,{"admin-select--open":B.value,"admin-select--block":f.block}])},[l(`button`,{type:`button`,class:`admin-select__trigger`,"aria-label":f.ariaLabel,"aria-expanded":B.value,"aria-haspopup":`listbox`,onClick:ne},[l(`span`,j,[a(r.$slots,`option-leading`,{option:K.value},void 0,!0),l(`span`,ee,m(q.value),1)]),l(`span`,te,[p(w,{name:`chevron-down`,size:16})])],8,A),(e(),h(c,{to:`body`},[B.value?(e(),u(`ul`,{key:0,ref_key:`menuRef`,ref:U,class:`admin-select__menu`,"data-select-menu":``,role:`listbox`,"aria-label":f.ariaLabel,style:t(G.value)},[f.searchable?(e(),u(`li`,N,[s(l(`input`,{ref_key:`searchInputRef`,ref:W,"onUpdate:modelValue":o[0]||=e=>V.value=e,type:`search`,class:`admin-select__search-input`,placeholder:f.searchPlaceholder,onClick:o[1]||=S(()=>{},[`stop`]),onKeydown:[o[2]||=C(S(e=>B.value=!1,[`stop`]),[`esc`]),Y]},null,40,P),[[x,V.value]])])):y(``,!0),J.value.length?y(``,!0):(e(),u(`li`,F,` موردی یافت نشد `)),(e(!0),u(g,null,n(J.value,t=>(e(),u(`li`,{key:t.value,role:`presentation`},[l(`button`,{type:`button`,class:i([`admin-select__option`,{"admin-select__option--active":t.value===f.modelValue}]),"data-select-option":``,role:`option`,"aria-selected":t.value===f.modelValue,onClick:e=>$(t.value),onKeydown:e=>X(e,t.value)},[l(`span`,L,[a(r.$slots,`option-leading`,{option:t},void 0,!0),l(`span`,null,m(t.label),1)]),t.value===f.modelValue?(e(),h(w,{key:0,name:`check`,size:16,class:`admin-select__check`})):y(``,!0)],42,I)]))),128))],12,M)):y(``,!0)]))],10,k))}}),[[`__scopeId`,`data-v-4ee349a1`]]);export{R as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{A as e,Ot as t,P as n,c as r,d as i,g as a,h as o,jt as s,t as c,u as l}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{L as u}from"./index-DWlOII4H.js";var d={class:`base-empty__icon`,"aria-hidden":`true`},f={class:`base-empty__title`},p={key:0,class:`base-empty__description`},m={key:1,class:`base-empty__actions`},h=c(a({__name:`BaseEmptyState`,props:{icon:{default:`file`},title:{},description:{},compact:{type:Boolean}},emits:[`action`,`secondary`],setup(a){return(c,h)=>(e(),i(`div`,{class:t([`base-empty`,{"base-empty--compact":a.compact}])},[r(`div`,d,[o(u,{name:a.icon,size:a.compact?28:36},null,8,[`name`,`size`])]),r(`h3`,f,s(a.title),1),a.description?(e(),i(`p`,p,s(a.description),1)):l(``,!0),c.$slots.default||c.$slots.secondary?(e(),i(`div`,m,[n(c.$slots,`default`,{},void 0,!0),n(c.$slots,`secondary`,{},void 0,!0)])):l(``,!0)],2))}}),[[`__scopeId`,`data-v-47ea81e4`]]);export{h as t};
import{A as e,Ot as t,P as n,c as r,d as i,g as a,h as o,jt as s,t as c,u as l}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{L as u}from"./index-BWgYBNME.js";var d={class:`base-empty__icon`,"aria-hidden":`true`},f={class:`base-empty__title`},p={key:0,class:`base-empty__description`},m={key:1,class:`base-empty__actions`},h=c(a({__name:`BaseEmptyState`,props:{icon:{default:`file`},title:{},description:{},compact:{type:Boolean}},emits:[`action`,`secondary`],setup(a){return(c,h)=>(e(),i(`div`,{class:t([`base-empty`,{"base-empty--compact":a.compact}])},[r(`div`,d,[o(u,{name:a.icon,size:a.compact?28:36},null,8,[`name`,`size`])]),r(`h3`,f,s(a.title),1),a.description?(e(),i(`p`,p,s(a.description),1)):l(``,!0),c.$slots.default||c.$slots.secondary?(e(),i(`div`,m,[n(c.$slots,`default`,{},void 0,!0),n(c.$slots,`secondary`,{},void 0,!0)])):l(``,!0)],2))}}),[[`__scopeId`,`data-v-47ea81e4`]]);export{h as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
.checks-page__order-meta[data-v-af5e25db]{align-items:center;gap:8px;display:flex}.checks-page__stats[data-v-af5e25db]{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:14px;display:grid}.checks-page__stat[data-v-af5e25db]{border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);flex-direction:column;gap:2px;padding:10px 12px;display:flex}.checks-page__stat span[data-v-af5e25db]{color:var(--color-text-muted);font-size:.75rem}.checks-page__stat strong[data-v-af5e25db]{font-size:.875rem;font-weight:700}.checks-page__list[data-v-af5e25db]{overflow:hidden}.check-row[data-v-af5e25db]{border-bottom:1px solid var(--color-border-light);grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;padding:8px 12px;display:grid}.check-row[data-v-af5e25db]:last-child{border-bottom:0}.check-row.open[data-v-af5e25db]{background:color-mix(in srgb, var(--color-primary-soft) 55%, transparent)}.check-row__main[data-v-af5e25db]{min-width:0;color:inherit;text-align:start;cursor:pointer;background:0 0;border:0;align-items:center;gap:10px;padding:4px 0;display:flex}.check-row__chevron[data-v-af5e25db]{width:14px;color:var(--color-text-muted);flex-shrink:0;font-size:.75rem}.check-row__thumb[data-v-af5e25db]{border:1px solid var(--color-border);cursor:zoom-in;background:#111;border-radius:6px;flex-shrink:0;place-items:center;width:44px;height:32px;padding:0;display:grid;overflow:hidden}.check-row__thumb img[data-v-af5e25db]{object-fit:cover;width:100%;height:100%;display:block}.check-row__thumb--empty[data-v-af5e25db]{color:var(--color-text-muted);cursor:default;font-size:.625rem}.check-row__meta[data-v-af5e25db]{flex:1;gap:2px;min-width:0;display:grid}.check-row__meta strong[data-v-af5e25db]{font-size:.875rem;font-weight:700}.check-row__meta small[data-v-af5e25db]{color:var(--color-text-muted);white-space:nowrap;text-overflow:ellipsis;font-size:.75rem;overflow:hidden}.check-row__actions[data-v-af5e25db]{flex-shrink:0;gap:6px;display:flex}.check-row__panel[data-v-af5e25db]{border-top:1px dashed var(--color-border);flex-wrap:wrap;grid-column:1/-1;align-items:flex-start;gap:12px 16px;padding:8px 0 4px 24px;display:flex}.check-row__fields[data-v-af5e25db]{flex-wrap:wrap;flex:1;gap:8px;min-width:200px;display:flex}.check-row__field[data-v-af5e25db]{background:var(--color-border-light);border-radius:999px;align-items:baseline;gap:6px;padding:4px 8px;font-size:.75rem;display:inline-flex}.check-row__field span[data-v-af5e25db]{color:var(--color-text-muted)}.check-row__field strong[data-v-af5e25db]{font-weight:600}.check-row__photos[data-v-af5e25db]{flex-shrink:0;gap:8px;display:flex}.check-row__photo[data-v-af5e25db]{border:1px solid var(--color-border);width:96px;color:inherit;cursor:zoom-in;text-align:center;background:0 0;border-radius:8px;padding:0;overflow:hidden}.check-row__photo img[data-v-af5e25db]{object-fit:cover;background:#111;width:100%;height:60px;display:block}.check-row__photo span[data-v-af5e25db]{color:var(--color-text-muted);padding:4px;font-size:.6875rem;display:block}.check-row__hint[data-v-af5e25db]{color:var(--color-text-muted);margin:0;font-size:.75rem}.checks-page__footer[data-v-af5e25db]{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;display:flex}.checks-page__note[data-v-af5e25db]{color:var(--color-text-muted);margin:0;font-size:.75rem}.checks-page__history[data-v-af5e25db]{gap:8px;display:grid}.checks-page__history-item[data-v-af5e25db]{gap:6px;padding:12px;display:grid}.checks-page__history-item-head[data-v-af5e25db]{flex-wrap:wrap;justify-content:space-between;gap:12px;font-size:.875rem;display:flex}.checks-page__history-meta[data-v-af5e25db],.checks-page__history-note[data-v-af5e25db]{margin:0;font-size:.8125rem;line-height:1.5}.checks-page__history-meta[data-v-af5e25db]{color:var(--color-text-muted)}.checks-page__lightbox[data-v-af5e25db]{z-index:300000;background:#000000d6;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.checks-page__lightbox img[data-v-af5e25db]{object-fit:contain;border-radius:8px;max-width:min(900px,100%);max-height:88vh}.checks-page__lightbox-close[data-v-af5e25db]{top:14px;cursor:pointer;border:0;border-radius:8px;padding:8px 12px;position:absolute;inset-inline-end:14px}@media (width<=800px){.checks-page__stats[data-v-af5e25db]{grid-template-columns:repeat(2,minmax(0,1fr))}.check-row[data-v-af5e25db]{grid-template-columns:1fr}.check-row__actions[data-v-af5e25db]{padding-inline-start:24px}.check-row__panel[data-v-af5e25db]{padding-inline-start:0}}
+1
View File
@@ -0,0 +1 @@
.checks-page__order-meta[data-v-6ad55e99]{align-items:center;gap:8px;display:flex}.checks-page__stats[data-v-6ad55e99]{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:14px;display:grid}.checks-page__stat[data-v-6ad55e99]{border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);flex-direction:column;gap:2px;padding:10px 12px;display:flex}.checks-page__stat span[data-v-6ad55e99]{color:var(--color-text-muted);font-size:.75rem}.checks-page__stat strong[data-v-6ad55e99]{font-size:.875rem;font-weight:700}.checks-page__list[data-v-6ad55e99]{overflow:hidden}.check-row[data-v-6ad55e99]{border-bottom:1px solid var(--color-border-light);grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;padding:8px 12px;display:grid}.check-row[data-v-6ad55e99]:last-child{border-bottom:0}.check-row.open[data-v-6ad55e99]{background:color-mix(in srgb, var(--color-primary-soft) 55%, transparent)}.check-row__main[data-v-6ad55e99]{min-width:0;color:inherit;text-align:start;cursor:pointer;background:0 0;border:0;align-items:center;gap:10px;padding:4px 0;display:flex}.check-row__chevron[data-v-6ad55e99]{width:14px;color:var(--color-text-muted);flex-shrink:0;font-size:.75rem}.check-row__thumb[data-v-6ad55e99]{border:1px solid var(--color-border);cursor:zoom-in;background:#111;border-radius:6px;flex-shrink:0;place-items:center;width:44px;height:32px;padding:0;display:grid;overflow:hidden}.check-row__thumb img[data-v-6ad55e99]{object-fit:cover;width:100%;height:100%;display:block}.check-row__thumb--empty[data-v-6ad55e99]{color:var(--color-text-muted);cursor:default;font-size:.625rem}.check-row__meta[data-v-6ad55e99]{flex:1;gap:2px;min-width:0;display:grid}.check-row__meta strong[data-v-6ad55e99]{font-size:.875rem;font-weight:700}.check-row__meta small[data-v-6ad55e99]{color:var(--color-text-muted);white-space:nowrap;text-overflow:ellipsis;font-size:.75rem;overflow:hidden}.check-row__actions[data-v-6ad55e99]{flex-shrink:0;gap:6px;display:flex}.check-row__panel[data-v-6ad55e99]{border-top:1px dashed var(--color-border);flex-wrap:wrap;grid-column:1/-1;align-items:flex-start;gap:12px 16px;padding:8px 0 4px 24px;display:flex}.check-row__fields[data-v-6ad55e99]{flex-wrap:wrap;flex:1;gap:8px;min-width:200px;display:flex}.check-row__field[data-v-6ad55e99]{background:var(--color-border-light);border-radius:999px;align-items:baseline;gap:6px;padding:4px 8px;font-size:.75rem;display:inline-flex}.check-row__field span[data-v-6ad55e99]{color:var(--color-text-muted)}.check-row__field strong[data-v-6ad55e99]{font-weight:600}.check-row__photos[data-v-6ad55e99]{flex-shrink:0;gap:8px;display:flex}.check-row__photo[data-v-6ad55e99]{border:1px solid var(--color-border);width:96px;color:inherit;cursor:zoom-in;text-align:center;background:0 0;border-radius:8px;padding:0;overflow:hidden}.check-row__photo img[data-v-6ad55e99]{object-fit:cover;background:#111;width:100%;height:60px;display:block}.check-row__photo span[data-v-6ad55e99]{color:var(--color-text-muted);padding:4px;font-size:.6875rem;display:block}.check-row__hint[data-v-6ad55e99]{color:var(--color-text-muted);margin:0;font-size:.75rem}.checks-page__footer[data-v-6ad55e99]{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;display:flex}.checks-page__note[data-v-6ad55e99]{color:var(--color-text-muted);margin:0;font-size:.75rem}.checks-page__history[data-v-6ad55e99]{gap:8px;display:grid}.checks-page__history-item[data-v-6ad55e99]{gap:6px;padding:12px;display:grid}.checks-page__history-item-head[data-v-6ad55e99]{flex-wrap:wrap;justify-content:space-between;gap:12px;font-size:.875rem;display:flex}.checks-page__history-meta[data-v-6ad55e99],.checks-page__history-note[data-v-6ad55e99]{margin:0;font-size:.8125rem;line-height:1.5}.checks-page__history-meta[data-v-6ad55e99]{color:var(--color-text-muted)}.checks-page__lightbox[data-v-6ad55e99]{z-index:300000;background:#000000d6;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.checks-page__lightbox img[data-v-6ad55e99]{object-fit:contain;border-radius:8px;max-width:min(900px,100%);max-height:88vh}.checks-page__lightbox-close[data-v-6ad55e99]{top:14px;cursor:pointer;border:0;border-radius:8px;padding:8px 12px;position:absolute;inset-inline-end:14px}@media (width<=800px){.checks-page__stats[data-v-6ad55e99]{grid-template-columns:repeat(2,minmax(0,1fr))}.check-row[data-v-6ad55e99]{grid-template-columns:1fr}.check-row__actions[data-v-6ad55e99]{padding-inline-start:24px}.check-row__panel[data-v-6ad55e99]{padding-inline-start:0}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
.checks-list-page__summary[data-v-09633f1f]{color:var(--color-text-muted);flex-direction:column;align-items:flex-end;gap:4px;font-size:.8125rem;display:flex}.checks-list-page__filters[data-v-09633f1f]{flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px;padding:12px 14px;display:flex}.checks-list-page__search[data-v-09633f1f]{border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-border-light);min-width:220px;color:var(--color-text-muted);flex:1;align-items:center;gap:10px;padding:8px 12px;display:flex}.checks-list-page__search-input[data-v-09633f1f]{color:var(--color-text);background:0 0;border:none;outline:none;flex:1;font-size:.875rem}.checks-list-page__status-select[data-v-09633f1f]{flex:0 220px;width:220px}.checks-list-page__table[data-v-09633f1f]{padding:0;overflow:hidden}.checks-list-page__order-link[data-v-09633f1f]{color:var(--color-primary);cursor:pointer;font:inherit;background:0 0;border:none;padding:0}.checks-list-page__order-link[data-v-09633f1f]:hover{text-decoration:underline}.checks-list-page__empty[data-v-09633f1f]{text-align:center;color:var(--color-text-muted);margin:0;padding:24px;font-size:.875rem}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
import{A as e,D as t,N as n,Q as r,U as i,W as a,c as o,d as s,et as c,g as l,h as u,jt as d,l as f,m as p,r as m,s as h,t as g}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{a as _,d as v,t as y}from"./http-CTjL79ty.js";import{S as b,V as x}from"./index-DWlOII4H.js";import{t as S}from"./AdminPageSkeleton-DacAHji8.js";import{t as C}from"./BaseEmptyState-B6cM4bRM.js";var w={class:`admin-page`},T={key:2,class:`admin-table`},E={dir:`ltr`},D=[`onClick`],O={class:`field`},k={class:`field`},A={class:`field`},j={class:`field`},M=[`disabled`],N=g(l({__name:`LevelsView`,setup(l){let g=c([]),N=c(!0),P=c(!1),F=c(null),I=_(),L=r({code:``,label:``,sortOrder:0,benefitsText:``}),R=h(()=>F.value?`ویرایش سطح`:`سطح جدید`);function z(e){return e.split(`
import{A as e,D as t,N as n,Q as r,U as i,W as a,c as o,d as s,et as c,g as l,h as u,jt as d,l as f,m as p,r as m,s as h,t as g}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{a as _,d as v,t as y}from"./http-CTjL79ty.js";import{S as b,V as x}from"./index-BWgYBNME.js";import{t as S}from"./AdminPageSkeleton-DacAHji8.js";import{t as C}from"./BaseEmptyState-88fQ29rO.js";var w={class:`admin-page`},T={key:2,class:`admin-table`},E={dir:`ltr`},D=[`onClick`],O={class:`field`},k={class:`field`},A={class:`field`},j={class:`field`},M=[`disabled`],N=g(l({__name:`LevelsView`,setup(l){let g=c([]),N=c(!0),P=c(!1),F=c(null),I=_(),L=r({code:``,label:``,sortOrder:0,benefitsText:``}),R=h(()=>F.value?`ویرایش سطح`:`سطح جدید`);function z(e){return e.split(`
`).map(e=>e.trim()).filter(Boolean).map(e=>({title:e}))}async function B(){N.value=!0;try{g.value=await b.list()}catch(e){I.error(e instanceof y?e.message:`بارگذاری سطوح ناموفق بود`)}finally{N.value=!1}}function V(){F.value=null,Object.assign(L,{code:``,label:``,sortOrder:g.value.length+1,benefitsText:``}),P.value=!0}function H(e){F.value=e.id,Object.assign(L,{code:e.code,label:e.label,sortOrder:e.sortOrder,benefitsText:e.benefits.map(e=>e.title).join(`
`)}),P.value=!0}async function U(){try{let e={code:L.code.trim(),label:L.label.trim(),sortOrder:L.sortOrder,benefits:z(L.benefitsText)};F.value?await b.update(F.value,e):await b.create(e),P.value=!1,I.success(`ذخیره شد`),await B()}catch(e){I.error(e instanceof y?e.message:`ذخیره ناموفق بود`)}}return t(()=>{B()}),(t,r)=>(e(),s(`div`,w,[o(`header`,{class:`admin-page__head`},[r[5]||=o(`div`,null,[o(`h1`,null,`سطوح و مزایای مشتری`),o(`p`,null,`تعریف Level داخلی CRM و مزایای هر سطح (نمایش فقط در ادمین)`)],-1),o(`button`,{type:`button`,class:`admin-btn admin-btn--primary`,onClick:V},`سطح جدید`)]),N.value?(e(),f(S,{key:0,variant:`table`})):g.value.length?(e(),s(`table`,T,[r[6]||=o(`thead`,null,[o(`tr`,null,[o(`th`,null,`کد`),o(`th`,null,`عنوان`),o(`th`,null,`مزایا`),o(`th`,null,`مشتریان`),o(`th`)])],-1),o(`tbody`,null,[(e(!0),s(m,null,n(g.value,t=>(e(),s(`tr`,{key:t.id},[o(`td`,E,d(t.code),1),o(`td`,null,d(t.label),1),o(`td`,null,d(t.benefits.map(e=>e.title).join(`، `)||`—`),1),o(`td`,null,d(t.customersCount),1),o(`td`,null,[o(`button`,{type:`button`,class:`link`,onClick:e=>H(t)},`ویرایش`,8,D)])]))),128))])])):(e(),f(C,{key:1,title:`سطحی تعریف نشده`})),u(x,{open:P.value,title:R.value,onClose:r[4]||=e=>P.value=!1},{footer:i(()=>[o(`button`,{type:`button`,class:`admin-btn admin-btn--primary`,disabled:!L.code.trim()||!L.label.trim(),onClick:U},` ذخیره `,8,M)]),default:i(()=>[o(`label`,O,[r[7]||=p(`کد`,-1),a(o(`input`,{"onUpdate:modelValue":r[0]||=e=>L.code=e,class:`admin-input`,dir:`ltr`},null,512),[[v,L.code]])]),o(`label`,k,[r[8]||=p(`عنوان`,-1),a(o(`input`,{"onUpdate:modelValue":r[1]||=e=>L.label=e,class:`admin-input`},null,512),[[v,L.label]])]),o(`label`,A,[r[9]||=p(`ترتیب`,-1),a(o(`input`,{"onUpdate:modelValue":r[2]||=e=>L.sortOrder=e,type:`number`,class:`admin-input`},null,512),[[v,L.sortOrder,void 0,{number:!0}]])]),o(`label`,j,[r[10]||=p(` مزایا (هر خط یک مورد) `,-1),a(o(`textarea`,{"onUpdate:modelValue":r[3]||=e=>L.benefitsText=e,class:`admin-input`,rows:`4`},null,512),[[v,L.benefitsText]])])]),_:1},8,[`open`,`title`])]))}}),[[`__scopeId`,`data-v-44c7f808`]]);export{N as default};
@@ -1 +1 @@
import{A as e,W as t,c as n,ct as r,d as i,et as a,g as o,h as s,jt as c,m as l,s as u,t as d,u as f}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{a as p,d as m,l as h,m as g,u as _}from"./http-CTjL79ty.js";import{F as v,I as y,L as b,P as x,R as S,z as C}from"./index-DWlOII4H.js";var w={class:`login-page`},T={class:`login-page__form-wrap`},E={class:`login-page__card admin-card`},D={class:`login-page__header`},O={key:0,class:`login-page__mock-hint`},k={dir:`ltr`},A={dir:`ltr`},j={key:0,class:`admin-form__error`,role:`alert`},M={class:`admin-form__field`},N={class:`login-page__input-wrap`},P={class:`login-page__field-icon`,"aria-hidden":`true`},F={class:`admin-form__field`},I={class:`login-page__input-wrap login-page__input-wrap--password`},L={class:`login-page__field-icon`,"aria-hidden":`true`},R=[`type`],z=[`aria-label`],B={class:`login-page__remember`},V=[`disabled`],H={key:0,class:`admin-btn__spinner`,"aria-hidden":`true`},U=d(o({__name:`LoginView`,setup(o){let d=C(),U=S(),W=x(),G=p(),K=a(y()?v.phone:``),q=a(y()?v.password:``),J=a(!0),Y=a(!1),X=y(),Z=u(()=>K.value.trim().length>0&&q.value.length>0);function Q(e){return e.replace(/[۰-۹]/g,e=>String(`۰۱۲۳۴۵۶۷۸۹`.indexOf(e))).replace(/[٠-٩]/g,e=>String(`٠١٢٣٤٥٦٧٨٩`.indexOf(e)))}async function $(){if(!Z.value){W.error=`لطفاً شماره موبایل و رمز عبور را وارد کنید.`;return}if(!await W.login(Q(K.value.trim()),q.value,J.value))return;G.success(`خوش آمدید، ${W.fullName}`);let e=typeof U.query.redirect==`string`?U.query.redirect:`/`,t=`/admin/`.replace(/\/$/,``),n=e.startsWith(t)?e.slice(t.length)||`/`:e;await d.replace(n)}return(a,o)=>(e(),i(`div`,w,[n(`div`,T,[n(`div`,E,[n(`div`,D,[o[8]||=n(`h2`,{class:`login-page__title`},`ورود به پنل مدیریت`,-1),o[9]||=n(`p`,{class:`login-page__subtitle`},`برای ادامه، اطلاعات حساب کاربری خود را وارد کنید.`,-1),r(X)?(e(),i(`p`,O,[o[6]||=l(` حالت موک فعال است — `,-1),n(`span`,k,c(r(v).phone),1),o[7]||=l(` / `,-1),n(`span`,A,c(r(v).password),1)])):f(``,!0)]),n(`form`,{class:`admin-form login-page__form`,onSubmit:g($,[`prevent`])},[r(W).error?(e(),i(`p`,j,c(r(W).error),1)):f(``,!0),n(`div`,M,[o[10]||=n(`label`,{for:`login-phone`},`شماره موبایل`,-1),n(`div`,N,[n(`span`,P,[s(b,{name:`phone`,size:18})]),t(n(`input`,{id:`login-phone`,"onUpdate:modelValue":o[0]||=e=>K.value=e,type:`tel`,class:`admin-input login-page__input`,placeholder:`۰۹۱۲۱۱۱۱۲۲۲۲`,autocomplete:`username`,inputmode:`tel`,dir:`ltr`,onInput:o[1]||=e=>r(W).clearError()},null,544),[[m,K.value]])])]),n(`div`,F,[o[11]||=n(`label`,{for:`login-password`},`رمز عبور`,-1),n(`div`,I,[n(`span`,L,[s(b,{name:`lock`,size:18})]),t(n(`input`,{id:`login-password`,"onUpdate:modelValue":o[2]||=e=>q.value=e,type:Y.value?`text`:`password`,class:`admin-input login-page__input login-page__input--with-toggle`,placeholder:`رمز عبور`,autocomplete:`current-password`,onInput:o[3]||=e=>r(W).clearError()},null,40,R),[[_,q.value]]),n(`button`,{type:`button`,class:`login-page__toggle-password`,"aria-label":Y.value?`پنهان کردن رمز`:`نمایش رمز`,onClick:o[4]||=e=>Y.value=!Y.value},[s(b,{name:Y.value?`eye-off`:`eye`,size:18},null,8,[`name`])],8,z)])]),n(`label`,B,[t(n(`input`,{"onUpdate:modelValue":o[5]||=e=>J.value=e,type:`checkbox`},null,512),[[h,J.value]]),o[12]||=n(`span`,null,`مرا به خاطر بسپار`,-1)]),n(`button`,{type:`submit`,class:`admin-btn admin-btn--primary login-page__submit`,disabled:!Z.value||r(W).loading},[r(W).loading?(e(),i(`span`,H)):f(``,!0),o[13]||=l(` ورود به پنل `,-1)],8,V)],32)])]),n(`div`,{class:`login-page__brand`},[n(`div`,{class:`login-page__brand-inner`},[n(`img`,{src:`/admin/brand-logo.png`,alt:`نادمی تکس`,class:`login-page__brand-logo`}),o[14]||=n(`p`,{class:`login-page__brand-badge`},`پارچه`,-1),o[15]||=n(`h1`,{class:`login-page__brand-title`},`پنل مدیریت سفارش‌های عمده`,-1),o[16]||=n(`p`,{class:`login-page__brand-text`},` مدیریت سفارش‌ها، مشتریان، قیمت‌گذاری، چک‌ها و گزارش‌های فروش در یک محیط یکپارچه. `,-1)])])]))}}),[[`__scopeId`,`data-v-e708878f`]]);export{U as default};
import{A as e,W as t,c as n,ct as r,d as i,et as a,g as o,h as s,jt as c,m as l,s as u,t as d,u as f}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{a as p,d as m,l as h,m as g,u as _}from"./http-CTjL79ty.js";import{F as v,I as y,L as b,P as x,R as S,z as C}from"./index-BWgYBNME.js";var w={class:`login-page`},T={class:`login-page__form-wrap`},E={class:`login-page__card admin-card`},D={class:`login-page__header`},O={key:0,class:`login-page__mock-hint`},k={dir:`ltr`},A={dir:`ltr`},j={key:0,class:`admin-form__error`,role:`alert`},M={class:`admin-form__field`},N={class:`login-page__input-wrap`},P={class:`login-page__field-icon`,"aria-hidden":`true`},F={class:`admin-form__field`},I={class:`login-page__input-wrap login-page__input-wrap--password`},L={class:`login-page__field-icon`,"aria-hidden":`true`},R=[`type`],z=[`aria-label`],B={class:`login-page__remember`},V=[`disabled`],H={key:0,class:`admin-btn__spinner`,"aria-hidden":`true`},U=d(o({__name:`LoginView`,setup(o){let d=C(),U=S(),W=x(),G=p(),K=a(y()?v.phone:``),q=a(y()?v.password:``),J=a(!0),Y=a(!1),X=y(),Z=u(()=>K.value.trim().length>0&&q.value.length>0);function Q(e){return e.replace(/[۰-۹]/g,e=>String(`۰۱۲۳۴۵۶۷۸۹`.indexOf(e))).replace(/[٠-٩]/g,e=>String(`٠١٢٣٤٥٦٧٨٩`.indexOf(e)))}async function $(){if(!Z.value){W.error=`لطفاً شماره موبایل و رمز عبور را وارد کنید.`;return}if(!await W.login(Q(K.value.trim()),q.value,J.value))return;G.success(`خوش آمدید، ${W.fullName}`);let e=typeof U.query.redirect==`string`?U.query.redirect:`/`,t=`/admin/`.replace(/\/$/,``),n=e.startsWith(t)?e.slice(t.length)||`/`:e;await d.replace(n)}return(a,o)=>(e(),i(`div`,w,[n(`div`,T,[n(`div`,E,[n(`div`,D,[o[8]||=n(`h2`,{class:`login-page__title`},`ورود به پنل مدیریت`,-1),o[9]||=n(`p`,{class:`login-page__subtitle`},`برای ادامه، اطلاعات حساب کاربری خود را وارد کنید.`,-1),r(X)?(e(),i(`p`,O,[o[6]||=l(` حالت موک فعال است — `,-1),n(`span`,k,c(r(v).phone),1),o[7]||=l(` / `,-1),n(`span`,A,c(r(v).password),1)])):f(``,!0)]),n(`form`,{class:`admin-form login-page__form`,onSubmit:g($,[`prevent`])},[r(W).error?(e(),i(`p`,j,c(r(W).error),1)):f(``,!0),n(`div`,M,[o[10]||=n(`label`,{for:`login-phone`},`شماره موبایل`,-1),n(`div`,N,[n(`span`,P,[s(b,{name:`phone`,size:18})]),t(n(`input`,{id:`login-phone`,"onUpdate:modelValue":o[0]||=e=>K.value=e,type:`tel`,class:`admin-input login-page__input`,placeholder:`۰۹۱۲۱۱۱۱۲۲۲۲`,autocomplete:`username`,inputmode:`tel`,dir:`ltr`,onInput:o[1]||=e=>r(W).clearError()},null,544),[[m,K.value]])])]),n(`div`,F,[o[11]||=n(`label`,{for:`login-password`},`رمز عبور`,-1),n(`div`,I,[n(`span`,L,[s(b,{name:`lock`,size:18})]),t(n(`input`,{id:`login-password`,"onUpdate:modelValue":o[2]||=e=>q.value=e,type:Y.value?`text`:`password`,class:`admin-input login-page__input login-page__input--with-toggle`,placeholder:`رمز عبور`,autocomplete:`current-password`,onInput:o[3]||=e=>r(W).clearError()},null,40,R),[[_,q.value]]),n(`button`,{type:`button`,class:`login-page__toggle-password`,"aria-label":Y.value?`پنهان کردن رمز`:`نمایش رمز`,onClick:o[4]||=e=>Y.value=!Y.value},[s(b,{name:Y.value?`eye-off`:`eye`,size:18},null,8,[`name`])],8,z)])]),n(`label`,B,[t(n(`input`,{"onUpdate:modelValue":o[5]||=e=>J.value=e,type:`checkbox`},null,512),[[h,J.value]]),o[12]||=n(`span`,null,`مرا به خاطر بسپار`,-1)]),n(`button`,{type:`submit`,class:`admin-btn admin-btn--primary login-page__submit`,disabled:!Z.value||r(W).loading},[r(W).loading?(e(),i(`span`,H)):f(``,!0),o[13]||=l(` ورود به پنل `,-1)],8,V)],32)])]),n(`div`,{class:`login-page__brand`},[n(`div`,{class:`login-page__brand-inner`},[n(`img`,{src:`/admin/brand-logo.png`,alt:`نادمی تکس`,class:`login-page__brand-logo`}),o[14]||=n(`p`,{class:`login-page__brand-badge`},`پارچه`,-1),o[15]||=n(`h1`,{class:`login-page__brand-title`},`پنل مدیریت سفارش‌های عمده`,-1),o[16]||=n(`p`,{class:`login-page__brand-text`},` مدیریت سفارش‌ها، مشتریان، قیمت‌گذاری، چک‌ها و گزارش‌های فروش در یک محیط یکپارچه. `,-1)])])]))}}),[[`__scopeId`,`data-v-e708878f`]]);export{U as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.products-page__filters[data-v-87b603ef]{flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px;padding:12px 14px;display:flex}.products-page__search[data-v-87b603ef]{min-width:200px;color:var(--color-text-muted);flex:1;align-items:center;gap:10px;display:flex}.products-page__search-input[data-v-87b603ef]{background:0 0;border:none;outline:none;flex:1;font-size:.875rem}.products-page__catalog-filter[data-v-87b603ef]{width:min(260px,100%)}.admin-form__hint[data-v-87b603ef]{color:var(--color-text-muted);margin:6px 0 0;font-size:.75rem;line-height:1.5}.products-page__table[data-v-87b603ef]{overflow:hidden}.product-thumb[data-v-87b603ef]{background:#e8eceb 50%/cover no-repeat;border-radius:8px;width:44px;height:36px;display:block}.product-thumb--empty[data-v-87b603ef]{background:#eef1f0}.color-variants__hint[data-v-87b603ef]{color:var(--color-text-muted);margin:0 0 10px;font-size:.75rem;line-height:1.6}.general-images[data-v-87b603ef],.color-variants[data-v-87b603ef]{flex-direction:column;gap:10px;display:flex}.product-media-row[data-v-87b603ef]{border:1px solid var(--color-border);background:var(--color-elevated,#fff);border-radius:14px;grid-template-columns:1fr auto;align-items:center;gap:12px 14px;padding:12px 14px;display:grid;box-shadow:0 1px 2px #0f172a0a}.product-media-row--color[data-v-87b603ef]{grid-template-columns:auto 1fr auto;align-items:center}.product-media-row[data-v-87b603ef] .image-picker{min-width:0}.product-media-row__input[data-v-87b603ef]{min-width:0;height:44px}.product-media-row__delete[data-v-87b603ef]{width:40px;height:40px;color:var(--color-text-muted);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;padding:0;transition:color .15s,background .15s,border-color .15s;display:inline-flex}.product-media-row__delete[data-v-87b603ef]:hover{color:#c53030;background:#c5303014;border-color:#c530302e}.product-media-row__delete[data-v-87b603ef]:focus-visible{outline:2px solid var(--color-primary,#2d6a4f);outline-offset:2px}.product-media-add[data-v-87b603ef]{justify-content:center;align-self:stretch}@media (width<=520px){.product-media-row--color[data-v-87b603ef]{grid-template-rows:auto auto;grid-template-columns:1fr auto}.product-media-row--color[data-v-87b603ef] .image-picker{grid-column:1/-1}.product-media-row--color .product-media-row__delete[data-v-87b603ef]{grid-area:2/2}.product-media-row--color .product-media-row__input[data-v-87b603ef]{grid-area:2/1}}
-1
View File
@@ -1 +0,0 @@
.products-page__filters[data-v-83a6f3f4]{flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:16px;padding:12px 14px;display:flex}.products-page__search[data-v-83a6f3f4]{min-width:200px;color:var(--color-text-muted);flex:1;align-items:center;gap:10px;display:flex}.products-page__search-input[data-v-83a6f3f4]{background:0 0;border:none;outline:none;flex:1;font-size:.875rem}.products-page__catalog-filter[data-v-83a6f3f4]{width:min(260px,100%)}.admin-form__hint[data-v-83a6f3f4]{color:var(--color-text-muted);margin:6px 0 0;font-size:.75rem;line-height:1.5}.products-page__table[data-v-83a6f3f4]{overflow:hidden}.product-thumb[data-v-83a6f3f4]{background:#e8eceb 50%/cover no-repeat;border-radius:8px;width:44px;height:36px;display:block}.product-thumb--empty[data-v-83a6f3f4]{background:#eef1f0}.color-variants__hint[data-v-83a6f3f4]{color:var(--color-text-muted);margin:0 0 10px;font-size:.75rem;line-height:1.6}.general-images[data-v-83a6f3f4],.color-variants[data-v-83a6f3f4]{flex-direction:column;gap:10px;display:flex}.product-media-row[data-v-83a6f3f4]{border:1px solid var(--color-border);background:var(--color-elevated,#fff);border-radius:14px;grid-template-columns:1fr auto;align-items:center;gap:12px 14px;padding:12px 14px;display:grid;box-shadow:0 1px 2px #0f172a0a}.product-media-row--color[data-v-83a6f3f4]{grid-template-columns:auto 1fr auto;align-items:center}.product-media-row[data-v-83a6f3f4] .image-picker{min-width:0}.product-media-row__input[data-v-83a6f3f4]{min-width:0;height:44px}.product-media-row__delete[data-v-83a6f3f4]{width:40px;height:40px;color:var(--color-text-muted);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;padding:0;transition:color .15s,background .15s,border-color .15s;display:inline-flex}.product-media-row__delete[data-v-83a6f3f4]:hover{color:#c53030;background:#c5303014;border-color:#c530302e}.product-media-row__delete[data-v-83a6f3f4]:focus-visible{outline:2px solid var(--color-primary,#2d6a4f);outline-offset:2px}.product-media-add[data-v-83a6f3f4]{justify-content:center;align-self:stretch}@media (width<=520px){.product-media-row--color[data-v-83a6f3f4]{grid-template-rows:auto auto;grid-template-columns:1fr auto}.product-media-row--color[data-v-83a6f3f4] .image-picker{grid-column:1/-1}.product-media-row--color .product-media-row__delete[data-v-83a6f3f4]{grid-area:2/2}.product-media-row--color .product-media-row__input[data-v-83a6f3f4]{grid-area:2/1}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{A as e,D as t,N as n,Q as r,U as i,W as a,c as o,d as s,et as c,g as l,h as u,jt as d,l as f,m as p,r as m,s as h,t as g}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{a as _,d as v,t as y}from"./http-CTjL79ty.js";import{E as b,V as x,j as S,y as C}from"./index-DWlOII4H.js";import{t as w}from"./AdminPageSkeleton-DacAHji8.js";import{t as T}from"./BaseEmptyState-B6cM4bRM.js";import{t as E}from"./AdminSelect-CWMyO8tk.js";var D={class:`admin-page`},O={class:`admin-page__head`},k={key:2,class:`admin-table`},A={class:`muted`,dir:`ltr`},j=[`onClick`],M={class:`field`},N={class:`field`},P={class:`field`},F=[`disabled`],I=g(l({__name:`SuggestionsView`,setup(l){let g=c([]),I=c(!0),L=c([]),R=c([]),z=c(!1),B=_(),V=r({customerId:``,productId:``,note:``}),H=h(()=>L.value.map(e=>({value:e.id,label:e.name?.trim()||e.phone}))),U=h(()=>R.value.map(e=>({value:e.id,label:`${e.name} (${e.productCode})`})));async function W(){I.value=!0;try{let[e,t,n]=await Promise.all([S.list(),C.list(),b.list()]);g.value=e,L.value=t,R.value=n}catch(e){B.error(e instanceof y?e.message:`بارگذاری ناموفق بود`)}finally{I.value=!1}}async function G(){try{await S.create({customerId:V.customerId,productId:V.productId,note:V.note.trim()||void 0}),z.value=!1,V.note=``,B.success(`پیشنهاد ثبت شد`),await W()}catch(e){B.error(e instanceof y?e.message:`ثبت ناموفق بود`)}}async function K(e){try{await S.setActive(e.id,!e.isActive),await W()}catch(e){B.error(e instanceof y?e.message:`به‌روزرسانی ناموفق بود`)}}return t(()=>{W()}),(t,r)=>(e(),s(`div`,D,[o(`header`,O,[r[5]||=o(`div`,null,[o(`h1`,null,`پیشنهاد محصول`),o(`p`,null,`پیشنهاد دستی محصول به مشتری`)],-1),o(`button`,{type:`button`,class:`admin-btn admin-btn--primary`,onClick:r[0]||=e=>z.value=!0},`پیشنهاد جدید`)]),I.value?(e(),f(w,{key:0,variant:`table`})):g.value.length?(e(),s(`table`,k,[r[6]||=o(`thead`,null,[o(`tr`,null,[o(`th`,null,`مشتری`),o(`th`,null,`محصول`),o(`th`,null,`یادداشت`),o(`th`,null,`وضعیت`),o(`th`)])],-1),o(`tbody`,null,[(e(!0),s(m,null,n(g.value,t=>(e(),s(`tr`,{key:t.id},[o(`td`,null,d(t.customerName),1),o(`td`,null,[p(d(t.productName)+` `,1),o(`span`,A,`(`+d(t.productCode)+`)`,1)]),o(`td`,null,d(t.note||`—`),1),o(`td`,null,d(t.isActive?`فعال`:`غیرفعال`),1),o(`td`,null,[o(`button`,{type:`button`,class:`link`,onClick:e=>K(t)},d(t.isActive?`غیرفعال`:`فعال`),9,j)])]))),128))])])):(e(),f(T,{key:1,title:`پیشنهادی ثبت نشده`})),u(x,{open:z.value,title:`پیشنهاد محصول`,onClose:r[4]||=e=>z.value=!1},{footer:i(()=>[o(`button`,{type:`button`,class:`admin-btn admin-btn--primary`,disabled:!V.customerId||!V.productId,onClick:G},` ثبت `,8,F)]),default:i(()=>[o(`label`,M,[r[7]||=p(`مشتری `,-1),u(E,{modelValue:V.customerId,"onUpdate:modelValue":r[1]||=e=>V.customerId=e,options:H.value},null,8,[`modelValue`,`options`])]),o(`label`,N,[r[8]||=p(`محصول `,-1),u(E,{modelValue:V.productId,"onUpdate:modelValue":r[2]||=e=>V.productId=e,options:U.value},null,8,[`modelValue`,`options`])]),o(`label`,P,[r[9]||=p(`یادداشت`,-1),a(o(`textarea`,{"onUpdate:modelValue":r[3]||=e=>V.note=e,class:`admin-input`,rows:`3`},null,512),[[v,V.note]])])]),_:1},8,[`open`])]))}}),[[`__scopeId`,`data-v-56e3e728`]]);export{I as default};
import{A as e,D as t,N as n,Q as r,U as i,W as a,c as o,d as s,et as c,g as l,h as u,jt as d,l as f,m as p,r as m,s as h,t as g}from"./_plugin-vue_export-helper-vx-p5QAT.js";import{a as _,d as v,t as y}from"./http-CTjL79ty.js";import{E as b,V as x,j as S,y as C}from"./index-BWgYBNME.js";import{t as w}from"./AdminPageSkeleton-DacAHji8.js";import{t as T}from"./BaseEmptyState-88fQ29rO.js";import{t as E}from"./AdminSelect-hgn_nYC2.js";var D={class:`admin-page`},O={class:`admin-page__head`},k={key:2,class:`admin-table`},A={class:`muted`,dir:`ltr`},j=[`onClick`],M={class:`field`},N={class:`field`},P={class:`field`},F=[`disabled`],I=g(l({__name:`SuggestionsView`,setup(l){let g=c([]),I=c(!0),L=c([]),R=c([]),z=c(!1),B=_(),V=r({customerId:``,productId:``,note:``}),H=h(()=>L.value.map(e=>({value:e.id,label:e.name?.trim()||e.phone}))),U=h(()=>R.value.map(e=>({value:e.id,label:`${e.name} (${e.productCode})`})));async function W(){I.value=!0;try{let[e,t,n]=await Promise.all([S.list(),C.list(),b.list()]);g.value=e,L.value=t,R.value=n}catch(e){B.error(e instanceof y?e.message:`بارگذاری ناموفق بود`)}finally{I.value=!1}}async function G(){try{await S.create({customerId:V.customerId,productId:V.productId,note:V.note.trim()||void 0}),z.value=!1,V.note=``,B.success(`پیشنهاد ثبت شد`),await W()}catch(e){B.error(e instanceof y?e.message:`ثبت ناموفق بود`)}}async function K(e){try{await S.setActive(e.id,!e.isActive),await W()}catch(e){B.error(e instanceof y?e.message:`به‌روزرسانی ناموفق بود`)}}return t(()=>{W()}),(t,r)=>(e(),s(`div`,D,[o(`header`,O,[r[5]||=o(`div`,null,[o(`h1`,null,`پیشنهاد محصول`),o(`p`,null,`پیشنهاد دستی محصول به مشتری`)],-1),o(`button`,{type:`button`,class:`admin-btn admin-btn--primary`,onClick:r[0]||=e=>z.value=!0},`پیشنهاد جدید`)]),I.value?(e(),f(w,{key:0,variant:`table`})):g.value.length?(e(),s(`table`,k,[r[6]||=o(`thead`,null,[o(`tr`,null,[o(`th`,null,`مشتری`),o(`th`,null,`محصول`),o(`th`,null,`یادداشت`),o(`th`,null,`وضعیت`),o(`th`)])],-1),o(`tbody`,null,[(e(!0),s(m,null,n(g.value,t=>(e(),s(`tr`,{key:t.id},[o(`td`,null,d(t.customerName),1),o(`td`,null,[p(d(t.productName)+` `,1),o(`span`,A,`(`+d(t.productCode)+`)`,1)]),o(`td`,null,d(t.note||`—`),1),o(`td`,null,d(t.isActive?`فعال`:`غیرفعال`),1),o(`td`,null,[o(`button`,{type:`button`,class:`link`,onClick:e=>K(t)},d(t.isActive?`غیرفعال`:`فعال`),9,j)])]))),128))])])):(e(),f(T,{key:1,title:`پیشنهادی ثبت نشده`})),u(x,{open:z.value,title:`پیشنهاد محصول`,onClose:r[4]||=e=>z.value=!1},{footer:i(()=>[o(`button`,{type:`button`,class:`admin-btn admin-btn--primary`,disabled:!V.customerId||!V.productId,onClick:G},` ثبت `,8,F)]),default:i(()=>[o(`label`,M,[r[7]||=p(`مشتری `,-1),u(E,{modelValue:V.customerId,"onUpdate:modelValue":r[1]||=e=>V.customerId=e,options:H.value},null,8,[`modelValue`,`options`])]),o(`label`,N,[r[8]||=p(`محصول `,-1),u(E,{modelValue:V.productId,"onUpdate:modelValue":r[2]||=e=>V.productId=e,options:U.value},null,8,[`modelValue`,`options`])]),o(`label`,P,[r[9]||=p(`یادداشت`,-1),a(o(`textarea`,{"onUpdate:modelValue":r[3]||=e=>V.note=e,class:`admin-input`,rows:`3`},null,512),[[v,V.note]])])]),_:1},8,[`open`])]))}}),[[`__scopeId`,`data-v-56e3e728`]]);export{I as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{l as e}from"./index-DWlOII4H.js";function t(t){return e(t).toLowerCase().replace(/ي/g,`ی`).replace(/ك/g,`ک`).normalize(`NFKC`).trim()}function n(e,n){let r=t(n);return!r||t(e).includes(r)}function r(e,t){let r=t.trim();return r?e.filter(e=>n(e.label,r)):e}function i(e,t){if(!e)return;let n=e.querySelectorAll(`[data-select-option]`);(t===`first`?n[0]:n[n.length-1])?.focus()}function a(e,t){let n=e.closest(`[data-select-menu]`);if(!n)return;let r=[...n.querySelectorAll(`[data-select-option]`)],i=r.indexOf(e);i<0||r[i+t]?.focus()}export{a as n,i as r,r as t};
import{l as e}from"./index-BWgYBNME.js";function t(t){return e(t).toLowerCase().replace(/ي/g,`ی`).replace(/ك/g,`ک`).normalize(`NFKC`).trim()}function n(e,n){let r=t(n);return!r||t(e).includes(r)}function r(e,t){let r=t.trim();return r?e.filter(e=>n(e.label,r)):e}function i(e,t){if(!e)return;let n=e.querySelectorAll(`[data-select-option]`);(t===`first`?n[0]:n[n.length-1])?.focus()}function a(e,t){let n=e.closest(`[data-select-menu]`);if(!n)return;let r=[...n.querySelectorAll(`[data-select-option]`)],i=r.indexOf(e);i<0||r[i+t]?.focus()}export{a as n,i as r,r as t};
+2 -2
View File
@@ -11,10 +11,10 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>پنل مدیریت | پارچه</title>
<script type="module" crossorigin src="/admin/assets/index-DWlOII4H.js"></script>
<script type="module" crossorigin src="/admin/assets/index-BWgYBNME.js"></script>
<link rel="modulepreload" crossorigin href="/admin/assets/_plugin-vue_export-helper-vx-p5QAT.js">
<link rel="modulepreload" crossorigin href="/admin/assets/http-CTjL79ty.js">
<link rel="stylesheet" crossorigin href="/admin/assets/index-Cc10RyA4.css">
<link rel="stylesheet" crossorigin href="/admin/assets/index-BsKtmxy-.css">
</head>
<body>
<div id="app"></div>