@infuro/cms-core 1.0.43 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.cjs +557 -416
- package/dist/admin.d.cts +1 -1
- package/dist/admin.d.ts +1 -1
- package/dist/admin.js +557 -416
- package/dist/api.cjs +32 -32
- package/dist/api.d.cts +2 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +1 -1
- package/dist/{chunk-SCPKMZG5.cjs → chunk-F5XFHYTG.cjs} +924 -290
- package/dist/{chunk-IX7X4ILO.js → chunk-MVXLRANV.js} +921 -292
- package/dist/index.cjs +241 -201
- package/dist/index.d.cts +42 -7
- package/dist/index.d.ts +42 -7
- package/dist/index.js +21 -2
- package/dist/migrations/1781800000000-CustomerPhoneNullable.ts +53 -0
- package/package.json +1 -1
package/dist/admin.cjs
CHANGED
|
@@ -261,111 +261,6 @@ var init_infuro_favicon = __esm({
|
|
|
261
261
|
INFURO_FAVICON_BASE64 = "data:image/x-icon;base64,AAABAAMAEBAAAAEAIABoBAAANgAAACAgAAABACAAKBEAAJ4EAAAwMAAAAQAgAGgmAADGFQAAKAAAABAAAAAgAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8V////bv///7D////R////0f///7D///9u////FQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wL///9s0qun7q9qYv/DkYv/6tfV///+/v///////////////+7///9r////AgAAAAAAAAAAAAAAAP///wL///+Q/////sqcl/+WOzH/ljsx/5c9M//AiYP/+/j4/////////////////v///5D///8CAAAAAAAAAAD///9s/////v/////Oo5//lz00/5Y7Mf+WOzH/ljsx/7Z3cP/9+/v////////////////+////bAAAAAD///8V////7v///////////v39//Tq6f/QqKP/m0U8/5Y7Mf+WOzH/z6ah/////////////////////+7///8V////bv///////////////////////////////+XOy/+ZQTf/ljsx/59MQ//69fX/////////////////////bv///7D/////////////////////////////////////wYyG/5Y7Mf+WOzH/4MTC/////////////////////7D////R//////////////////7+//79/f/+/f3//v39/+DGw/+WOzH/ljsx/82inf/////////////////////R////0f///////////////9Svq/+mWVH/pllR/6ZZUf+iUUj/ljsx/5Y7Mf/KnJf/////////////////////0f///7D////////////////KnJf/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/062p/////////////////////7D///9u////////////////0amk/6FQSP+hUEj/oVBI/6JRSP+mWVH/plpS/+7g3v////////////////////9u////Ff///+7///////////7+/v/9/Pz/9u7t/8SSjP/Dj4r/9ezr//79/f/////////////////////u////FQAAAAD///9s/////v///////////////8OPif+WOzH/ljsx/7+Jgv/////////////////////+////bAAAAAAAAAAA////Av///5D////+//////////+9hH7/ljsx/5Y7Mf+8g3z////////////////+////kP///wIAAAAAAAAAAAAAAAD///8C////bP///+7/////8OTi/7R0bP+zcmr/8OLh///////////u////bP///wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8V////bv///7D////R////0f///7D///9u////FQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAACAAAABAAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8C////Hf///0n///95////mf///67///+u////mf///3n///9J////Hf///wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8I////Tf///7D////p/////v////////////////////////////////////7////p////sP///03///8IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8C////Pfjz8r7HlpH7wY2H/86lof/iysf/9e3s///+/v//////////////////////////////////////////+////77///89////AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////Cf///37////z9Ovq/6BORf+WOzH/ljsx/5Y8Mv+hUEf/v4iC/+rY1v/+/f3///////////////////////////////////////////H///99////CQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wr///+d/////P/////06+r/oE5F/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/m0Q7/8WTjf/38PD///////////////////////////////////////////z///+d////CgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8J////nf////3///////////Tr6v+gTkX/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/61mX//w4+L///////////////////////////////////////////3///+d////CQAAAAAAAAAAAAAAAAAAAAAAAAAA////Av///37////8////////////////9Ovq/6BORf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/6daUv/v4uD///////////////////////////////////////////z///9+////AgAAAAAAAAAAAAAAAAAAAAD///89////8//////////////////////48fD/rGRc/5pCOf+YPjT/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/6xkXf/37+////////////////////////////////////////////P///89AAAAAAAAAAAAAAAA////CP///77////////////////////////////////7+Pf/8eXj/+DGw/++hn//m0U8/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/8GLhf/9/Pz//////////////////////////////////////////77///8IAAAAAAAAAAD///9N////+/////////////////////////////////////////////////7+/v/p1tP/rGRd/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/mkI4/+XPzf//////////////////////////////////////////+////00AAAAA////Av///7D////////////////////////////////////////////////////////////////06+r/r2pi/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/tndw//38+///////////////////////////////////////////sP///wL///8d////6f/////////////////////////////////////////////////////////////////////x5eP/olJJ/5Y7Mf+WOzH/ljsx/5Y7Mf+aQjn/7dza///////////////////////////////////////////p////Hf///0n////+///////////////////////////////////////////////////////////////////////////Ur6v/ljwy/5Y7Mf+WOzH/ljsx/5Y7Mf/Oo5////////////////////////////////////////////7///9J////ef////////////////////////////////////////////////////////////////////////////////fw7/+jVEv/ljsx/5Y7Mf+WOzH/ljsx/7Nxav///////////////////////////////////////////////3n///+Z/////////////////////////////////////////////////////////////////////////////////////7yCfP+WOzH/ljsx/5Y7Mf+WOzH/pllQ//r29f//////////////////////////////////////////mf///67///////////////////////////////////////////79/f/9/Pz//fz8//38/P/9/Pz//fz8//38/P/9/Pz/yZuW/5Y7Mf+WOzH/ljsx/5Y7Mf+gT0b/9evr//////////////////////////////////////////+u////rv/////////////////////////////////////69vb/wo2I/7Z3cf+2d3H/tndx/7Z3cf+2d3H/tndx/7Z3cf+lV0//ljsx/5Y7Mf+WOzH/ljsx/6BORf/06+r//////////////////////////////////////////67///+Z//////////////////////////////////////Tr6v+gTkX/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/oE5F//Tr6v//////////////////////////////////////////mf///3n/////////////////////////////////////9Ovq/6BORf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+lVk7/+fPz//////////////////////////////////////////95////Sf////7////////////////////////////////06+r/oE5F/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/7FuZ////v7//////////////////////////////////////v///0n///8d////6f////////////////////////////////Tr6v+gTkX/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/zKCb///////////////////////////////////////////p////Hf///wL///+w////////////////////////////////+PLx/7d4cf+tZl//rWZf/61mX/+tZl//rWZf/61mX/+tZl//rmdg/7Z3cP+2d3H/tndx/7h7df/w4uH//////////////////////////////////////////7D///8CAAAAAP///03////7/////////////////////////////////Pv6//z6+f/8+vn//Pr5//z6+f/z6un/48zJ/+LKx//y5+b//fz8//38/P/9/Pz//fz8///////////////////////////////////////////7////TQAAAAAAAAAA////CP///77/////////////////////////////////////////////////////4MXC/6VXTv+WPDL/ljwy/6JRSP/aubb///7+/////////////////////////////////////////////////////77///8IAAAAAAAAAAAAAAAA////Pf////P///////////////////////////////////////////Xs6/+jU0r/ljsx/5Y7Mf+WOzH/ljsx/59MQv/w5OL////////////////////////////////////////////////z////PQAAAAAAAAAAAAAAAAAAAAD///8C////fv////z/////////////////////////////////////3sK//5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/9m5tf///////////////////////////////////////////P///37///8CAAAAAAAAAAAAAAAAAAAAAAAAAAD///8J////nf////3////////////////////////////////ZuLX/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/17Sw//////////////////////////////////////3///+d////CQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8K////nf////z//////////////////////////+zc2v+aQzn/ljsx/5Y7Mf+WOzH/ljsx/5pDOf/r2tj////////////////////////////////8////nf///woAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8J////fv////P//////////////////////v39/8eYkv+YPjT/ljsx/5Y7Mf+YPjT/xpSP//79/f//////////////////////////8////37///8JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8C////Pf///77////7/////////////////fv6/+DEwf/Ekoz/wY2H/97Bvv/8+vr/////////////////////+////77///89////AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////CP///03///+w////6f////7////////////////////////////////////+////6f///7D///9N////CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wL///8d////Sf///3n///+Z////rv///67///+Z////ef///0n///8d////AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAADAAAABgAAAAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8E////DP///xr///80////Rv///1n///9q////gP///4D///9q////Wf///0b///80////Gv///wz///8EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////CP///y7///9g////lP///7v////V////6P////r////8/////P////z////8////+v///+j////V////u////5T///9g////Lv///wgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wf///81////k////8/////v////+v////////////////////////////////////////////////////////////////////r////v////z////5P///81////BwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8G////Kv37+3zt3Nrd27y5/Nm6t//fxMH/59LQ//Dk4v/48vH//fv6//////////////////////////////////////////////////////////////////////z////d////fP///yr///8GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///xH///9g////wvz5+ffNop3+m0U8/5c+NP+cRz7/pFVN/65oYP+8gnv/0qun/+jU0v/59fT//v7+///////////////////////////////////////////////////////////+////9////8L///9f////EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////GP///4n////m/////fv4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+XPTT/m0Q6/6ZaUf/BjIX/6NXT//z5+f////////////////////////////////////////////////////////////////3////k////if///xgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wH///8i////pP////f///////////v4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+XPjT/oVFI/8yhnP/x5OP//vz8////////////////////////////////////////////////////////////////9////6T///8i////AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///yL///+d////8/////////////////v4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5tEOv+3eHL/48rH//37+/////////////////////////////////////////////////////////////////P///+d////IgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////GP///6T////z//////////////////////v4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+YPjT/qFxT/9y+uv/9+vr////////////////////////////////////////////////////////////////z////pP///xgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8R////if////f///////////////////////////v4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsy/6NUS//Yt7P//Pn4////////////////////////////////////////////////////////////////9////4n///8RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wb///9g////5v////////////////////////////////v4+P/KnZj/mUI4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5c8Mv+pXlb/38PA//38/P///////////////////////////////////////////////////////////////+b///9g////BgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///yr////C/////f////////////////////////////////38+//dwLz/qF1V/51JP/+bRDv/mD40/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+XPTP/qWBY/+vZ2P///v7///////////////////////////////////////////////////////////3////C////KgAAAAAAAAAAAAAAAAAAAAAAAAAA////B////3z////3///////////////////////////////////////////9+/r/9/Dv/+zc2f/dwLz/x5iT/7BrY/+eS0H/lz0z/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/lzwy/7d6c//06un////////////////////////////////////////////////////////////////3////fP///wcAAAAAAAAAAAAAAAAAAAAA////Nf///93////+//////////////////////////////////////////////////////7+/v/+/v7//fz8//Hm5f/XtLH/s3Fq/5lCOP+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/51JP//Sq6b//Pn5///////////////////////////////////////////////////////////+////3f///zUAAAAAAAAAAAAAAAD///8I////k/////z////////////////////////////////////////////////////////////////////////////////9+/v/8eTj/8aVkP+dRz7/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5c8Mv+vamL/7uDf/////////////////////////////////////////////////////////////////P///5P///8IAAAAAAAAAAD///8u////z/////////////////////////////////////////////////////////////////////////////////////////////////fx8P/ImZP/nUg//5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+ZQTj/0qyo//38/P///////////////////////////////////////////////////////////////8////8uAAAAAP///wT///9g////7//////////////////////////////////////////////////////////////////////////////////////////////////////07Or/xJGL/5hAN/+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/rGRd//Tq6P///////////////////////////////////////////////////////////////+////9g////BP///wz///+U////+v////////////////////////////////////////////////////////////////////////////////////////////////////////7/8+jm/7Nya/+WPDP/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/mkQ7/9m3s////v7///////////////////////////////////////////////////////////r///+U////DP///xr///+7/////////////////////////////////////////////////////////////////////////////////////////////////////////////////v7+/+HHxP+hUEf/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljwy/7yBe//69/f///////////////////////////////////////////////////////////////+7////Gv///zT////V//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////bu7f+7gHr/mD40/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/6xkXP/u4N/////////////////////////////////////////////////////////////////V////NP///0b////o//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////38/P/XtK//nEY9/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/6BNRP/iycb////////////////////////////////////////////////////////////////o////Rv///1n////6///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////o1NL/pVhQ/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5xGPP/Yt7L//v39///////////////////////////////////////////////////////////6////Wf///2r////8///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////06un/sW1m/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5pDOf/PpKD//Pr5///////////////////////////////////////////////////////////8////av///4D////8/////////////////////////////////////////////////////////////v7//fv7//37+v/9+/r//fv6//37+v/9+/r//fv6//37+v/9+/r//fv6//37+v/06un/snBp/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5lBOP/KnJj/+/j4///////////////////////////////////////////////////////////8////gP///4D////8//////////////////////////////////////////////////////79/f/s3Nr/z6ej/8uemv/Lnpr/y56a/8uemv/Lnpr/y56a/8uemv/Lnpr/y56a/8uemv/GlI//o1VM/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5lBOP/KnJf/+/j4///////////////////////////////////////////////////////////8////gP///2r////8//////////////////////////////////////////////////////z5+f/Nop3/m0Q7/5Y8Mv+WPDL/ljwy/5Y8Mv+WPDL/ljwy/5Y8Mv+WPDL/ljwy/5Y8Mv+WPDL/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5lBOP/KnJf/+/j4///////////////////////////////////////////////////////////8////av///1n////6//////////////////////////////////////////////////////v4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5lCOP/KnZj/+/j4///////////////////////////////////////////////////////////6////Wf///0b////o//////////////////////////////////////////////////////v4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5pDOv/Qp6P//Pr6///////////////////////////////////////////////////////////o////Rv///zT////V//////////////////////////////////////////////////////v4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/51IP//bvbr//v7+///////////////////////////////////////////////////////////V////NP///xr///+7//////////////////////////////////////////////////////v4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/6RVTf/n0c////////////////////////////////////////////////////////////////+7////Gv///wz///+U////+v////////////////////////////////////////////////v4+P/KnJf/mUE4/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/7FuZ//z6ej///////////////////////////////////////////////////////////r///+U////DP///wT///9g////7/////////////////////////////////////////////////z4+P/LnZj/mkI5/5Y8Mv+WPDL/ljwy/5Y8Mv+WPDL/ljwy/5Y8Mv+WPDL/ljwy/5Y8Mv+WPDL/ljwy/5Y8Mv+WPDL/ljwy/5Y8Mv+WPDL/mUE3/8mblf/9+/r//////////////////////////////////////////////////////////+////9g////BAAAAAD///8u////z/////////////////////////////////////////////////38/P/iycb/v4iC/7yCfP+8gnz/vIJ8/7yCfP+8gnz/vIJ8/7yCfP+8gnz/vIJ8/7yCfP+8gnz/voR+/8qcl//Lnpr/y56a/8uemv/Lnpr/zqOf//Hl5P///v7//////////////////////////////////////////////////////////8////8uAAAAAAAAAAD///8I////k/////z////////////////////////////////////////////////9/Pz/+vf2//r39v/69/b/+vf2//r39v/69/b/+vf2//j08//07Ov/7+Df/+7f3v/z6+n/+PPy//z6+v/9+/r//fv6//37+v/9+/r//fv7///+/v///////////////////////////////////////////////////////////P///5P///8IAAAAAAAAAAAAAAAA////Nf///93////+/////////////////////////////////////////////////////////////////////////////v7/9u7t/9i3s/++hn//sW1m/7BsZf+7gnv/066q//Ln5v/+/v7////////////////////////////////////////////////////////////////////////////////+////3f///zUAAAAAAAAAAAAAAAAAAAAA////B////3z////3///////////////////////////////////////////////////////////////////////////17Ov/wo6I/55KQf+XPjT/ljsx/5Y7Mf+XPTP/nEY9/7uBe//x5eP////////////////////////////////////////////////////////////////////////////////3////fP///wcAAAAAAAAAAAAAAAAAAAAAAAAAAP///yr////C/////f////////////////////////////////////////////////////////////////37+//UsKz/nUg//5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5tEO//No57/+/j4//////////////////////////////////////////////////////////////////////3////C////KgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wb///9g////5v////////////////////////////////////////////////////////////////bv7/+5fHb/lz0z/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y8Mv+ycGj/8ujm/////////////////////////////////////////////////////////////////////+b///9g////BgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8R////if////f//////////////////////////////////////////////////////////+3e3P+qYlr/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+oXVT/6tnX////////////////////////////////////////////////////////////////9////4n///8RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////GP///6T////z/////////////////////////////////////////////////////+vZ1/+oXVT/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+nWlL/6dbU///////////////////////////////////////////////////////////z////pP///xgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///yL///+d////8/////////////////////////////////////////////////Hm5f+wa2T/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5Y7Mf+uaGD/8OPh//////////////////////////////////////////////////////P///+d////IgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wH///8i////pP////f///////////////////////////////////////////r19P/CjYf/mD81/5Y7Mf+WOzH/ljsx/5Y7Mf+WOzH/ljsx/5g/Nf/BjIb/+fTz////////////////////////////////////////////////9////6T///8i////AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////GP///4n////m/////f////////////////////////////////7+/v/m0M7/qmFZ/5c9M/+WOzH/ljsx/5Y7Mf+WOzH/lz0z/6leV//lz8z//v7+//////////////////////////////////////3////m////if///xgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///xH///9g////wv////f////+///////////////////////////8+vr/4snG/7d4cf+iUUj/mUA3/5c+NP+gTkT/tXVu/+DFw//8+fn////////////////////////////////+////9////8L///9g////EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8G////Kv///3z////d/////P///////////////////////////v38//Tr6v/kzcv/2726/9m6t//jysf/8uno//78/P////////////////////////////////z////d////fP///yr///8GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wf///81////k////8/////v////+v////////////////////////////////////////////////////////////////////r////v////z////5P///81////BwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////CP///y7///9g////lP///7v////V////6P////r////8/////P////z////8////+v///+j////V////u////5T///9g////Lv///wgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8E////DP///xr///80////Rv///1n///9q////gP///4D///9q////Wf///0b///80////Gv///wz///8EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==";
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
-
function AdminHeader() {
|
|
265
|
-
const { data: session } = react.useSession();
|
|
266
|
-
const sessionUser = session?.user;
|
|
267
|
-
const roleLabel = sessionUser?.groupName?.trim() || (sessionUser?.isRBACAdmin ? "Administrator" : "Admin user");
|
|
268
|
-
const isMobile = useIsMobile();
|
|
269
|
-
const configuredLogo = process.env.NEXT_PUBLIC_ADMIN_LOGO_URL || DEFAULT_ADMIN_LOGO;
|
|
270
|
-
const [logoSrc, setLogoSrc] = React26.useState(configuredLogo);
|
|
271
|
-
const [logoFailed, setLogoFailed] = React26.useState(false);
|
|
272
|
-
const isDataLogo = React26.useMemo(() => logoSrc.startsWith("data:"), [
|
|
273
|
-
logoSrc
|
|
274
|
-
]);
|
|
275
|
-
const handleLogout = /* @__PURE__ */ __name(() => {
|
|
276
|
-
void adminSignOut();
|
|
277
|
-
}, "handleLogout");
|
|
278
|
-
return /* @__PURE__ */ React.createElement("header", {
|
|
279
|
-
className: "bg-white border-b border-gray-200 px-4 py-2"
|
|
280
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
281
|
-
className: "flex items-center justify-between"
|
|
282
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
283
|
-
className: "flex items-center max-h-9 shrink-0"
|
|
284
|
-
}, !logoFailed ? /* @__PURE__ */ React.createElement(Image__default.default, {
|
|
285
|
-
src: logoSrc,
|
|
286
|
-
alt: "Admin",
|
|
287
|
-
width: 120,
|
|
288
|
-
height: 34,
|
|
289
|
-
className: "max-h-9 w-auto object-contain object-left",
|
|
290
|
-
unoptimized: isDataLogo,
|
|
291
|
-
onError: /* @__PURE__ */ __name(() => {
|
|
292
|
-
if (logoSrc !== DEFAULT_ADMIN_LOGO) {
|
|
293
|
-
setLogoSrc(DEFAULT_ADMIN_LOGO);
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
setLogoFailed(true);
|
|
297
|
-
}, "onError")
|
|
298
|
-
}) : /* @__PURE__ */ React.createElement("div", {
|
|
299
|
-
className: "flex items-center gap-2"
|
|
300
|
-
}, /* @__PURE__ */ React.createElement(Image__default.default, {
|
|
301
|
-
src: INFURO_FAVICON_BASE64,
|
|
302
|
-
alt: "Infuro",
|
|
303
|
-
width: 18,
|
|
304
|
-
height: 18,
|
|
305
|
-
unoptimized: true
|
|
306
|
-
}), /* @__PURE__ */ React.createElement("span", {
|
|
307
|
-
className: "text-sm font-semibold text-gray-800"
|
|
308
|
-
}, "Infuro"))), /* @__PURE__ */ React.createElement("div", {
|
|
309
|
-
className: "flex items-center space-x-3"
|
|
310
|
-
}, /* @__PURE__ */ React.createElement(DropdownMenu, null, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, {
|
|
311
|
-
asChild: true
|
|
312
|
-
}, /* @__PURE__ */ React.createElement(Button, {
|
|
313
|
-
variant: "ghost",
|
|
314
|
-
className: isMobile ? "p-1.5 hover:bg-gray-100 rounded-md transition-colors text-gray-700" : "flex items-center space-x-2 px-2 py-1.5 hover:bg-gray-100 rounded-md transition-colors text-gray-700"
|
|
315
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
316
|
-
className: "h-7 w-7 rounded-full bg-gray-700 flex items-center justify-center overflow-hidden relative"
|
|
317
|
-
}, session?.user?.image ? /* @__PURE__ */ React.createElement(Image__default.default, {
|
|
318
|
-
src: session.user.image,
|
|
319
|
-
alt: session?.user?.name || "User",
|
|
320
|
-
fill: true,
|
|
321
|
-
className: "object-cover"
|
|
322
|
-
}) : /* @__PURE__ */ React.createElement("span", {
|
|
323
|
-
className: "text-xs font-medium text-gray-100"
|
|
324
|
-
}, session?.user?.name?.charAt(0).toUpperCase() || session?.user?.email?.charAt(0).toUpperCase() || "A")), !isMobile && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
325
|
-
className: "flex flex-col items-start"
|
|
326
|
-
}, /* @__PURE__ */ React.createElement("span", {
|
|
327
|
-
className: "text-[13px] font-medium text-gray-900"
|
|
328
|
-
}, session?.user?.name || session?.user?.email || "Admin"), /* @__PURE__ */ React.createElement("span", {
|
|
329
|
-
className: "text-[11px] text-gray-500"
|
|
330
|
-
}, roleLabel)), /* @__PURE__ */ React.createElement(LucideIcons.ChevronDown, {
|
|
331
|
-
className: "h-3.5 w-3.5 text-gray-400"
|
|
332
|
-
})))), /* @__PURE__ */ React.createElement(DropdownMenuContent, {
|
|
333
|
-
align: "end",
|
|
334
|
-
className: "w-56"
|
|
335
|
-
}, /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
336
|
-
asChild: true
|
|
337
|
-
}, /* @__PURE__ */ React.createElement(Link2__default.default, {
|
|
338
|
-
href: "/admin/profile",
|
|
339
|
-
className: "flex items-center text-gray-600"
|
|
340
|
-
}, /* @__PURE__ */ React.createElement(LucideIcons.User, {
|
|
341
|
-
className: "mr-2 h-4 w-4"
|
|
342
|
-
}), "Profile")), /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
343
|
-
asChild: true
|
|
344
|
-
}, /* @__PURE__ */ React.createElement(Link2__default.default, {
|
|
345
|
-
href: "/admin/settings",
|
|
346
|
-
className: "flex items-center text-gray-600"
|
|
347
|
-
}, /* @__PURE__ */ React.createElement(LucideIcons.Settings, {
|
|
348
|
-
className: "mr-2 h-4 w-4"
|
|
349
|
-
}), "Settings")), /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
350
|
-
onClick: handleLogout,
|
|
351
|
-
className: "text-red-600"
|
|
352
|
-
}, /* @__PURE__ */ React.createElement(LucideIcons.LogOut, {
|
|
353
|
-
className: "mr-2 h-4 w-4"
|
|
354
|
-
}), "Sign Out"))))));
|
|
355
|
-
}
|
|
356
|
-
var DEFAULT_ADMIN_LOGO;
|
|
357
|
-
var init_Header = __esm({
|
|
358
|
-
"src/components/Admin/Header.tsx"() {
|
|
359
|
-
"use client";
|
|
360
|
-
init_client_sign_out();
|
|
361
|
-
init_button();
|
|
362
|
-
init_dropdown_menu();
|
|
363
|
-
init_use_mobile();
|
|
364
|
-
init_infuro_favicon();
|
|
365
|
-
DEFAULT_ADMIN_LOGO = "/images/logo/logo.png";
|
|
366
|
-
__name(AdminHeader, "AdminHeader");
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
264
|
|
|
370
265
|
// src/auth/permission-entities.ts
|
|
371
266
|
function isSuperAdminGroupName(name) {
|
|
@@ -473,6 +368,113 @@ var init_vendor_scope = __esm({
|
|
|
473
368
|
__name(canOnboardVendors, "canOnboardVendors");
|
|
474
369
|
}
|
|
475
370
|
});
|
|
371
|
+
function AdminHeader() {
|
|
372
|
+
const { data: session } = react.useSession();
|
|
373
|
+
const sessionUser = session?.user;
|
|
374
|
+
const roleLabel = sessionUser?.groupName?.trim() || (sessionUser?.isRBACAdmin ? "Administrator" : "Admin user");
|
|
375
|
+
const isVendor = isVendorPortalUser(sessionUser);
|
|
376
|
+
const isMobile = useIsMobile();
|
|
377
|
+
const configuredLogo = process.env.NEXT_PUBLIC_ADMIN_LOGO_URL || DEFAULT_ADMIN_LOGO;
|
|
378
|
+
const [logoSrc, setLogoSrc] = React26.useState(configuredLogo);
|
|
379
|
+
const [logoFailed, setLogoFailed] = React26.useState(false);
|
|
380
|
+
const isDataLogo = React26.useMemo(() => logoSrc.startsWith("data:"), [
|
|
381
|
+
logoSrc
|
|
382
|
+
]);
|
|
383
|
+
const handleLogout = /* @__PURE__ */ __name(() => {
|
|
384
|
+
void adminSignOut();
|
|
385
|
+
}, "handleLogout");
|
|
386
|
+
return /* @__PURE__ */ React.createElement("header", {
|
|
387
|
+
className: "bg-white border-b border-gray-200 px-4 py-2"
|
|
388
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
389
|
+
className: "flex items-center justify-between"
|
|
390
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
391
|
+
className: "flex items-center max-h-9 shrink-0"
|
|
392
|
+
}, !logoFailed ? /* @__PURE__ */ React.createElement(Image__default.default, {
|
|
393
|
+
src: logoSrc,
|
|
394
|
+
alt: "Admin",
|
|
395
|
+
width: 120,
|
|
396
|
+
height: 34,
|
|
397
|
+
className: "max-h-9 w-auto object-contain object-left",
|
|
398
|
+
unoptimized: isDataLogo,
|
|
399
|
+
onError: /* @__PURE__ */ __name(() => {
|
|
400
|
+
if (logoSrc !== DEFAULT_ADMIN_LOGO) {
|
|
401
|
+
setLogoSrc(DEFAULT_ADMIN_LOGO);
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
setLogoFailed(true);
|
|
405
|
+
}, "onError")
|
|
406
|
+
}) : /* @__PURE__ */ React.createElement("div", {
|
|
407
|
+
className: "flex items-center gap-2"
|
|
408
|
+
}, /* @__PURE__ */ React.createElement(Image__default.default, {
|
|
409
|
+
src: INFURO_FAVICON_BASE64,
|
|
410
|
+
alt: "Infuro",
|
|
411
|
+
width: 18,
|
|
412
|
+
height: 18,
|
|
413
|
+
unoptimized: true
|
|
414
|
+
}), /* @__PURE__ */ React.createElement("span", {
|
|
415
|
+
className: "text-sm font-semibold text-gray-800"
|
|
416
|
+
}, "Infuro"))), /* @__PURE__ */ React.createElement("div", {
|
|
417
|
+
className: "flex items-center space-x-3"
|
|
418
|
+
}, /* @__PURE__ */ React.createElement(DropdownMenu, null, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, {
|
|
419
|
+
asChild: true
|
|
420
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
421
|
+
variant: "ghost",
|
|
422
|
+
className: isMobile ? "p-1.5 hover:bg-gray-100 rounded-md transition-colors text-gray-700" : "flex items-center space-x-2 px-2 py-1.5 hover:bg-gray-100 rounded-md transition-colors text-gray-700"
|
|
423
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
424
|
+
className: "h-7 w-7 rounded-full bg-gray-700 flex items-center justify-center overflow-hidden relative"
|
|
425
|
+
}, session?.user?.image ? /* @__PURE__ */ React.createElement(Image__default.default, {
|
|
426
|
+
src: session.user.image,
|
|
427
|
+
alt: session?.user?.name || "User",
|
|
428
|
+
fill: true,
|
|
429
|
+
className: "object-cover"
|
|
430
|
+
}) : /* @__PURE__ */ React.createElement("span", {
|
|
431
|
+
className: "text-xs font-medium text-gray-100"
|
|
432
|
+
}, session?.user?.name?.charAt(0).toUpperCase() || session?.user?.email?.charAt(0).toUpperCase() || "A")), !isMobile && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
433
|
+
className: "flex flex-col items-start"
|
|
434
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
435
|
+
className: "text-[13px] font-medium text-gray-900"
|
|
436
|
+
}, session?.user?.name || session?.user?.email || "Admin"), /* @__PURE__ */ React.createElement("span", {
|
|
437
|
+
className: "text-[11px] text-gray-500"
|
|
438
|
+
}, roleLabel)), /* @__PURE__ */ React.createElement(LucideIcons.ChevronDown, {
|
|
439
|
+
className: "h-3.5 w-3.5 text-gray-400"
|
|
440
|
+
})))), /* @__PURE__ */ React.createElement(DropdownMenuContent, {
|
|
441
|
+
align: "end",
|
|
442
|
+
className: "w-56"
|
|
443
|
+
}, !isVendor && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
444
|
+
asChild: true
|
|
445
|
+
}, /* @__PURE__ */ React.createElement(Link2__default.default, {
|
|
446
|
+
href: "/admin/profile",
|
|
447
|
+
className: "flex items-center text-gray-600"
|
|
448
|
+
}, /* @__PURE__ */ React.createElement(LucideIcons.User, {
|
|
449
|
+
className: "mr-2 h-4 w-4"
|
|
450
|
+
}), "Profile")), /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
451
|
+
asChild: true
|
|
452
|
+
}, /* @__PURE__ */ React.createElement(Link2__default.default, {
|
|
453
|
+
href: "/admin/settings",
|
|
454
|
+
className: "flex items-center text-gray-600"
|
|
455
|
+
}, /* @__PURE__ */ React.createElement(LucideIcons.Settings, {
|
|
456
|
+
className: "mr-2 h-4 w-4"
|
|
457
|
+
}), "Settings"))), /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
458
|
+
onClick: handleLogout,
|
|
459
|
+
className: "text-red-600"
|
|
460
|
+
}, /* @__PURE__ */ React.createElement(LucideIcons.LogOut, {
|
|
461
|
+
className: "mr-2 h-4 w-4"
|
|
462
|
+
}), "Sign Out"))))));
|
|
463
|
+
}
|
|
464
|
+
var DEFAULT_ADMIN_LOGO;
|
|
465
|
+
var init_Header = __esm({
|
|
466
|
+
"src/components/Admin/Header.tsx"() {
|
|
467
|
+
"use client";
|
|
468
|
+
init_client_sign_out();
|
|
469
|
+
init_button();
|
|
470
|
+
init_dropdown_menu();
|
|
471
|
+
init_use_mobile();
|
|
472
|
+
init_infuro_favicon();
|
|
473
|
+
init_vendor_scope();
|
|
474
|
+
DEFAULT_ADMIN_LOGO = "/images/logo/logo.png";
|
|
475
|
+
__name(AdminHeader, "AdminHeader");
|
|
476
|
+
}
|
|
477
|
+
});
|
|
476
478
|
var defaultValue; exports.AdminConfigContext = void 0;
|
|
477
479
|
var init_admin_config_context = __esm({
|
|
478
480
|
"src/admin/admin-config-context.tsx"() {
|
|
@@ -492,7 +494,7 @@ var init_admin_config_context = __esm({
|
|
|
492
494
|
var CMS_VERSION;
|
|
493
495
|
var init_cms_version = __esm({
|
|
494
496
|
"src/lib/cms-version.ts"() {
|
|
495
|
-
CMS_VERSION = "1.0.
|
|
497
|
+
CMS_VERSION = "1.0.45" ;
|
|
496
498
|
}
|
|
497
499
|
});
|
|
498
500
|
function useCatalogCategories(enabled = true) {
|
|
@@ -624,7 +626,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
624
626
|
const iconActive = "text-gray-700";
|
|
625
627
|
const iconInactive = "text-gray-400";
|
|
626
628
|
const linkCls = "flex items-center px-2.5 py-[7px] text-[13px] font-medium rounded-md transition-colors";
|
|
627
|
-
const
|
|
629
|
+
const sectionCls7 = "mb-5";
|
|
628
630
|
const headingCls = "text-[11px] font-semibold text-gray-400 uppercase tracking-wider px-2.5 mb-1.5";
|
|
629
631
|
const asideCls = isDrawer ? "w-full h-full min-h-0 bg-white flex flex-col overflow-hidden" : "w-52 h-full min-h-0 bg-white border-r border-gray-200 flex-shrink-0 flex flex-col overflow-hidden";
|
|
630
632
|
return /* @__PURE__ */ React.createElement("aside", {
|
|
@@ -634,7 +636,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
634
636
|
}, /* @__PURE__ */ React.createElement("nav", {
|
|
635
637
|
className: "admin-scroll flex-1 min-h-0 px-3 py-4 pb-4 overflow-y-auto overscroll-contain"
|
|
636
638
|
}, showPlatformNav && /* @__PURE__ */ React.createElement("div", {
|
|
637
|
-
className:
|
|
639
|
+
className: sectionCls7
|
|
638
640
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
639
641
|
className: headingCls
|
|
640
642
|
}, "Main"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -646,7 +648,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
646
648
|
className: `h-4 w-4 mr-2 ${isActive("/admin/dashboard") ? iconActive : iconInactive}`
|
|
647
649
|
}), "Dashboard")))), showPlatformNav && customNavSections.length > 0 && customNavSections.map((section) => /* @__PURE__ */ React.createElement("div", {
|
|
648
650
|
key: section.title,
|
|
649
|
-
className:
|
|
651
|
+
className: sectionCls7
|
|
650
652
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
651
653
|
className: headingCls
|
|
652
654
|
}, section.title), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -662,7 +664,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
662
664
|
className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}`
|
|
663
665
|
}), item.label));
|
|
664
666
|
})))), showPlatformNav && customNavSections.length === 0 && customNavItems.length > 0 && /* @__PURE__ */ React.createElement("div", {
|
|
665
|
-
className:
|
|
667
|
+
className: sectionCls7
|
|
666
668
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
667
669
|
className: headingCls
|
|
668
670
|
}, "Custom"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -678,7 +680,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
678
680
|
className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}`
|
|
679
681
|
}), item.label));
|
|
680
682
|
}))), vendorPortal && /* @__PURE__ */ React.createElement("div", {
|
|
681
|
-
className:
|
|
683
|
+
className: sectionCls7
|
|
682
684
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
683
685
|
className: headingCls
|
|
684
686
|
}, "Main"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -690,7 +692,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
690
692
|
className: `h-4 w-4 mr-2 ${isActive("/admin/dashboard") ? iconActive : iconInactive}`
|
|
691
693
|
}), "Dashboard")))), vendorPortal && customNavSections.length > 0 && customNavSections.map((section) => /* @__PURE__ */ React.createElement("div", {
|
|
692
694
|
key: section.title,
|
|
693
|
-
className:
|
|
695
|
+
className: sectionCls7
|
|
694
696
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
695
697
|
className: headingCls
|
|
696
698
|
}, section.title), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -706,7 +708,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
706
708
|
className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}`
|
|
707
709
|
}), item.label));
|
|
708
710
|
})))), showStoreNav && /* @__PURE__ */ React.createElement("div", {
|
|
709
|
-
className:
|
|
711
|
+
className: sectionCls7
|
|
710
712
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
711
713
|
className: headingCls
|
|
712
714
|
}, "Store"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -772,7 +774,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
772
774
|
}, /* @__PURE__ */ React.createElement(LucideIcons.Users, {
|
|
773
775
|
className: `h-4 w-4 mr-2 ${isActive("/admin/vendor_customers") ? iconActive : iconInactive}`
|
|
774
776
|
}), "Customers")))), !vendorPortal && /* @__PURE__ */ React.createElement("div", {
|
|
775
|
-
className:
|
|
777
|
+
className: sectionCls7
|
|
776
778
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
777
779
|
className: headingCls
|
|
778
780
|
}, "Management"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -808,7 +810,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
808
810
|
}, /* @__PURE__ */ React.createElement(LucideIcons.Image, {
|
|
809
811
|
className: `h-4 w-4 mr-2 ${isActive("/admin/media") ? iconActive : iconInactive}`
|
|
810
812
|
}), "Media")))), vendorPortal && /* @__PURE__ */ React.createElement("div", {
|
|
811
|
-
className:
|
|
813
|
+
className: sectionCls7
|
|
812
814
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
813
815
|
className: headingCls
|
|
814
816
|
}, "Settings"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -829,7 +831,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
829
831
|
}, /* @__PURE__ */ React.createElement(LucideIcons.FileText, {
|
|
830
832
|
className: `h-4 w-4 mr-2 ${isActive("/admin/policy") ? iconActive : iconInactive}`
|
|
831
833
|
}), "Policy")))), !vendorPortal && /* @__PURE__ */ React.createElement("div", {
|
|
832
|
-
className:
|
|
834
|
+
className: sectionCls7
|
|
833
835
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
834
836
|
className: headingCls
|
|
835
837
|
}, "System"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -2139,9 +2141,6 @@ function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns,
|
|
|
2139
2141
|
currency: currency || "INR"
|
|
2140
2142
|
});
|
|
2141
2143
|
const [errors, setErrors] = React26.useState({});
|
|
2142
|
-
const [password, setPassword] = React26.useState("");
|
|
2143
|
-
const [confirmPassword, setConfirmPassword] = React26.useState("");
|
|
2144
|
-
const isCustomerCreate = resource === "vendor_customers" && !existingData;
|
|
2145
2144
|
React26.useEffect(() => {
|
|
2146
2145
|
fetch("/api/settings/store").then((res) => res.json()).then((data) => {
|
|
2147
2146
|
setFormData((prev) => ({
|
|
@@ -2269,8 +2268,6 @@ function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns,
|
|
|
2269
2268
|
});
|
|
2270
2269
|
setFormData(merged);
|
|
2271
2270
|
} else {
|
|
2272
|
-
setPassword("");
|
|
2273
|
-
setConfirmPassword("");
|
|
2274
2271
|
setFormData(columns.filter((col) => !col.hideInForm).reduce((acc, col) => {
|
|
2275
2272
|
const path = col.field || col.key;
|
|
2276
2273
|
if (!path) return acc;
|
|
@@ -2331,18 +2328,6 @@ function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns,
|
|
|
2331
2328
|
}
|
|
2332
2329
|
}
|
|
2333
2330
|
});
|
|
2334
|
-
if (isCustomerCreate) {
|
|
2335
|
-
if (!password) {
|
|
2336
|
-
newErrors["_password"] = "Password is required";
|
|
2337
|
-
} else if (password.length < 6) {
|
|
2338
|
-
newErrors["_password"] = "Password must be at least 6 characters";
|
|
2339
|
-
}
|
|
2340
|
-
if (!confirmPassword) {
|
|
2341
|
-
newErrors["_confirmPassword"] = "Please confirm your password";
|
|
2342
|
-
} else if (password && confirmPassword !== password) {
|
|
2343
|
-
newErrors["_confirmPassword"] = "Passwords do not match";
|
|
2344
|
-
}
|
|
2345
|
-
}
|
|
2346
2331
|
setErrors(newErrors);
|
|
2347
2332
|
return Object.keys(newErrors).length === 0;
|
|
2348
2333
|
}, "validateForm");
|
|
@@ -2360,9 +2345,6 @@ function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns,
|
|
|
2360
2345
|
if (!existingData) {
|
|
2361
2346
|
delete payload.id;
|
|
2362
2347
|
}
|
|
2363
|
-
if (isCustomerCreate) {
|
|
2364
|
-
payload._password = password;
|
|
2365
|
-
}
|
|
2366
2348
|
try {
|
|
2367
2349
|
const res = await fetch(url, {
|
|
2368
2350
|
method,
|
|
@@ -2578,25 +2560,7 @@ Note: ${result.note}`);
|
|
|
2578
2560
|
"contact.name": e.target.value
|
|
2579
2561
|
})), "onChange")
|
|
2580
2562
|
})));
|
|
2581
|
-
}),
|
|
2582
|
-
className: "block text-sm font-medium mb-1"
|
|
2583
|
-
}, "Password"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
2584
|
-
type: "password",
|
|
2585
|
-
value: password,
|
|
2586
|
-
onChange: /* @__PURE__ */ __name((e) => setPassword(e.target.value), "onChange"),
|
|
2587
|
-
placeholder: "Min. 6 characters"
|
|
2588
|
-
}), errors["_password"] && /* @__PURE__ */ React26__namespace.default.createElement("p", {
|
|
2589
|
-
className: "text-red-500 text-sm mt-1"
|
|
2590
|
-
}, errors["_password"])), /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(Label3, {
|
|
2591
|
-
className: "block text-sm font-medium mb-1"
|
|
2592
|
-
}, "Confirm Password"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
2593
|
-
type: "password",
|
|
2594
|
-
value: confirmPassword,
|
|
2595
|
-
onChange: /* @__PURE__ */ __name((e) => setConfirmPassword(e.target.value), "onChange"),
|
|
2596
|
-
placeholder: "Re-enter password"
|
|
2597
|
-
}), errors["_confirmPassword"] && /* @__PURE__ */ React26__namespace.default.createElement("p", {
|
|
2598
|
-
className: "text-red-500 text-sm mt-1"
|
|
2599
|
-
}, errors["_confirmPassword"])))), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
2563
|
+
})), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
2600
2564
|
className: "flex gap-2 p-4 border-t border-gray-200 shrink-0 bg-white"
|
|
2601
2565
|
}, /* @__PURE__ */ React26__namespace.default.createElement(Button, {
|
|
2602
2566
|
type: "submit",
|
|
@@ -3780,13 +3744,13 @@ function CrudSearchFilterBar({ apiEndpoint, listFilters, relationLabelMaps, sear
|
|
|
3780
3744
|
}
|
|
3781
3745
|
const raw = (committedFilterValues[f.param] ?? "").trim();
|
|
3782
3746
|
if (!raw) return null;
|
|
3783
|
-
const
|
|
3747
|
+
const display2 = f.type === "select" ? labelForSelectValue(f, raw, relationLabelMaps) || raw : f.type === "multiSelect" ? labelsForMultiSelectValue(f, raw, relationLabelMaps) || raw : raw;
|
|
3784
3748
|
return /* @__PURE__ */ React.createElement("span", {
|
|
3785
3749
|
key: f.param,
|
|
3786
3750
|
className: "inline-flex max-w-full items-center gap-1 rounded-full border border-gray-200 bg-white px-3 py-1.5 text-xs font-medium text-gray-800 shadow-sm transition-opacity duration-200"
|
|
3787
3751
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
3788
3752
|
className: "truncate"
|
|
3789
|
-
}, f.label, ": ",
|
|
3753
|
+
}, f.label, ": ", display2), /* @__PURE__ */ React.createElement("button", {
|
|
3790
3754
|
type: "button",
|
|
3791
3755
|
className: "ml-0.5 shrink-0 rounded-full p-0.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900",
|
|
3792
3756
|
"aria-label": `Remove ${f.label}`,
|
|
@@ -11976,7 +11940,7 @@ var init_store_crud_configs = __esm({
|
|
|
11976
11940
|
addEditPageUrl: "/admin/brands"
|
|
11977
11941
|
},
|
|
11978
11942
|
product_categories: {
|
|
11979
|
-
title: "
|
|
11943
|
+
title: "Categories",
|
|
11980
11944
|
apiEndpoint: "/api/product_categories",
|
|
11981
11945
|
columns: [
|
|
11982
11946
|
{
|
|
@@ -20085,26 +20049,6 @@ var init_VendorRolesPage = __esm({
|
|
|
20085
20049
|
__name(VendorRolesPage, "VendorRolesPage");
|
|
20086
20050
|
}
|
|
20087
20051
|
});
|
|
20088
|
-
function DetailPageLayout({ main, sidebar }) {
|
|
20089
|
-
if (sidebar == null) {
|
|
20090
|
-
return /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20091
|
-
className: "min-w-0 w-full p-4 sm:p-6 space-y-6"
|
|
20092
|
-
}, main);
|
|
20093
|
-
}
|
|
20094
|
-
return /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20095
|
-
className: "min-w-0 w-full p-4 sm:p-6 grid grid-cols-1 xl:grid-cols-3 gap-4 sm:gap-6"
|
|
20096
|
-
}, /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20097
|
-
className: "min-w-0 w-full xl:col-span-2 space-y-6"
|
|
20098
|
-
}, main), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20099
|
-
className: "min-w-0 w-full xl:col-span-1 space-y-6"
|
|
20100
|
-
}, sidebar));
|
|
20101
|
-
}
|
|
20102
|
-
var init_DetailPageLayout = __esm({
|
|
20103
|
-
"src/components/Admin/DetailPageLayout.tsx"() {
|
|
20104
|
-
"use client";
|
|
20105
|
-
__name(DetailPageLayout, "DetailPageLayout");
|
|
20106
|
-
}
|
|
20107
|
-
});
|
|
20108
20052
|
|
|
20109
20053
|
// src/lib/vendor-profile.ts
|
|
20110
20054
|
function validateIndiaTaxIds(gstin, pan) {
|
|
@@ -20186,25 +20130,45 @@ function labelForRegistrationStatus(value) {
|
|
|
20186
20130
|
if (!value) return "\u2014";
|
|
20187
20131
|
return VENDOR_REGISTRATION_STATUSES.find((s) => s.value === value)?.label ?? value;
|
|
20188
20132
|
}
|
|
20189
|
-
function
|
|
20133
|
+
function display(value) {
|
|
20134
|
+
const s = value?.trim();
|
|
20135
|
+
return s ? s : "\u2014";
|
|
20136
|
+
}
|
|
20137
|
+
function ReadOnlyInput({ id, label, value, className }) {
|
|
20190
20138
|
return /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20191
|
-
className
|
|
20192
|
-
}, /* @__PURE__ */ React26__namespace.default.createElement(
|
|
20193
|
-
|
|
20194
|
-
}, label), /* @__PURE__ */ React26__namespace.default.createElement(
|
|
20195
|
-
|
|
20196
|
-
|
|
20139
|
+
className
|
|
20140
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement(Label3, {
|
|
20141
|
+
htmlFor: id
|
|
20142
|
+
}, label), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
20143
|
+
id,
|
|
20144
|
+
value,
|
|
20145
|
+
readOnly: true,
|
|
20146
|
+
disabled: true,
|
|
20147
|
+
className: "mt-1.5 bg-gray-50"
|
|
20148
|
+
}));
|
|
20197
20149
|
}
|
|
20198
20150
|
function VendorPortalProfilePage() {
|
|
20199
20151
|
const router = navigation.useRouter();
|
|
20152
|
+
const searchParams = navigation.useSearchParams();
|
|
20153
|
+
const tabParam = searchParams.get("tab");
|
|
20200
20154
|
const { data: session, status } = react.useSession();
|
|
20201
20155
|
const sessionUser = session?.user;
|
|
20156
|
+
const [tab, setTab] = React26.useState(tabParam === "password" ? "password" : "profile");
|
|
20202
20157
|
const [loading, setLoading] = React26.useState(true);
|
|
20203
20158
|
const [error, setError] = React26.useState(null);
|
|
20204
20159
|
const [vendor, setVendor] = React26.useState(null);
|
|
20205
20160
|
const [owner, setOwner] = React26.useState(null);
|
|
20206
|
-
const
|
|
20161
|
+
const [currentPassword, setCurrentPassword] = React26.useState("");
|
|
20162
|
+
const [newPassword, setNewPassword] = React26.useState("");
|
|
20163
|
+
const [confirmPassword, setConfirmPassword] = React26.useState("");
|
|
20164
|
+
const [savingPassword, setSavingPassword] = React26.useState(false);
|
|
20207
20165
|
const sessionUserId = sessionUser?.id != null ? Number(sessionUser.id) : null;
|
|
20166
|
+
React26.useEffect(() => {
|
|
20167
|
+
if (tabParam === "password") setTab("password");
|
|
20168
|
+
else if (tabParam === "profile") setTab("profile");
|
|
20169
|
+
}, [
|
|
20170
|
+
tabParam
|
|
20171
|
+
]);
|
|
20208
20172
|
React26.useEffect(() => {
|
|
20209
20173
|
if (status === "unauthenticated") {
|
|
20210
20174
|
router.replace("/admin/signin");
|
|
@@ -20215,16 +20179,15 @@ function VendorPortalProfilePage() {
|
|
|
20215
20179
|
router.replace("/admin/access-denied");
|
|
20216
20180
|
return;
|
|
20217
20181
|
}
|
|
20218
|
-
if (vendorId == null) {
|
|
20219
|
-
setError("No vendor is linked to your account.");
|
|
20220
|
-
setLoading(false);
|
|
20221
|
-
return;
|
|
20222
|
-
}
|
|
20223
20182
|
let cancelled = false;
|
|
20224
20183
|
(async () => {
|
|
20184
|
+
setLoading(true);
|
|
20225
20185
|
try {
|
|
20226
|
-
const res = await fetch(
|
|
20227
|
-
if (!res.ok)
|
|
20186
|
+
const res = await fetch("/api/admin/vendor/profile");
|
|
20187
|
+
if (!res.ok) {
|
|
20188
|
+
const errBody = await res.json().catch(() => ({}));
|
|
20189
|
+
throw new Error(errBody.error || "Failed to load vendor profile");
|
|
20190
|
+
}
|
|
20228
20191
|
const data = await res.json();
|
|
20229
20192
|
if (cancelled) return;
|
|
20230
20193
|
setVendor(data);
|
|
@@ -20265,9 +20228,13 @@ function VendorPortalProfilePage() {
|
|
|
20265
20228
|
email: data.email ?? null,
|
|
20266
20229
|
phone: data.phone ?? null
|
|
20267
20230
|
});
|
|
20231
|
+
setError(null);
|
|
20232
|
+
}
|
|
20233
|
+
} catch (e) {
|
|
20234
|
+
if (!cancelled) {
|
|
20235
|
+
setVendor(null);
|
|
20236
|
+
setError(e instanceof Error ? e.message : "Failed to load vendor profile.");
|
|
20268
20237
|
}
|
|
20269
|
-
} catch {
|
|
20270
|
-
if (!cancelled) setError("Failed to load vendor profile.");
|
|
20271
20238
|
} finally {
|
|
20272
20239
|
if (!cancelled) setLoading(false);
|
|
20273
20240
|
}
|
|
@@ -20279,158 +20246,293 @@ function VendorPortalProfilePage() {
|
|
|
20279
20246
|
status,
|
|
20280
20247
|
sessionUser,
|
|
20281
20248
|
router,
|
|
20282
|
-
|
|
20249
|
+
sessionUserId,
|
|
20250
|
+
session?.user?.name,
|
|
20251
|
+
session?.user?.email
|
|
20283
20252
|
]);
|
|
20284
|
-
|
|
20253
|
+
const handleChangePassword = /* @__PURE__ */ __name(async (e) => {
|
|
20254
|
+
e.preventDefault();
|
|
20255
|
+
if (newPassword !== confirmPassword) {
|
|
20256
|
+
sonner.toast.error("New password and confirmation do not match");
|
|
20257
|
+
return;
|
|
20258
|
+
}
|
|
20259
|
+
if (newPassword.length < 6) {
|
|
20260
|
+
sonner.toast.error("New password must be at least 6 characters");
|
|
20261
|
+
return;
|
|
20262
|
+
}
|
|
20263
|
+
setSavingPassword(true);
|
|
20264
|
+
try {
|
|
20265
|
+
const res = await fetch("/api/users/reset-password", {
|
|
20266
|
+
method: "POST",
|
|
20267
|
+
headers: {
|
|
20268
|
+
"Content-Type": "application/json"
|
|
20269
|
+
},
|
|
20270
|
+
body: JSON.stringify({
|
|
20271
|
+
currentPassword,
|
|
20272
|
+
newPassword
|
|
20273
|
+
})
|
|
20274
|
+
});
|
|
20275
|
+
const data = await res.json().catch(() => ({}));
|
|
20276
|
+
if (!res.ok) {
|
|
20277
|
+
sonner.toast.error(data.error || "Could not update password");
|
|
20278
|
+
return;
|
|
20279
|
+
}
|
|
20280
|
+
sonner.toast.success("Password updated");
|
|
20281
|
+
setCurrentPassword("");
|
|
20282
|
+
setNewPassword("");
|
|
20283
|
+
setConfirmPassword("");
|
|
20284
|
+
} catch {
|
|
20285
|
+
sonner.toast.error("Network error");
|
|
20286
|
+
} finally {
|
|
20287
|
+
setSavingPassword(false);
|
|
20288
|
+
}
|
|
20289
|
+
}, "handleChangePassword");
|
|
20290
|
+
const tabs = [
|
|
20291
|
+
{
|
|
20292
|
+
id: "profile",
|
|
20293
|
+
label: "Profile"
|
|
20294
|
+
},
|
|
20295
|
+
{
|
|
20296
|
+
id: "password",
|
|
20297
|
+
label: "Password"
|
|
20298
|
+
}
|
|
20299
|
+
];
|
|
20300
|
+
if (status === "unauthenticated") {
|
|
20301
|
+
return null;
|
|
20302
|
+
}
|
|
20303
|
+
if (status === "loading" || status === "authenticated" && loading) {
|
|
20285
20304
|
return /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20286
|
-
className: "flex justify-center py-
|
|
20287
|
-
}, "
|
|
20305
|
+
className: "flex justify-center py-8"
|
|
20306
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20307
|
+
className: "h-6 w-6 animate-spin rounded-full border-2 border-gray-300 border-t-gray-600"
|
|
20308
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement("span", {
|
|
20309
|
+
className: "ml-2 text-gray-600"
|
|
20310
|
+
}, "Loading..."));
|
|
20288
20311
|
}
|
|
20289
20312
|
if (error || !vendor) {
|
|
20290
20313
|
return /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20291
|
-
className: "
|
|
20314
|
+
className: "min-w-0 rounded-lg bg-white shadow-md"
|
|
20315
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20316
|
+
className: "rounded-t-lg border-b border-gray-700 bg-gray-800 px-4 py-2.5"
|
|
20317
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("h1", {
|
|
20318
|
+
className: "text-base font-semibold text-white"
|
|
20319
|
+
}, "Profile"), /* @__PURE__ */ React26__namespace.default.createElement("p", {
|
|
20320
|
+
className: "mt-0.5 text-xs text-gray-300"
|
|
20321
|
+
}, "Your vendor details, and password")), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20322
|
+
className: "p-6"
|
|
20292
20323
|
}, /* @__PURE__ */ React26__namespace.default.createElement("p", {
|
|
20293
20324
|
className: "text-sm text-red-600"
|
|
20294
|
-
}, error ?? "Vendor profile not available."));
|
|
20325
|
+
}, error ?? "Vendor profile not available.")));
|
|
20295
20326
|
}
|
|
20296
20327
|
const ownerDesignation = readOwnerDesignation(vendor.metadata);
|
|
20297
|
-
return /* @__PURE__ */ React26__namespace.default.createElement(
|
|
20298
|
-
|
|
20299
|
-
|
|
20300
|
-
|
|
20301
|
-
|
|
20302
|
-
|
|
20303
|
-
|
|
20304
|
-
|
|
20305
|
-
|
|
20306
|
-
|
|
20307
|
-
|
|
20308
|
-
|
|
20309
|
-
|
|
20310
|
-
|
|
20311
|
-
|
|
20312
|
-
|
|
20313
|
-
|
|
20314
|
-
|
|
20315
|
-
|
|
20316
|
-
|
|
20317
|
-
|
|
20318
|
-
|
|
20319
|
-
|
|
20320
|
-
|
|
20321
|
-
|
|
20322
|
-
|
|
20323
|
-
|
|
20324
|
-
|
|
20325
|
-
|
|
20326
|
-
|
|
20327
|
-
|
|
20328
|
-
|
|
20329
|
-
|
|
20330
|
-
|
|
20331
|
-
|
|
20332
|
-
|
|
20333
|
-
|
|
20334
|
-
|
|
20335
|
-
|
|
20336
|
-
|
|
20337
|
-
|
|
20338
|
-
|
|
20339
|
-
|
|
20340
|
-
|
|
20341
|
-
|
|
20342
|
-
|
|
20343
|
-
|
|
20344
|
-
|
|
20345
|
-
|
|
20346
|
-
|
|
20347
|
-
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
|
|
20355
|
-
|
|
20356
|
-
|
|
20357
|
-
|
|
20358
|
-
|
|
20359
|
-
|
|
20360
|
-
|
|
20361
|
-
|
|
20362
|
-
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
20366
|
-
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20412
|
-
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
20419
|
-
|
|
20420
|
-
|
|
20421
|
-
|
|
20328
|
+
return /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20329
|
+
className: "min-w-0 rounded-lg bg-white shadow-md"
|
|
20330
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20331
|
+
className: "rounded-t-lg border-b border-gray-700 bg-gray-800 px-4 py-2.5"
|
|
20332
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("h1", {
|
|
20333
|
+
className: "text-base font-semibold text-white"
|
|
20334
|
+
}, "Profile"), /* @__PURE__ */ React26__namespace.default.createElement("p", {
|
|
20335
|
+
className: "mt-0.5 text-xs text-gray-300"
|
|
20336
|
+
}, "Your vendor details, and password")), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20337
|
+
className: "flex border-b"
|
|
20338
|
+
}, tabs.map((t) => /* @__PURE__ */ React26__namespace.default.createElement("button", {
|
|
20339
|
+
key: t.id,
|
|
20340
|
+
type: "button",
|
|
20341
|
+
className: `border-b-2 px-4 py-2.5 text-sm font-medium ${tab === t.id ? "border-gray-800 bg-white text-gray-800" : "border-transparent text-gray-500 hover:text-gray-700"}`,
|
|
20342
|
+
onClick: /* @__PURE__ */ __name(() => setTab(t.id), "onClick")
|
|
20343
|
+
}, t.label))), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20344
|
+
className: "min-w-0 p-6"
|
|
20345
|
+
}, tab === "profile" && /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20346
|
+
className: "space-y-8"
|
|
20347
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("section", {
|
|
20348
|
+
className: "space-y-4"
|
|
20349
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
20350
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20351
|
+
}, "Store"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20352
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20353
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20354
|
+
id: "v-name",
|
|
20355
|
+
label: "Store name",
|
|
20356
|
+
value: display(vendor.name)
|
|
20357
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20358
|
+
id: "v-legal",
|
|
20359
|
+
label: "Legal name",
|
|
20360
|
+
value: display(vendor.legalName)
|
|
20361
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20362
|
+
id: "v-slug",
|
|
20363
|
+
label: "Slug",
|
|
20364
|
+
value: display(vendor.slug)
|
|
20365
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20366
|
+
id: "v-biz",
|
|
20367
|
+
label: "Business type",
|
|
20368
|
+
value: labelForBusinessType(vendor.businessType)
|
|
20369
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20370
|
+
id: "v-reg",
|
|
20371
|
+
label: "Registration status",
|
|
20372
|
+
value: labelForRegistrationStatus(vendor.registrationStatus)
|
|
20373
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20374
|
+
id: "v-active",
|
|
20375
|
+
label: "Active",
|
|
20376
|
+
value: vendor.active ? "Yes" : "No"
|
|
20377
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20378
|
+
id: "v-invite",
|
|
20379
|
+
label: "Invite status",
|
|
20380
|
+
value: display(vendor.inviteStatus)
|
|
20381
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20382
|
+
id: "v-created",
|
|
20383
|
+
label: "Created",
|
|
20384
|
+
value: vendor.createdAt ? new Date(vendor.createdAt).toLocaleString() : "\u2014"
|
|
20385
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20386
|
+
id: "v-desc",
|
|
20387
|
+
label: "Description",
|
|
20388
|
+
value: display(vendor.description),
|
|
20389
|
+
className: "md:col-span-2"
|
|
20390
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20391
|
+
id: "v-web",
|
|
20392
|
+
label: "Website",
|
|
20393
|
+
value: display(vendor.website),
|
|
20394
|
+
className: "md:col-span-2"
|
|
20395
|
+
}))), /* @__PURE__ */ React26__namespace.default.createElement("section", {
|
|
20396
|
+
className: "space-y-4"
|
|
20397
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
20398
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20399
|
+
}, "Contact"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20400
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20401
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20402
|
+
id: "v-email",
|
|
20403
|
+
label: "Email",
|
|
20404
|
+
value: display(vendor.email)
|
|
20405
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20406
|
+
id: "v-phone",
|
|
20407
|
+
label: "Phone",
|
|
20408
|
+
value: display(vendor.phone)
|
|
20409
|
+
}))), /* @__PURE__ */ React26__namespace.default.createElement("section", {
|
|
20410
|
+
className: "space-y-4"
|
|
20411
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
20412
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20413
|
+
}, "Address"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20414
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20415
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20416
|
+
id: "v-a1",
|
|
20417
|
+
label: "Address line 1",
|
|
20418
|
+
value: display(vendor.addressLine1)
|
|
20419
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20420
|
+
id: "v-a2",
|
|
20421
|
+
label: "Address line 2",
|
|
20422
|
+
value: display(vendor.addressLine2)
|
|
20423
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20424
|
+
id: "v-city",
|
|
20425
|
+
label: "City",
|
|
20426
|
+
value: display(vendor.city)
|
|
20427
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20428
|
+
id: "v-state",
|
|
20429
|
+
label: "State",
|
|
20430
|
+
value: display(vendor.state)
|
|
20431
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20432
|
+
id: "v-country",
|
|
20433
|
+
label: "Country",
|
|
20434
|
+
value: display(vendor.country)
|
|
20435
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20436
|
+
id: "v-postal",
|
|
20437
|
+
label: "Postal code",
|
|
20438
|
+
value: display(vendor.postalCode)
|
|
20439
|
+
}))), /* @__PURE__ */ React26__namespace.default.createElement("section", {
|
|
20440
|
+
className: "space-y-4"
|
|
20441
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
20442
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20443
|
+
}, "Tax & compliance"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20444
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20445
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20446
|
+
id: "v-gstin",
|
|
20447
|
+
label: "GSTIN",
|
|
20448
|
+
value: display(vendor.gstin)
|
|
20449
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20450
|
+
id: "v-pan",
|
|
20451
|
+
label: "PAN",
|
|
20452
|
+
value: display(vendor.pan)
|
|
20453
|
+
}))), /* @__PURE__ */ React26__namespace.default.createElement("section", {
|
|
20454
|
+
className: "space-y-4"
|
|
20455
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
20456
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20457
|
+
}, "Owner"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20458
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20459
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20460
|
+
id: "o-name",
|
|
20461
|
+
label: "Name",
|
|
20462
|
+
value: display(owner?.name)
|
|
20463
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20464
|
+
id: "o-email",
|
|
20465
|
+
label: "Email",
|
|
20466
|
+
value: display(owner?.email)
|
|
20467
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20468
|
+
id: "o-phone",
|
|
20469
|
+
label: "Phone",
|
|
20470
|
+
value: display(owner?.phone)
|
|
20471
|
+
}), /* @__PURE__ */ React26__namespace.default.createElement(ReadOnlyInput, {
|
|
20472
|
+
id: "o-desig",
|
|
20473
|
+
label: "Designation",
|
|
20474
|
+
value: display(ownerDesignation || void 0)
|
|
20475
|
+
})), vendor.logo ? /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(Label3, null, "Logo"), /* @__PURE__ */ React26__namespace.default.createElement("img", {
|
|
20476
|
+
src: vendor.logo,
|
|
20477
|
+
alt: "Vendor logo",
|
|
20478
|
+
className: "mt-1.5 max-h-24 rounded border border-gray-200 bg-white object-contain"
|
|
20479
|
+
})) : null)), tab === "password" && /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20480
|
+
className: "space-y-6"
|
|
20481
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
20482
|
+
className: "mb-2 text-lg font-semibold text-gray-900"
|
|
20483
|
+
}, "Change password"), /* @__PURE__ */ React26__namespace.default.createElement("form", {
|
|
20484
|
+
onSubmit: handleChangePassword,
|
|
20485
|
+
className: "max-w-md space-y-4"
|
|
20486
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(Label3, {
|
|
20487
|
+
htmlFor: "current-password",
|
|
20488
|
+
className: "text-sm text-gray-700"
|
|
20489
|
+
}, "Current password"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
20490
|
+
id: "current-password",
|
|
20491
|
+
type: "password",
|
|
20492
|
+
value: currentPassword,
|
|
20493
|
+
onChange: /* @__PURE__ */ __name((e) => setCurrentPassword(e.target.value), "onChange"),
|
|
20494
|
+
className: "mt-1.5",
|
|
20495
|
+
autoComplete: "current-password"
|
|
20496
|
+
})), /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(Label3, {
|
|
20497
|
+
htmlFor: "new-password",
|
|
20498
|
+
className: "text-sm text-gray-700"
|
|
20499
|
+
}, "New password"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
20500
|
+
id: "new-password",
|
|
20501
|
+
type: "password",
|
|
20502
|
+
value: newPassword,
|
|
20503
|
+
onChange: /* @__PURE__ */ __name((e) => setNewPassword(e.target.value), "onChange"),
|
|
20504
|
+
className: "mt-1.5",
|
|
20505
|
+
autoComplete: "new-password"
|
|
20506
|
+
})), /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(Label3, {
|
|
20507
|
+
htmlFor: "confirm-password",
|
|
20508
|
+
className: "text-sm text-gray-700"
|
|
20509
|
+
}, "Confirm new password"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
20510
|
+
id: "confirm-password",
|
|
20511
|
+
type: "password",
|
|
20512
|
+
value: confirmPassword,
|
|
20513
|
+
onChange: /* @__PURE__ */ __name((e) => setConfirmPassword(e.target.value), "onChange"),
|
|
20514
|
+
className: "mt-1.5",
|
|
20515
|
+
autoComplete: "new-password"
|
|
20516
|
+
})), /* @__PURE__ */ React26__namespace.default.createElement(Button, {
|
|
20517
|
+
type: "submit",
|
|
20518
|
+
variant: "secondary",
|
|
20519
|
+
disabled: savingPassword
|
|
20520
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement(LucideIcons.KeyRound, {
|
|
20521
|
+
className: "mr-2 h-4 w-4"
|
|
20522
|
+
}), savingPassword ? "Updating..." : "Update password"))))));
|
|
20422
20523
|
}
|
|
20423
|
-
var sectionCls;
|
|
20424
20524
|
var init_VendorPortalProfilePage = __esm({
|
|
20425
20525
|
"src/admin/pages/VendorPortalProfilePage.tsx"() {
|
|
20426
20526
|
"use client";
|
|
20427
20527
|
init_vendor_scope();
|
|
20428
|
-
|
|
20528
|
+
init_button();
|
|
20529
|
+
init_input();
|
|
20530
|
+
init_label();
|
|
20429
20531
|
init_vendor_profile();
|
|
20430
|
-
sectionCls = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50 space-y-3";
|
|
20431
20532
|
__name(labelForBusinessType, "labelForBusinessType");
|
|
20432
20533
|
__name(labelForRegistrationStatus, "labelForRegistrationStatus");
|
|
20433
|
-
__name(
|
|
20534
|
+
__name(display, "display");
|
|
20535
|
+
__name(ReadOnlyInput, "ReadOnlyInput");
|
|
20434
20536
|
__name(VendorPortalProfilePage, "VendorPortalProfilePage");
|
|
20435
20537
|
}
|
|
20436
20538
|
});
|
|
@@ -20667,6 +20769,26 @@ var init_SubmissionDetailPage = __esm({
|
|
|
20667
20769
|
__name(SubmissionDetailPage, "SubmissionDetailPage");
|
|
20668
20770
|
}
|
|
20669
20771
|
});
|
|
20772
|
+
function DetailPageLayout({ main, sidebar }) {
|
|
20773
|
+
if (sidebar == null) {
|
|
20774
|
+
return /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20775
|
+
className: "min-w-0 w-full p-4 sm:p-6 space-y-6"
|
|
20776
|
+
}, main);
|
|
20777
|
+
}
|
|
20778
|
+
return /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20779
|
+
className: "min-w-0 w-full p-4 sm:p-6 grid grid-cols-1 xl:grid-cols-3 gap-4 sm:gap-6"
|
|
20780
|
+
}, /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20781
|
+
className: "min-w-0 w-full xl:col-span-2 space-y-6"
|
|
20782
|
+
}, main), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
20783
|
+
className: "min-w-0 w-full xl:col-span-1 space-y-6"
|
|
20784
|
+
}, sidebar));
|
|
20785
|
+
}
|
|
20786
|
+
var init_DetailPageLayout = __esm({
|
|
20787
|
+
"src/components/Admin/DetailPageLayout.tsx"() {
|
|
20788
|
+
"use client";
|
|
20789
|
+
__name(DetailPageLayout, "DetailPageLayout");
|
|
20790
|
+
}
|
|
20791
|
+
});
|
|
20670
20792
|
|
|
20671
20793
|
// src/admin/pages/OrderDetailPage.tsx
|
|
20672
20794
|
var OrderDetailPage_exports = {};
|
|
@@ -22613,20 +22735,7 @@ function OrderPlacementPage({ editOrderId }) {
|
|
|
22613
22735
|
} catch {
|
|
22614
22736
|
}
|
|
22615
22737
|
}
|
|
22616
|
-
|
|
22617
|
-
if (placeForSomeoneElse) {
|
|
22618
|
-
if (contactEmail) {
|
|
22619
|
-
try {
|
|
22620
|
-
const res2 = await fetch(`/api/contacts?search=${encodeURIComponent(contactEmail)}&limit=5`);
|
|
22621
|
-
if (res2.ok) {
|
|
22622
|
-
const data = await res2.json();
|
|
22623
|
-
const match = data.data?.find((c) => c.email?.toLowerCase() === contactEmail.toLowerCase());
|
|
22624
|
-
if (match) orderContactId = match.id;
|
|
22625
|
-
}
|
|
22626
|
-
} catch {
|
|
22627
|
-
}
|
|
22628
|
-
}
|
|
22629
|
-
}
|
|
22738
|
+
const orderContactId = resolvedContactId;
|
|
22630
22739
|
const payload = {
|
|
22631
22740
|
status,
|
|
22632
22741
|
currency,
|
|
@@ -22648,6 +22757,9 @@ function OrderPlacementPage({ editOrderId }) {
|
|
|
22648
22757
|
};
|
|
22649
22758
|
if (orderContactId != null) payload.contactId = orderContactId;
|
|
22650
22759
|
if (!placeForSomeoneElse && contactId != null) payload.customerId = contactId;
|
|
22760
|
+
if (placeForSomeoneElse && selectedCustomerId != null) {
|
|
22761
|
+
payload.accountCustomerId = selectedCustomerId;
|
|
22762
|
+
}
|
|
22651
22763
|
if (coupons.length > 0) payload.discountId = coupons[0].discountId;
|
|
22652
22764
|
const url = editOrderId ? `/api/orders/${editOrderId}` : "/api/orders";
|
|
22653
22765
|
const method = editOrderId ? "PUT" : "POST";
|
|
@@ -27083,7 +27195,7 @@ function variantsFromForm(rows, defaultCurrency) {
|
|
|
27083
27195
|
};
|
|
27084
27196
|
}).filter((row) => row != null);
|
|
27085
27197
|
}
|
|
27086
|
-
function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptionRows, onVariantOptionRowsChange, variantRows, onVariantRowsChange, defaultCurrency, currencySymbol: currencySymbol3 }) {
|
|
27198
|
+
function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptionRows, onVariantOptionRowsChange, variantRows, onVariantRowsChange, defaultCurrency, currencySymbol: currencySymbol3, lockVariantStatus = false }) {
|
|
27087
27199
|
const parsedOptions = variantOptionsFromForm(variantOptionRows);
|
|
27088
27200
|
const baseCurrency = defaultCurrency.trim().toUpperCase() || "INR";
|
|
27089
27201
|
const setOptionName = /* @__PURE__ */ __name((index, value) => {
|
|
@@ -27153,7 +27265,7 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27153
27265
|
}), "This product has variants")), !hasVariants ? /* @__PURE__ */ React.createElement("p", {
|
|
27154
27266
|
className: "text-xs text-gray-500"
|
|
27155
27267
|
}, "Enable variants for products with options like size, color, or material.") : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
27156
|
-
className:
|
|
27268
|
+
className: sectionCls
|
|
27157
27269
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
27158
27270
|
className: "mb-3"
|
|
27159
27271
|
}, /* @__PURE__ */ React.createElement("p", {
|
|
@@ -27223,7 +27335,7 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27223
27335
|
disabled: !parsedOptions.length,
|
|
27224
27336
|
className: "inline-flex items-center gap-1 rounded border border-gray-800 bg-gray-900 px-3 py-1.5 text-xs font-medium text-white hover:bg-gray-800 disabled:opacity-50"
|
|
27225
27337
|
}, "Generate variants")))), /* @__PURE__ */ React.createElement("div", {
|
|
27226
|
-
className:
|
|
27338
|
+
className: sectionCls
|
|
27227
27339
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
27228
27340
|
className: "mb-3 flex flex-wrap items-center justify-between gap-2"
|
|
27229
27341
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", {
|
|
@@ -27318,9 +27430,11 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27318
27430
|
})), /* @__PURE__ */ React.createElement("td", {
|
|
27319
27431
|
className: "px-3 py-2 align-top"
|
|
27320
27432
|
}, /* @__PURE__ */ React.createElement("select", {
|
|
27321
|
-
value: row.status,
|
|
27433
|
+
value: lockVariantStatus ? "draft" : row.status,
|
|
27322
27434
|
onChange: /* @__PURE__ */ __name((e) => setVariantField(i, "status", e.target.value), "onChange"),
|
|
27323
|
-
className: inputCls2
|
|
27435
|
+
className: inputCls2,
|
|
27436
|
+
disabled: lockVariantStatus,
|
|
27437
|
+
title: lockVariantStatus ? "Variant status stays draft until the product is approved" : void 0
|
|
27324
27438
|
}, /* @__PURE__ */ React.createElement("option", {
|
|
27325
27439
|
value: "draft"
|
|
27326
27440
|
}, "Draft"), /* @__PURE__ */ React.createElement("option", {
|
|
@@ -27329,7 +27443,9 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27329
27443
|
value: "reserved"
|
|
27330
27444
|
}, "Reserved"), /* @__PURE__ */ React.createElement("option", {
|
|
27331
27445
|
value: "sold"
|
|
27332
|
-
}, "Sold"))
|
|
27446
|
+
}, "Sold")), lockVariantStatus ? /* @__PURE__ */ React.createElement("p", {
|
|
27447
|
+
className: "mt-1 text-[11px] text-gray-500"
|
|
27448
|
+
}, "Locked until product approval") : null), /* @__PURE__ */ React.createElement("td", {
|
|
27333
27449
|
className: "px-3 py-2 align-top min-w-[240px]"
|
|
27334
27450
|
}, (() => {
|
|
27335
27451
|
const lines = row.imageUrlsText === "" ? [
|
|
@@ -27371,7 +27487,7 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27371
27487
|
className: "h-4 w-4"
|
|
27372
27488
|
})))))))))));
|
|
27373
27489
|
}
|
|
27374
|
-
var labelCls2, inputCls2,
|
|
27490
|
+
var labelCls2, inputCls2, sectionCls;
|
|
27375
27491
|
var init_ProductVariantsSection = __esm({
|
|
27376
27492
|
"src/admin/pages/ProductVariantsSection.tsx"() {
|
|
27377
27493
|
"use client";
|
|
@@ -27379,7 +27495,7 @@ var init_ProductVariantsSection = __esm({
|
|
|
27379
27495
|
init_ImageOrUrlField();
|
|
27380
27496
|
labelCls2 = "block text-xs font-medium text-gray-600 mb-1";
|
|
27381
27497
|
inputCls2 = "w-full rounded-md border border-gray-300 px-2 py-1.5 text-sm";
|
|
27382
|
-
|
|
27498
|
+
sectionCls = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
27383
27499
|
__name(emptyVariantOptionRow, "emptyVariantOptionRow");
|
|
27384
27500
|
__name(emptyVariantFormRow, "emptyVariantFormRow");
|
|
27385
27501
|
__name(variantOptionsFromForm, "variantOptionsFromForm");
|
|
@@ -27504,13 +27620,14 @@ function apiVariantsToDrafts(rows, _defaultCurrency) {
|
|
|
27504
27620
|
};
|
|
27505
27621
|
});
|
|
27506
27622
|
}
|
|
27507
|
-
async function syncProductVariants(productId, drafts) {
|
|
27623
|
+
async function syncProductVariants(productId, drafts, productStatus) {
|
|
27508
27624
|
const listRes = await fetch(`/api/product_variants?productId=${productId}&limit=500`);
|
|
27509
27625
|
const listData = listRes.ok ? await listRes.json() : {
|
|
27510
27626
|
data: []
|
|
27511
27627
|
};
|
|
27512
27628
|
const existing = Array.isArray(listData.data) ? listData.data : [];
|
|
27513
27629
|
const wantedIds = new Set(drafts.filter((d) => d.id != null).map((d) => d.id));
|
|
27630
|
+
const forceDraft = productStatus !== "available";
|
|
27514
27631
|
for (const row of existing) {
|
|
27515
27632
|
if (!wantedIds.has(row.id)) {
|
|
27516
27633
|
const del = await fetch(`/api/product_variants/${row.id}`, {
|
|
@@ -27520,6 +27637,7 @@ async function syncProductVariants(productId, drafts) {
|
|
|
27520
27637
|
}
|
|
27521
27638
|
}
|
|
27522
27639
|
for (const draft of drafts) {
|
|
27640
|
+
const nextStatus = forceDraft ? "draft" : draft.status === "reserved" || draft.status === "sold" ? draft.status : "available";
|
|
27523
27641
|
const payload = {
|
|
27524
27642
|
productId,
|
|
27525
27643
|
sku: draft.sku,
|
|
@@ -27527,7 +27645,7 @@ async function syncProductVariants(productId, drafts) {
|
|
|
27527
27645
|
compareAtPrice: draft.compareAtPrice,
|
|
27528
27646
|
currencyPrices: null,
|
|
27529
27647
|
inventory: draft.inventory,
|
|
27530
|
-
status:
|
|
27648
|
+
status: nextStatus,
|
|
27531
27649
|
attributes: draft.attributes,
|
|
27532
27650
|
imageUrls: draft.imageUrls.length ? draft.imageUrls : null
|
|
27533
27651
|
};
|
|
@@ -28342,7 +28460,7 @@ function ProductEditPage({ productId }) {
|
|
|
28342
28460
|
}
|
|
28343
28461
|
}
|
|
28344
28462
|
if (hasVariants) {
|
|
28345
|
-
const variantErr = await syncProductVariants(Number(savedId), variantsFromForm(variantRows, pricingConfig.defaultCurrency));
|
|
28463
|
+
const variantErr = await syncProductVariants(Number(savedId), variantsFromForm(variantRows, pricingConfig.defaultCurrency), String(savedProduct.status ?? status));
|
|
28346
28464
|
if (variantErr) {
|
|
28347
28465
|
setErrors([
|
|
28348
28466
|
variantErr
|
|
@@ -28356,7 +28474,7 @@ function ProductEditPage({ productId }) {
|
|
|
28356
28474
|
setVariantRows(variantsToForm(apiVariantsToDrafts(reloadRows, pricingConfig.defaultCurrency), pricingConfig.defaultCurrency));
|
|
28357
28475
|
}
|
|
28358
28476
|
} else {
|
|
28359
|
-
const variantErr = await syncProductVariants(Number(savedId), []);
|
|
28477
|
+
const variantErr = await syncProductVariants(Number(savedId), [], String(savedProduct.status ?? status));
|
|
28360
28478
|
if (variantErr) {
|
|
28361
28479
|
setErrors([
|
|
28362
28480
|
variantErr
|
|
@@ -28549,7 +28667,7 @@ function ProductEditPage({ productId }) {
|
|
|
28549
28667
|
}, "Step 1 \u2014 Product")), /* @__PURE__ */ React.createElement("h2", {
|
|
28550
28668
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28551
28669
|
}, "Product details"), /* @__PURE__ */ React.createElement("div", {
|
|
28552
|
-
className: `${
|
|
28670
|
+
className: `${sectionCls2} space-y-4`
|
|
28553
28671
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", {
|
|
28554
28672
|
className: labelCls3
|
|
28555
28673
|
}, "Name *"), /* @__PURE__ */ React.createElement("input", {
|
|
@@ -28768,13 +28886,14 @@ function ProductEditPage({ productId }) {
|
|
|
28768
28886
|
variantRows,
|
|
28769
28887
|
onVariantRowsChange: setVariantRows,
|
|
28770
28888
|
defaultCurrency: pricingConfig.defaultCurrency,
|
|
28771
|
-
currencySymbol: defaultCurrencySymbol
|
|
28889
|
+
currencySymbol: defaultCurrencySymbol,
|
|
28890
|
+
lockVariantStatus: vendorPortal && (status !== "available" || approvalOn && approvalStatus !== "approved")
|
|
28772
28891
|
}), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
28773
28892
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28774
28893
|
}, "Taxes & Policy"), /* @__PURE__ */ React.createElement("p", {
|
|
28775
28894
|
className: "text-xs text-gray-500 mb-2"
|
|
28776
28895
|
}, "Link taxes for this product. Leave rate empty to use the tax's default rate; set a value to override. Select a refund policy to apply to all taxes."), /* @__PURE__ */ React.createElement("div", {
|
|
28777
|
-
className: `${
|
|
28896
|
+
className: `${sectionCls2} space-y-4`
|
|
28778
28897
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", {
|
|
28779
28898
|
className: labelCls3
|
|
28780
28899
|
}, "Refund / Return Policy"), /* @__PURE__ */ React.createElement("select", {
|
|
@@ -28852,7 +28971,7 @@ function ProductEditPage({ productId }) {
|
|
|
28852
28971
|
}, "Attributes (facets)"), /* @__PURE__ */ React.createElement("p", {
|
|
28853
28972
|
className: "text-xs text-gray-500 mb-2"
|
|
28854
28973
|
}, "Search existing attributes or create new ones (like blog categories). Value on the right."), /* @__PURE__ */ React.createElement("div", {
|
|
28855
|
-
className: `${
|
|
28974
|
+
className: `${sectionCls2} space-y-2`
|
|
28856
28975
|
}, facetRows.map((row, i) => /* @__PURE__ */ React.createElement("div", {
|
|
28857
28976
|
key: i,
|
|
28858
28977
|
className: "flex gap-2 items-start"
|
|
@@ -28881,7 +29000,7 @@ function ProductEditPage({ productId }) {
|
|
|
28881
29000
|
}), " Add attribute"))), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
28882
29001
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28883
29002
|
}, "Media"), /* @__PURE__ */ React.createElement("div", {
|
|
28884
|
-
className: `${
|
|
29003
|
+
className: `${sectionCls2} space-y-3`
|
|
28885
29004
|
}, images.map((row, i) => /* @__PURE__ */ React.createElement("div", {
|
|
28886
29005
|
key: i,
|
|
28887
29006
|
className: "flex flex-wrap items-start gap-2 p-2 bg-white rounded border border-gray-200"
|
|
@@ -28923,7 +29042,7 @@ function ProductEditPage({ productId }) {
|
|
|
28923
29042
|
}), " Add image"))), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
28924
29043
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28925
29044
|
}, "Specifications"), /* @__PURE__ */ React.createElement("div", {
|
|
28926
|
-
className: `${
|
|
29045
|
+
className: `${sectionCls2} space-y-2`
|
|
28927
29046
|
}, specifications.map((row, i) => /* @__PURE__ */ React.createElement("div", {
|
|
28928
29047
|
key: i,
|
|
28929
29048
|
className: "flex gap-2"
|
|
@@ -28954,7 +29073,7 @@ function ProductEditPage({ productId }) {
|
|
|
28954
29073
|
}), " Add row"))), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
28955
29074
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28956
29075
|
}, "SEO"), /* @__PURE__ */ React.createElement("div", {
|
|
28957
|
-
className:
|
|
29076
|
+
className: sectionCls2
|
|
28958
29077
|
}, /* @__PURE__ */ React.createElement(SeoSection, {
|
|
28959
29078
|
values: seo,
|
|
28960
29079
|
onChange: /* @__PURE__ */ __name((field, value) => setSeo((s) => ({
|
|
@@ -28964,7 +29083,7 @@ function ProductEditPage({ productId }) {
|
|
|
28964
29083
|
}))))
|
|
28965
29084
|
}));
|
|
28966
29085
|
}
|
|
28967
|
-
var isCreate2,
|
|
29086
|
+
var isCreate2, sectionCls2, labelCls3, inputCls3, DEFAULT_PRICING_CONFIG;
|
|
28968
29087
|
var init_ProductEditPage = __esm({
|
|
28969
29088
|
"src/admin/pages/ProductEditPage.tsx"() {
|
|
28970
29089
|
"use client";
|
|
@@ -28988,7 +29107,7 @@ var init_ProductEditPage = __esm({
|
|
|
28988
29107
|
init_product_variants();
|
|
28989
29108
|
__name(parseCategoryIdFromReturnUrl, "parseCategoryIdFromReturnUrl");
|
|
28990
29109
|
isCreate2 = /* @__PURE__ */ __name((id) => id === "create", "isCreate");
|
|
28991
|
-
|
|
29110
|
+
sectionCls2 = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
28992
29111
|
labelCls3 = "block text-xs font-medium text-gray-600 mb-1";
|
|
28993
29112
|
inputCls3 = "w-full rounded-md border border-gray-300 px-2 py-1.5 text-sm";
|
|
28994
29113
|
__name(buildProductMetadata, "buildProductMetadata");
|
|
@@ -29413,7 +29532,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29413
29532
|
main: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
29414
29533
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
29415
29534
|
}, "Basic info"), /* @__PURE__ */ React.createElement("div", {
|
|
29416
|
-
className: `${
|
|
29535
|
+
className: `${sectionCls3} space-y-4`
|
|
29417
29536
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", {
|
|
29418
29537
|
className: labelCls4
|
|
29419
29538
|
}, "Name *"), /* @__PURE__ */ React.createElement("input", {
|
|
@@ -29499,7 +29618,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29499
29618
|
}), "Advanced page content"), advancedOpen && /* @__PURE__ */ React.createElement("div", {
|
|
29500
29619
|
className: "space-y-4"
|
|
29501
29620
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
29502
|
-
className:
|
|
29621
|
+
className: sectionCls3
|
|
29503
29622
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
29504
29623
|
className: "text-xs font-medium text-gray-700 mb-2"
|
|
29505
29624
|
}, "Hero carousel"), heroSlides.map((slide, i) => /* @__PURE__ */ React.createElement("div", {
|
|
@@ -29545,7 +29664,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29545
29664
|
}, /* @__PURE__ */ React.createElement(LucideIcons.Plus, {
|
|
29546
29665
|
className: "h-3.5 w-3.5"
|
|
29547
29666
|
}), " Add slide")), /* @__PURE__ */ React.createElement("div", {
|
|
29548
|
-
className:
|
|
29667
|
+
className: sectionCls3
|
|
29549
29668
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
29550
29669
|
className: "text-xs font-medium text-gray-700 mb-2"
|
|
29551
29670
|
}, "Variants"), variants.map((v, i) => /* @__PURE__ */ React.createElement("div", {
|
|
@@ -29605,7 +29724,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29605
29724
|
}, /* @__PURE__ */ React.createElement(LucideIcons.Plus, {
|
|
29606
29725
|
className: "h-3.5 w-3.5"
|
|
29607
29726
|
}), " Add variant")), /* @__PURE__ */ React.createElement("div", {
|
|
29608
|
-
className:
|
|
29727
|
+
className: sectionCls3
|
|
29609
29728
|
}, /* @__PURE__ */ React.createElement("label", {
|
|
29610
29729
|
className: labelCls4
|
|
29611
29730
|
}, "Experience description"), /* @__PURE__ */ React.createElement("textarea", {
|
|
@@ -29615,7 +29734,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29615
29734
|
rows: 2,
|
|
29616
29735
|
placeholder: "Optional"
|
|
29617
29736
|
})), /* @__PURE__ */ React.createElement("div", {
|
|
29618
|
-
className:
|
|
29737
|
+
className: sectionCls3
|
|
29619
29738
|
}, /* @__PURE__ */ React.createElement("label", {
|
|
29620
29739
|
className: labelCls4
|
|
29621
29740
|
}, "Brochure URL"), /* @__PURE__ */ React.createElement("input", {
|
|
@@ -29628,7 +29747,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29628
29747
|
sidebar: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
29629
29748
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
29630
29749
|
}, "Status"), /* @__PURE__ */ React.createElement("div", {
|
|
29631
|
-
className:
|
|
29750
|
+
className: sectionCls3
|
|
29632
29751
|
}, /* @__PURE__ */ React.createElement("label", {
|
|
29633
29752
|
className: "flex items-center gap-2 cursor-pointer"
|
|
29634
29753
|
}, /* @__PURE__ */ React.createElement("input", {
|
|
@@ -29641,7 +29760,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29641
29760
|
}, "Active")))), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
29642
29761
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
29643
29762
|
}, "SEO"), /* @__PURE__ */ React.createElement("div", {
|
|
29644
|
-
className:
|
|
29763
|
+
className: sectionCls3
|
|
29645
29764
|
}, /* @__PURE__ */ React.createElement(SeoSection, {
|
|
29646
29765
|
values: seo,
|
|
29647
29766
|
onChange: /* @__PURE__ */ __name((field, value) => setSeo((s) => ({
|
|
@@ -29651,7 +29770,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29651
29770
|
}))))
|
|
29652
29771
|
}));
|
|
29653
29772
|
}
|
|
29654
|
-
var isCreate3, emptySlide, emptyVariant,
|
|
29773
|
+
var isCreate3, emptySlide, emptyVariant, sectionCls3, labelCls4, inputCls4;
|
|
29655
29774
|
var init_CollectionEditPage = __esm({
|
|
29656
29775
|
"src/admin/pages/CollectionEditPage.tsx"() {
|
|
29657
29776
|
"use client";
|
|
@@ -29674,7 +29793,7 @@ var init_CollectionEditPage = __esm({
|
|
|
29674
29793
|
price: "",
|
|
29675
29794
|
extraSpecs: []
|
|
29676
29795
|
}), "emptyVariant");
|
|
29677
|
-
|
|
29796
|
+
sectionCls3 = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
29678
29797
|
labelCls4 = "block text-xs font-medium text-gray-600 mb-1";
|
|
29679
29798
|
inputCls4 = "w-full rounded-md border border-gray-300 px-2 py-1.5 text-sm";
|
|
29680
29799
|
__name(CollectionEditPage, "CollectionEditPage");
|
|
@@ -31156,7 +31275,7 @@ function EventEditPage({ eventId }) {
|
|
|
31156
31275
|
onClick: /* @__PURE__ */ __name(() => setActiveTab("settings"), "onClick")
|
|
31157
31276
|
}, "Settings"))), /* @__PURE__ */ React.createElement(DetailPageLayout, {
|
|
31158
31277
|
main: activeTab === "basic" ? /* @__PURE__ */ React.createElement("section", {
|
|
31159
|
-
className:
|
|
31278
|
+
className: sectionCls4
|
|
31160
31279
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
31161
31280
|
className: "grid gap-3 sm:grid-cols-2"
|
|
31162
31281
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -31289,7 +31408,7 @@ function EventEditPage({ eventId }) {
|
|
|
31289
31408
|
}, "Online"), /* @__PURE__ */ React.createElement("option", {
|
|
31290
31409
|
value: "hybrid"
|
|
31291
31410
|
}, "Hybrid"))))) : activeTab === "venue" ? /* @__PURE__ */ React.createElement("section", {
|
|
31292
|
-
className:
|
|
31411
|
+
className: sectionCls4
|
|
31293
31412
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
31294
31413
|
className: "grid gap-3 sm:grid-cols-2"
|
|
31295
31414
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -31329,7 +31448,7 @@ function EventEditPage({ eventId }) {
|
|
|
31329
31448
|
onChange: /* @__PURE__ */ __name((e) => setCountry(e.target.value), "onChange"),
|
|
31330
31449
|
className: inputCls6
|
|
31331
31450
|
})))) : activeTab === "datetime" ? /* @__PURE__ */ React.createElement("section", {
|
|
31332
|
-
className:
|
|
31451
|
+
className: sectionCls4
|
|
31333
31452
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
31334
31453
|
className: "grid gap-3 sm:grid-cols-2"
|
|
31335
31454
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -31367,7 +31486,7 @@ function EventEditPage({ eventId }) {
|
|
|
31367
31486
|
onChange: /* @__PURE__ */ __name((e) => setRegistrationClosesAt(e.target.value), "onChange"),
|
|
31368
31487
|
className: inputCls6
|
|
31369
31488
|
})))) : /* @__PURE__ */ React.createElement("section", {
|
|
31370
|
-
className:
|
|
31489
|
+
className: sectionCls4
|
|
31371
31490
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
31372
31491
|
className: "space-y-6"
|
|
31373
31492
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h2", {
|
|
@@ -31462,7 +31581,7 @@ function EventEditPage({ eventId }) {
|
|
|
31462
31581
|
returnUrl: eventEditUrl
|
|
31463
31582
|
})) : null);
|
|
31464
31583
|
}
|
|
31465
|
-
var ADDITIONAL_VENUE_MAX_CHARS, DEFAULT_EVENT_TIMEZONE, DEFAULT_EVENT_CURRENCY, EVENT_SOCIAL_KEYS, isCreate4,
|
|
31584
|
+
var ADDITIONAL_VENUE_MAX_CHARS, DEFAULT_EVENT_TIMEZONE, DEFAULT_EVENT_CURRENCY, EVENT_SOCIAL_KEYS, isCreate4, sectionCls4, labelCls6, inputCls6, ENTITY_TYPE_OPTIONS;
|
|
31466
31585
|
var init_EventEditPage = __esm({
|
|
31467
31586
|
"src/admin/pages/EventEditPage.tsx"() {
|
|
31468
31587
|
"use client";
|
|
@@ -31487,7 +31606,7 @@ var init_EventEditPage = __esm({
|
|
|
31487
31606
|
DEFAULT_EVENT_CURRENCY = "INR";
|
|
31488
31607
|
EVENT_SOCIAL_KEYS = EVENT_SOCIAL_FIELDS.map((f) => f.key);
|
|
31489
31608
|
isCreate4 = /* @__PURE__ */ __name((id) => id === "create", "isCreate");
|
|
31490
|
-
|
|
31609
|
+
sectionCls4 = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
31491
31610
|
labelCls6 = "block text-xs font-medium text-gray-600 mb-1";
|
|
31492
31611
|
inputCls6 = "w-full rounded-md border border-gray-300 px-2 py-1.5 text-sm";
|
|
31493
31612
|
__name(RequiredLabel, "RequiredLabel");
|
|
@@ -32191,6 +32310,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32191
32310
|
const [ownerEmail, setOwnerEmail] = React26.useState("");
|
|
32192
32311
|
const [ownerPhone, setOwnerPhone] = React26.useState("");
|
|
32193
32312
|
const [ownerDesignation, setOwnerDesignation] = React26.useState("");
|
|
32313
|
+
const [ownerUserId, setOwnerUserId] = React26.useState(null);
|
|
32194
32314
|
const [termsAccepted, setTermsAccepted] = React26.useState(false);
|
|
32195
32315
|
const [reinviting, setReinviting] = React26.useState(false);
|
|
32196
32316
|
const [inviteDialog, setInviteDialog] = React26.useState(null);
|
|
@@ -32250,6 +32370,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32250
32370
|
setOwnerDesignation(readOwnerDesignation(data.metadata));
|
|
32251
32371
|
const userId = data.userId;
|
|
32252
32372
|
if (userId != null && Number.isFinite(Number(userId))) {
|
|
32373
|
+
setOwnerUserId(Number(userId));
|
|
32253
32374
|
const userRes = await fetch(`/api/users/${userId}`);
|
|
32254
32375
|
if (userRes.ok) {
|
|
32255
32376
|
const user = await userRes.json();
|
|
@@ -32259,6 +32380,8 @@ function VendorEditPage({ vendorId }) {
|
|
|
32259
32380
|
setOwnerPhone(user.phone ?? "");
|
|
32260
32381
|
}
|
|
32261
32382
|
}
|
|
32383
|
+
} else if (!cancelled) {
|
|
32384
|
+
setOwnerUserId(null);
|
|
32262
32385
|
}
|
|
32263
32386
|
} catch {
|
|
32264
32387
|
if (!cancelled) setErrors([
|
|
@@ -32473,6 +32596,13 @@ function VendorEditPage({ vendorId }) {
|
|
|
32473
32596
|
setSaving(false);
|
|
32474
32597
|
return;
|
|
32475
32598
|
}
|
|
32599
|
+
if (!ownerName.trim() || !ownerEmail.trim()) {
|
|
32600
|
+
setErrors([
|
|
32601
|
+
"Owner name and owner email are required"
|
|
32602
|
+
]);
|
|
32603
|
+
setSaving(false);
|
|
32604
|
+
return;
|
|
32605
|
+
}
|
|
32476
32606
|
const taxError = validateIndiaTaxIds(gstin.trim().toUpperCase() || null, pan.trim().toUpperCase() || null);
|
|
32477
32607
|
if (taxError) {
|
|
32478
32608
|
setErrors([
|
|
@@ -32508,6 +32638,26 @@ function VendorEditPage({ vendorId }) {
|
|
|
32508
32638
|
]);
|
|
32509
32639
|
return;
|
|
32510
32640
|
}
|
|
32641
|
+
if (ownerUserId != null) {
|
|
32642
|
+
const userRes = await fetch(`/api/users/${ownerUserId}`, {
|
|
32643
|
+
method: "PUT",
|
|
32644
|
+
headers: {
|
|
32645
|
+
"Content-Type": "application/json"
|
|
32646
|
+
},
|
|
32647
|
+
body: JSON.stringify({
|
|
32648
|
+
name: ownerName.trim(),
|
|
32649
|
+
email: ownerEmail.trim(),
|
|
32650
|
+
phone: ownerPhone.trim() || null
|
|
32651
|
+
})
|
|
32652
|
+
});
|
|
32653
|
+
if (!userRes.ok) {
|
|
32654
|
+
const data = await userRes.json().catch(() => ({}));
|
|
32655
|
+
setErrors([
|
|
32656
|
+
data.error || "Vendor saved, but updating owner details failed"
|
|
32657
|
+
]);
|
|
32658
|
+
return;
|
|
32659
|
+
}
|
|
32660
|
+
}
|
|
32511
32661
|
sonner.toast.success("Vendor saved");
|
|
32512
32662
|
router.push(listReturnUrl);
|
|
32513
32663
|
} catch {
|
|
@@ -32529,7 +32679,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32529
32679
|
className: "rounded-lg bg-white shadow-md min-h-[420px]"
|
|
32530
32680
|
}, /* @__PURE__ */ React26__namespace.default.createElement(DetailPageHeader, {
|
|
32531
32681
|
title: create ? "Add vendor" : "Edit vendor",
|
|
32532
|
-
subtitle: create ? "Register a vendor store and create the owner invite" : "Update store and registration details",
|
|
32682
|
+
subtitle: create ? "Register a vendor store and create the owner invite" : "Update store, owner, and registration details",
|
|
32533
32683
|
closeHref: listReturnUrl,
|
|
32534
32684
|
menuItems: create ? [
|
|
32535
32685
|
{
|
|
@@ -32555,7 +32705,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32555
32705
|
main: /* @__PURE__ */ React26__namespace.default.createElement(React26__namespace.default.Fragment, null, /* @__PURE__ */ React26__namespace.default.createElement("section", null, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
32556
32706
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32557
32707
|
}, "Business"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
32558
|
-
className:
|
|
32708
|
+
className: sectionCls5
|
|
32559
32709
|
}, /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(FieldLabel, {
|
|
32560
32710
|
htmlFor: "vendorName",
|
|
32561
32711
|
required: true
|
|
@@ -32620,7 +32770,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32620
32770
|
})))), /* @__PURE__ */ React26__namespace.default.createElement("section", null, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
32621
32771
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32622
32772
|
}, "Contact"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
32623
|
-
className:
|
|
32773
|
+
className: sectionCls5
|
|
32624
32774
|
}, /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(FieldLabel, {
|
|
32625
32775
|
htmlFor: "vendorEmail"
|
|
32626
32776
|
}, "Store email"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
@@ -32639,7 +32789,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32639
32789
|
})))), /* @__PURE__ */ React26__namespace.default.createElement("section", null, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
32640
32790
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32641
32791
|
}, "Address"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
32642
|
-
className:
|
|
32792
|
+
className: sectionCls5
|
|
32643
32793
|
}, /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(FieldLabel, {
|
|
32644
32794
|
htmlFor: "addressLine1"
|
|
32645
32795
|
}, "Address line 1"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
@@ -32690,7 +32840,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32690
32840
|
}))))), /* @__PURE__ */ React26__namespace.default.createElement("section", null, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
32691
32841
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32692
32842
|
}, "Tax (India)"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
32693
|
-
className:
|
|
32843
|
+
className: sectionCls5
|
|
32694
32844
|
}, /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(FieldLabel, {
|
|
32695
32845
|
htmlFor: "gstin"
|
|
32696
32846
|
}, "GSTIN"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
@@ -32710,36 +32860,33 @@ function VendorEditPage({ vendorId }) {
|
|
|
32710
32860
|
})))), /* @__PURE__ */ React26__namespace.default.createElement("section", null, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
32711
32861
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32712
32862
|
}, "Owner"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
32713
|
-
className:
|
|
32863
|
+
className: sectionCls5
|
|
32714
32864
|
}, /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(FieldLabel, {
|
|
32715
32865
|
htmlFor: "ownerName",
|
|
32716
|
-
required:
|
|
32866
|
+
required: true
|
|
32717
32867
|
}, "Name"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
32718
32868
|
id: "ownerName",
|
|
32719
|
-
required:
|
|
32720
|
-
readOnly: !create,
|
|
32869
|
+
required: true,
|
|
32721
32870
|
value: ownerName,
|
|
32722
32871
|
onChange: /* @__PURE__ */ __name((e) => setOwnerName(e.target.value), "onChange"),
|
|
32723
|
-
className: `mt-1 ${fieldClass}
|
|
32872
|
+
className: `mt-1 ${fieldClass}`
|
|
32724
32873
|
})), /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(FieldLabel, {
|
|
32725
32874
|
htmlFor: "ownerEmail",
|
|
32726
|
-
required:
|
|
32875
|
+
required: true
|
|
32727
32876
|
}, "Email"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
32728
32877
|
id: "ownerEmail",
|
|
32729
32878
|
type: "email",
|
|
32730
|
-
required:
|
|
32731
|
-
readOnly: !create,
|
|
32879
|
+
required: true,
|
|
32732
32880
|
value: ownerEmail,
|
|
32733
32881
|
onChange: /* @__PURE__ */ __name((e) => setOwnerEmail(e.target.value), "onChange"),
|
|
32734
|
-
className: `mt-1 ${fieldClass}
|
|
32882
|
+
className: `mt-1 ${fieldClass}`
|
|
32735
32883
|
})), /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(FieldLabel, {
|
|
32736
32884
|
htmlFor: "ownerPhone"
|
|
32737
32885
|
}, "Phone"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
32738
32886
|
id: "ownerPhone",
|
|
32739
32887
|
value: ownerPhone,
|
|
32740
32888
|
onChange: /* @__PURE__ */ __name((e) => setOwnerPhone(e.target.value), "onChange"),
|
|
32741
|
-
|
|
32742
|
-
className: `mt-1 ${fieldClass} ${!create ? "bg-gray-100" : ""}`
|
|
32889
|
+
className: `mt-1 ${fieldClass}`
|
|
32743
32890
|
})), /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(FieldLabel, {
|
|
32744
32891
|
htmlFor: "ownerDesignation"
|
|
32745
32892
|
}, "Designation"), /* @__PURE__ */ React26__namespace.default.createElement(Input, {
|
|
@@ -32748,10 +32895,10 @@ function VendorEditPage({ vendorId }) {
|
|
|
32748
32895
|
onChange: /* @__PURE__ */ __name((e) => setOwnerDesignation(e.target.value), "onChange"),
|
|
32749
32896
|
placeholder: "e.g. Director, Proprietor",
|
|
32750
32897
|
className: `mt-1 ${fieldClass}`
|
|
32751
|
-
})), !create && /* @__PURE__ */ React26__namespace.default.createElement("p", {
|
|
32752
|
-
className: "text-xs text-
|
|
32753
|
-
}, "
|
|
32754
|
-
className:
|
|
32898
|
+
})), !create && !ownerUserId && /* @__PURE__ */ React26__namespace.default.createElement("p", {
|
|
32899
|
+
className: "text-xs text-amber-700"
|
|
32900
|
+
}, "No owner user is linked to this vendor, so owner name/email/phone cannot be saved yet."))), create && /* @__PURE__ */ React26__namespace.default.createElement("section", null, /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
32901
|
+
className: sectionCls5
|
|
32755
32902
|
}, /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
32756
32903
|
className: "flex items-start gap-2"
|
|
32757
32904
|
}, /* @__PURE__ */ React26__namespace.default.createElement(Checkbox, {
|
|
@@ -32765,7 +32912,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32765
32912
|
sidebar: /* @__PURE__ */ React26__namespace.default.createElement(React26__namespace.default.Fragment, null, !create && /* @__PURE__ */ React26__namespace.default.createElement("section", null, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
32766
32913
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32767
32914
|
}, "Status"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
32768
|
-
className:
|
|
32915
|
+
className: sectionCls5
|
|
32769
32916
|
}, /* @__PURE__ */ React26__namespace.default.createElement("div", null, /* @__PURE__ */ React26__namespace.default.createElement(FieldLabel, {
|
|
32770
32917
|
htmlFor: "registrationStatus"
|
|
32771
32918
|
}, "Registration status"), /* @__PURE__ */ React26__namespace.default.createElement("select", {
|
|
@@ -32800,7 +32947,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32800
32947
|
})))), create ? /* @__PURE__ */ React26__namespace.default.createElement("section", null, /* @__PURE__ */ React26__namespace.default.createElement("h2", {
|
|
32801
32948
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32802
32949
|
}, "Owner access"), /* @__PURE__ */ React26__namespace.default.createElement("div", {
|
|
32803
|
-
className:
|
|
32950
|
+
className: sectionCls5
|
|
32804
32951
|
}, /* @__PURE__ */ React26__namespace.default.createElement("p", {
|
|
32805
32952
|
className: "text-sm text-gray-600"
|
|
32806
32953
|
}, "Creates the vendor and an invite for the owner. After create, you can send the invite email or copy the invite link."), /* @__PURE__ */ React26__namespace.default.createElement(Button, {
|
|
@@ -32838,7 +32985,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32838
32985
|
onClick: closeInviteDialog
|
|
32839
32986
|
}, "Done")))));
|
|
32840
32987
|
}
|
|
32841
|
-
var isCreate6, fieldClass, selectClass,
|
|
32988
|
+
var isCreate6, fieldClass, selectClass, sectionCls5;
|
|
32842
32989
|
var init_VendorEditPage = __esm({
|
|
32843
32990
|
"src/admin/pages/VendorEditPage.tsx"() {
|
|
32844
32991
|
"use client";
|
|
@@ -32860,7 +33007,7 @@ var init_VendorEditPage = __esm({
|
|
|
32860
33007
|
isCreate6 = /* @__PURE__ */ __name((id) => id === "create", "isCreate");
|
|
32861
33008
|
fieldClass = "w-full rounded-md border border-gray-300 px-3 py-2 text-sm";
|
|
32862
33009
|
selectClass = `${fieldClass} bg-white`;
|
|
32863
|
-
|
|
33010
|
+
sectionCls5 = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50 space-y-4";
|
|
32864
33011
|
__name(ErrorsBanner, "ErrorsBanner");
|
|
32865
33012
|
__name(FieldLabel, "FieldLabel");
|
|
32866
33013
|
__name(VendorEditPage, "VendorEditPage");
|
|
@@ -33159,11 +33306,6 @@ function CollectionsWorkspacePage() {
|
|
|
33159
33306
|
showVendorColumn,
|
|
33160
33307
|
vendorOptions
|
|
33161
33308
|
]);
|
|
33162
|
-
const listParams = React26.useMemo(() => isCatalog ? {
|
|
33163
|
-
isCatalog: "true"
|
|
33164
|
-
} : void 0, [
|
|
33165
|
-
isCatalog
|
|
33166
|
-
]);
|
|
33167
33309
|
const createQueryParams = React26.useMemo(() => isCatalog ? {
|
|
33168
33310
|
isCatalog: "true"
|
|
33169
33311
|
} : void 0, [
|
|
@@ -33179,7 +33321,6 @@ function CollectionsWorkspacePage() {
|
|
|
33179
33321
|
createQueryParams,
|
|
33180
33322
|
defaultSortField: "sortOrder",
|
|
33181
33323
|
defaultSortOrder: "asc",
|
|
33182
|
-
extraListParams: listParams,
|
|
33183
33324
|
filters: collectionFilters
|
|
33184
33325
|
});
|
|
33185
33326
|
}
|
|
@@ -38171,7 +38312,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38171
38312
|
onClick: /* @__PURE__ */ __name(() => setActiveTab("settings"), "onClick")
|
|
38172
38313
|
}, "Settings"))), /* @__PURE__ */ React.createElement(DetailPageLayout, {
|
|
38173
38314
|
main: activeTab === "basic" ? /* @__PURE__ */ React.createElement("section", {
|
|
38174
|
-
className:
|
|
38315
|
+
className: sectionCls6
|
|
38175
38316
|
}, /* @__PURE__ */ React.createElement("dl", {
|
|
38176
38317
|
className: "grid gap-4 sm:grid-cols-2"
|
|
38177
38318
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("dt", {
|
|
@@ -38228,7 +38369,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38228
38369
|
}, "Mode"), /* @__PURE__ */ React.createElement("dd", {
|
|
38229
38370
|
className: valueCls
|
|
38230
38371
|
}, formatMode(event.entityMode))))) : activeTab === "venue" ? /* @__PURE__ */ React.createElement("section", {
|
|
38231
|
-
className:
|
|
38372
|
+
className: sectionCls6
|
|
38232
38373
|
}, /* @__PURE__ */ React.createElement("dl", {
|
|
38233
38374
|
className: "grid gap-4 sm:grid-cols-2"
|
|
38234
38375
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -38252,7 +38393,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38252
38393
|
}, "Country"), /* @__PURE__ */ React.createElement("dd", {
|
|
38253
38394
|
className: valueCls
|
|
38254
38395
|
}, displayValue(event.country ?? (event.cityCountry?.includes(",") ? event.cityCountry.split(",").slice(1).join(",").trim() : null)))))) : activeTab === "datetime" ? /* @__PURE__ */ React.createElement("section", {
|
|
38255
|
-
className:
|
|
38396
|
+
className: sectionCls6
|
|
38256
38397
|
}, /* @__PURE__ */ React.createElement("dl", {
|
|
38257
38398
|
className: "grid gap-4 sm:grid-cols-2"
|
|
38258
38399
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("dt", {
|
|
@@ -38284,7 +38425,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38284
38425
|
}, event.registrationClosesAt ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", null, regClosesFormatted.dateLine), regClosesFormatted.timeLine ? /* @__PURE__ */ React.createElement("div", {
|
|
38285
38426
|
className: "text-gray-600"
|
|
38286
38427
|
}, regClosesFormatted.timeLine) : null) : "\u2014")))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("section", {
|
|
38287
|
-
className:
|
|
38428
|
+
className: sectionCls6
|
|
38288
38429
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
38289
38430
|
className: "space-y-6"
|
|
38290
38431
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h2", {
|
|
@@ -38345,7 +38486,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38345
38486
|
}))
|
|
38346
38487
|
}));
|
|
38347
38488
|
}
|
|
38348
|
-
var
|
|
38489
|
+
var sectionCls6, labelCls7, valueCls;
|
|
38349
38490
|
var init_EventDetailPage = __esm({
|
|
38350
38491
|
"src/admin/pages/EventDetailPage.tsx"() {
|
|
38351
38492
|
"use client";
|
|
@@ -38357,7 +38498,7 @@ var init_EventDetailPage = __esm({
|
|
|
38357
38498
|
init_DetailPageLayout();
|
|
38358
38499
|
init_DetailPageHeader();
|
|
38359
38500
|
init_EventProductsSection();
|
|
38360
|
-
|
|
38501
|
+
sectionCls6 = "border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
38361
38502
|
labelCls7 = "text-xs font-medium text-gray-500";
|
|
38362
38503
|
valueCls = "text-sm text-gray-900 mt-0.5";
|
|
38363
38504
|
__name(displayValue, "displayValue");
|