Files
nademitex_user/dist/assets/CategoriesView-CDaVb5Ku.js
T
safavimohadeseh78 bbb3a15d1c Polish customer app UI and streamline CRM overlays.
Replace standalone customer create and meeting report pages with overlays, add TimeInput, remove opaque input backgrounds app-wide, improve desktop layouts/skeletons, and refresh shopping, customer, and reminder screens.
2026-09-15 21:41:48 +03:30

1 line
8.4 KiB
JavaScript

import{Ct as e,E as t,Et as n,L as r,M as i,N as a,O as o,P as s,R as c,St as l,Tt as u,Y as d,Z as f,_ as p,et as m,j as h,mt as g,n as _,q as v,t as y,z as b}from"./BasicIcon-C6boaehV.js";import{b as x,i as S,o as C,s as ee,v as w,w as T}from"./index-DzzUgmYT.js";import{t as E}from"./IconChevronBack-DORV2H0q.js";import{t as D}from"./IconDiamond-Bgv1zgqc.js";import{t as O}from"./IconLayoutGrid-E-Q8Z5rF.js";import{t as k}from"./PageSkeleton-uO-jhbNm.js";import{t as A}from"./crm-CtglbPsN.js";import{t as te}from"./useGoBack-CgNp0uP9.js";import{t as ne}from"./IconSearch-DOnq8ybc.js";import{t as j}from"./IconShoppingBag-Bq21_Txe.js";var M=b({__name:`IconBolt`,props:{size:{default:24},strokeWidth:{default:1.5},color:{default:null}},setup(e){return(t,n)=>(d(),i(y,{icon:`vuesax-linear:flash`,size:e.size,"stroke-width":e.strokeWidth,color:e.color},null,8,[`size`,`stroke-width`,`color`]))}}),N=b({__name:`IconFeather`,props:{size:{default:24},strokeWidth:{default:1.5},color:{default:null}},setup(e){return(t,n)=>(d(),i(y,{icon:`vuesax-linear:pen-add`,size:e.size,"stroke-width":e.strokeWidth,color:e.color},null,8,[`size`,`stroke-width`,`color`]))}}),P=b({__name:`IconIdCard`,props:{size:{default:24},strokeWidth:{default:1.5},color:{default:null}},setup(e){return(t,n)=>(d(),i(y,{icon:`vuesax-linear:personalcard`,size:e.size,"stroke-width":e.strokeWidth,color:e.color},null,8,[`size`,`stroke-width`,`color`]))}}),F=[`width`,`height`],I=[`stroke`,`stroke-width`],L=[`stroke`,`stroke-width`],R=b({__name:`IconShirt`,props:{size:{default:24},color:{default:`currentColor`},strokeWidth:{default:1.5}},setup(e){return(t,n)=>(d(),s(`svg`,{width:e.size,height:e.size,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`},[h(`path`,{d:`M8.25 5.25 12 7.75l3.75-2.5 2.25 2.75L16 9.5V18.5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V9.5L6 8l2.25-2.75Z`,stroke:e.color,"stroke-width":e.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,I),h(`path`,{d:`M12 7.75V18.5`,stroke:e.color,"stroke-width":e.strokeWidth,"stroke-linecap":`round`},null,8,L)],8,F))}}),z=[`width`,`height`],B=[`stroke`,`stroke-width`],V=[`stroke`,`stroke-width`],H=[`stroke`,`stroke-width`],U=[`stroke`,`stroke-width`],W=b({__name:`IconSuit`,props:{size:{default:24},color:{default:`currentColor`},strokeWidth:{default:1.5}},setup(e){return(t,n)=>(d(),s(`svg`,{width:e.size,height:e.size,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`},[h(`path`,{d:`M7.5 5.5h9l2 3v10.5a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1V8.5l2-3Z`,stroke:e.color,"stroke-width":e.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,B),h(`path`,{d:`M12 5.5v13`,stroke:e.color,"stroke-width":e.strokeWidth,"stroke-linecap":`round`},null,8,V),h(`path`,{d:`M7.5 9 12 11.75 16.5 9`,stroke:e.color,"stroke-width":e.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,H),h(`path`,{d:`M10.25 5.5V4a1.75 1.75 0 0 1 3.5 0v1.5`,stroke:e.color,"stroke-width":e.strokeWidth,"stroke-linecap":`round`},null,8,U)],8,z))}}),G=[`width`,`height`],K=[`stroke`,`stroke-width`],q=[`stroke`,`stroke-width`],J=[`stroke`,`stroke-width`],Y={bolt:M,feather:N,diamond:D,grid:O,bag:j,"id-card":P,catalog:x,headset:w,home:T,shirt:R,suit:W,trousers:b({__name:`IconTrousers`,props:{size:{default:24},color:{default:`currentColor`},strokeWidth:{default:1.5}},setup(e){return(t,n)=>(d(),s(`svg`,{width:e.size,height:e.size,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`},[h(`path`,{d:`M8 4.5h8v4.25l-1.75 11H13l-1-9.5-1 9.5H7.75L6 8.75V4.5Z`,stroke:e.color,"stroke-width":e.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,K),h(`path`,{d:`M12 8.75v11`,stroke:e.color,"stroke-width":e.strokeWidth,"stroke-linecap":`round`},null,8,q),h(`path`,{d:`M8 7.25h8`,stroke:e.color,"stroke-width":e.strokeWidth,"stroke-linecap":`round`},null,8,J)],8,G))}})},X={shirt:`shirt`,suit:`suit`,trousers:`trousers`};function Z(e){return X[e.id]?X[e.id]:e.icon&&Y[e.icon]?e.icon:e.icon??`grid`}function Q(e,t=D){return e&&Y[e]||t}var re={class:`page categories-page`},ie={class:`cat-top`},ae={class:`cat-top__actions`},oe={class:`page__scroll page__scroll--with-nav cat-scroll`},se={key:0},ce={class:`usage-grid`},le=[`onClick`],ue={key:0,class:`usage-card__icon`},de={class:`usage-card__body`},fe={key:0},pe={key:1,class:`usage-card__link`},me={class:`season-stack`},he=[`onClick`],ge={class:`season-card__content`},_e={key:0,class:`season-card__title-row`},ve={key:0,class:`season-card__icon`},ye={key:1},be={key:1},$={key:2,class:`season-card__link`},xe={class:`feature-row`,"aria-label":`ویژگی‌ها`},Se={class:`feature-card`},Ce={class:`feature-card__icon`,"aria-hidden":`true`},we={class:`feature-card`},Te={class:`feature-card__icon`,"aria-hidden":`true`},Ee={class:`feature-card__icon`,"aria-hidden":`true`},De=_(b({__name:`CategoriesView`,setup(_){let y=p(),{goBack:b}=te(`/`),T=A(),O=g([]),j=g([]),M=g(!0),N=g(null);function P(e){return e.icon||(e.id===`summer`?`bolt`:e.id===`winter`?`feather`:`diamond`)}v(async()=>{try{let e=await T.loadCategories();O.value=e.usage,j.value=e.seasons}catch(e){N.value=e instanceof Error?e.message:`بارگذاری دسته‌ها ناموفق بود.`}finally{M.value=!1}});function F(e){y.push({path:`/products`,query:{categoryId:e}})}function I(e){y.push({path:`/products`,query:{season:e}})}return(p,g)=>(d(),s(`div`,re,[h(`header`,ie,[h(`button`,{type:`button`,class:`icon-btn`,"aria-label":`بازگشت`,onClick:g[0]||=(...e)=>l(b)&&l(b)(...e)},[c(E,{size:20})]),g[5]||=h(`h1`,{class:`cat-top__title`},`دسته‌بندی‌ها`,-1),h(`div`,ae,[c(S,{variant:`inline`}),h(`button`,{type:`button`,class:`icon-btn`,"aria-label":`جستجو`,onClick:g[1]||=e=>l(y).push({path:`/products`,query:{q:``}})},[c(ne,{size:20})]),h(`button`,{type:`button`,class:`icon-btn`,"aria-label":`اعلان‌ها`,onClick:g[2]||=e=>l(y).push(`/profile/notifications`)},[c(ee,{size:20})])])]),h(`div`,oe,[N.value?(d(),s(`p`,se,n(N.value),1)):M.value?(d(),i(k,{key:1,variant:`grid`})):(d(),s(o,{key:2},[h(`section`,null,[g[6]||=h(`h2`,{class:`block-title`},`انتخاب بر اساس کاربرد`,-1),g[7]||=h(`p`,{class:`block-sub`},`دسته موردنظر خود را انتخاب کنید`,-1),h(`div`,ce,[(d(!0),s(o,null,f(O.value,t=>(d(),s(`button`,{key:t.id,type:`button`,class:`usage-card`,onClick:e=>F(t.id)},[h(`div`,{class:e([`usage-card__image`,`usage-card__image--${t.id}`]),style:u(t.imageUrl?{backgroundImage:`url(${t.imageUrl})`}:void 0)},[t.showIcon===!1?a(``,!0):(d(),s(`span`,ue,[(d(),i(m(l(Q)(l(Z)(t),x)),{size:18}))]))],6),h(`div`,de,[t.showTitle===!1?a(``,!0):(d(),s(`strong`,fe,n(t.title),1)),t.showSubtitle===!1?a(``,!0):(d(),s(`span`,pe,[r(n(t.subtitle||`مشاهده محصولات`)+` `,1),c(C,{size:14})]))])],8,le))),128))])]),h(`section`,null,[g[8]||=h(`h2`,{class:`block-title`},`انتخاب بر اساس فصل`,-1),g[9]||=h(`p`,{class:`block-sub`},`بر اساس فصل مناسب، پارچه دلخواه را پیدا کنید`,-1),h(`div`,me,[(d(!0),s(o,null,f(j.value,t=>(d(),s(`button`,{key:t.id,type:`button`,class:e([`season-card`,[`season-card--${t.id}`,{"season-card--banner":!!t.imageUrl}]]),style:u(t.imageUrl?{backgroundImage:`url(${t.imageUrl})`}:void 0),onClick:e=>I(t.id)},[h(`div`,ge,[t.showTitle!==!1||t.showIcon!==!1?(d(),s(`div`,_e,[t.showIcon===!1?a(``,!0):(d(),s(`span`,ve,[(d(),i(m(l(Q)(P(t),D)),{size:16}))])),t.showTitle===!1?a(``,!0):(d(),s(`strong`,ye,n(t.title),1))])):a(``,!0),t.showDescription===!1?a(``,!0):(d(),s(`p`,be,n(t.description),1)),t.showCta===!1?a(``,!0):(d(),s(`span`,$,[r(n(t.ctaLabel||`مشاهده محصولات`)+` `,1),c(C,{size:14})]))])],14,he))),128))])]),h(`section`,xe,[h(`div`,Se,[h(`span`,Ce,[c(w,{size:22})]),g[10]||=h(`div`,{class:`feature-card__text`},[h(`strong`,null,`پشتیبانی اختصاصی`),h(`span`,null,`در کنار شما هستیم`)],-1)]),h(`div`,we,[h(`span`,Te,[c(D,{size:22})]),g[11]||=h(`div`,{class:`feature-card__text`},[h(`strong`,null,`مزایای مشتریان ویژه`),h(`span`,null,`بر اساس سطح شما`)],-1)]),h(`div`,{class:`feature-card feature-card--link`,role:`button`,tabindex:`0`,onClick:g[3]||=e=>l(y).push(`/catalog-request`),onKeydown:g[4]||=t(e=>l(y).push(`/catalog-request`),[`enter`])},[h(`span`,Ee,[c(x,{size:22})]),g[12]||=h(`div`,{class:`feature-card__text`},[h(`strong`,null,`درخواست کالیته فیزیکی`),h(`span`,null,`کالیته را دریافت کنید`)],-1)],32)])],64))])]))}}),[[`__scopeId`,`data-v-df02ce6e`]]);export{De as default};