@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.js
CHANGED
|
@@ -226,111 +226,6 @@ var init_infuro_favicon = __esm({
|
|
|
226
226
|
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==";
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
|
-
function AdminHeader() {
|
|
230
|
-
const { data: session } = useSession();
|
|
231
|
-
const sessionUser = session?.user;
|
|
232
|
-
const roleLabel = sessionUser?.groupName?.trim() || (sessionUser?.isRBACAdmin ? "Administrator" : "Admin user");
|
|
233
|
-
const isMobile = useIsMobile();
|
|
234
|
-
const configuredLogo = process.env.NEXT_PUBLIC_ADMIN_LOGO_URL || DEFAULT_ADMIN_LOGO;
|
|
235
|
-
const [logoSrc, setLogoSrc] = useState(configuredLogo);
|
|
236
|
-
const [logoFailed, setLogoFailed] = useState(false);
|
|
237
|
-
const isDataLogo = useMemo(() => logoSrc.startsWith("data:"), [
|
|
238
|
-
logoSrc
|
|
239
|
-
]);
|
|
240
|
-
const handleLogout = /* @__PURE__ */ __name(() => {
|
|
241
|
-
void adminSignOut();
|
|
242
|
-
}, "handleLogout");
|
|
243
|
-
return /* @__PURE__ */ React.createElement("header", {
|
|
244
|
-
className: "bg-white border-b border-gray-200 px-4 py-2"
|
|
245
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
246
|
-
className: "flex items-center justify-between"
|
|
247
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
248
|
-
className: "flex items-center max-h-9 shrink-0"
|
|
249
|
-
}, !logoFailed ? /* @__PURE__ */ React.createElement(Image, {
|
|
250
|
-
src: logoSrc,
|
|
251
|
-
alt: "Admin",
|
|
252
|
-
width: 120,
|
|
253
|
-
height: 34,
|
|
254
|
-
className: "max-h-9 w-auto object-contain object-left",
|
|
255
|
-
unoptimized: isDataLogo,
|
|
256
|
-
onError: /* @__PURE__ */ __name(() => {
|
|
257
|
-
if (logoSrc !== DEFAULT_ADMIN_LOGO) {
|
|
258
|
-
setLogoSrc(DEFAULT_ADMIN_LOGO);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
setLogoFailed(true);
|
|
262
|
-
}, "onError")
|
|
263
|
-
}) : /* @__PURE__ */ React.createElement("div", {
|
|
264
|
-
className: "flex items-center gap-2"
|
|
265
|
-
}, /* @__PURE__ */ React.createElement(Image, {
|
|
266
|
-
src: INFURO_FAVICON_BASE64,
|
|
267
|
-
alt: "Infuro",
|
|
268
|
-
width: 18,
|
|
269
|
-
height: 18,
|
|
270
|
-
unoptimized: true
|
|
271
|
-
}), /* @__PURE__ */ React.createElement("span", {
|
|
272
|
-
className: "text-sm font-semibold text-gray-800"
|
|
273
|
-
}, "Infuro"))), /* @__PURE__ */ React.createElement("div", {
|
|
274
|
-
className: "flex items-center space-x-3"
|
|
275
|
-
}, /* @__PURE__ */ React.createElement(DropdownMenu, null, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, {
|
|
276
|
-
asChild: true
|
|
277
|
-
}, /* @__PURE__ */ React.createElement(Button, {
|
|
278
|
-
variant: "ghost",
|
|
279
|
-
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"
|
|
280
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
281
|
-
className: "h-7 w-7 rounded-full bg-gray-700 flex items-center justify-center overflow-hidden relative"
|
|
282
|
-
}, session?.user?.image ? /* @__PURE__ */ React.createElement(Image, {
|
|
283
|
-
src: session.user.image,
|
|
284
|
-
alt: session?.user?.name || "User",
|
|
285
|
-
fill: true,
|
|
286
|
-
className: "object-cover"
|
|
287
|
-
}) : /* @__PURE__ */ React.createElement("span", {
|
|
288
|
-
className: "text-xs font-medium text-gray-100"
|
|
289
|
-
}, session?.user?.name?.charAt(0).toUpperCase() || session?.user?.email?.charAt(0).toUpperCase() || "A")), !isMobile && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
290
|
-
className: "flex flex-col items-start"
|
|
291
|
-
}, /* @__PURE__ */ React.createElement("span", {
|
|
292
|
-
className: "text-[13px] font-medium text-gray-900"
|
|
293
|
-
}, session?.user?.name || session?.user?.email || "Admin"), /* @__PURE__ */ React.createElement("span", {
|
|
294
|
-
className: "text-[11px] text-gray-500"
|
|
295
|
-
}, roleLabel)), /* @__PURE__ */ React.createElement(ChevronDown, {
|
|
296
|
-
className: "h-3.5 w-3.5 text-gray-400"
|
|
297
|
-
})))), /* @__PURE__ */ React.createElement(DropdownMenuContent, {
|
|
298
|
-
align: "end",
|
|
299
|
-
className: "w-56"
|
|
300
|
-
}, /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
301
|
-
asChild: true
|
|
302
|
-
}, /* @__PURE__ */ React.createElement(Link2, {
|
|
303
|
-
href: "/admin/profile",
|
|
304
|
-
className: "flex items-center text-gray-600"
|
|
305
|
-
}, /* @__PURE__ */ React.createElement(User, {
|
|
306
|
-
className: "mr-2 h-4 w-4"
|
|
307
|
-
}), "Profile")), /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
308
|
-
asChild: true
|
|
309
|
-
}, /* @__PURE__ */ React.createElement(Link2, {
|
|
310
|
-
href: "/admin/settings",
|
|
311
|
-
className: "flex items-center text-gray-600"
|
|
312
|
-
}, /* @__PURE__ */ React.createElement(Settings, {
|
|
313
|
-
className: "mr-2 h-4 w-4"
|
|
314
|
-
}), "Settings")), /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
315
|
-
onClick: handleLogout,
|
|
316
|
-
className: "text-red-600"
|
|
317
|
-
}, /* @__PURE__ */ React.createElement(LogOut, {
|
|
318
|
-
className: "mr-2 h-4 w-4"
|
|
319
|
-
}), "Sign Out"))))));
|
|
320
|
-
}
|
|
321
|
-
var DEFAULT_ADMIN_LOGO;
|
|
322
|
-
var init_Header = __esm({
|
|
323
|
-
"src/components/Admin/Header.tsx"() {
|
|
324
|
-
"use client";
|
|
325
|
-
init_client_sign_out();
|
|
326
|
-
init_button();
|
|
327
|
-
init_dropdown_menu();
|
|
328
|
-
init_use_mobile();
|
|
329
|
-
init_infuro_favicon();
|
|
330
|
-
DEFAULT_ADMIN_LOGO = "/images/logo/logo.png";
|
|
331
|
-
__name(AdminHeader, "AdminHeader");
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
229
|
|
|
335
230
|
// src/auth/permission-entities.ts
|
|
336
231
|
function isSuperAdminGroupName(name) {
|
|
@@ -438,6 +333,113 @@ var init_vendor_scope = __esm({
|
|
|
438
333
|
__name(canOnboardVendors, "canOnboardVendors");
|
|
439
334
|
}
|
|
440
335
|
});
|
|
336
|
+
function AdminHeader() {
|
|
337
|
+
const { data: session } = useSession();
|
|
338
|
+
const sessionUser = session?.user;
|
|
339
|
+
const roleLabel = sessionUser?.groupName?.trim() || (sessionUser?.isRBACAdmin ? "Administrator" : "Admin user");
|
|
340
|
+
const isVendor = isVendorPortalUser(sessionUser);
|
|
341
|
+
const isMobile = useIsMobile();
|
|
342
|
+
const configuredLogo = process.env.NEXT_PUBLIC_ADMIN_LOGO_URL || DEFAULT_ADMIN_LOGO;
|
|
343
|
+
const [logoSrc, setLogoSrc] = useState(configuredLogo);
|
|
344
|
+
const [logoFailed, setLogoFailed] = useState(false);
|
|
345
|
+
const isDataLogo = useMemo(() => logoSrc.startsWith("data:"), [
|
|
346
|
+
logoSrc
|
|
347
|
+
]);
|
|
348
|
+
const handleLogout = /* @__PURE__ */ __name(() => {
|
|
349
|
+
void adminSignOut();
|
|
350
|
+
}, "handleLogout");
|
|
351
|
+
return /* @__PURE__ */ React.createElement("header", {
|
|
352
|
+
className: "bg-white border-b border-gray-200 px-4 py-2"
|
|
353
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
354
|
+
className: "flex items-center justify-between"
|
|
355
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
356
|
+
className: "flex items-center max-h-9 shrink-0"
|
|
357
|
+
}, !logoFailed ? /* @__PURE__ */ React.createElement(Image, {
|
|
358
|
+
src: logoSrc,
|
|
359
|
+
alt: "Admin",
|
|
360
|
+
width: 120,
|
|
361
|
+
height: 34,
|
|
362
|
+
className: "max-h-9 w-auto object-contain object-left",
|
|
363
|
+
unoptimized: isDataLogo,
|
|
364
|
+
onError: /* @__PURE__ */ __name(() => {
|
|
365
|
+
if (logoSrc !== DEFAULT_ADMIN_LOGO) {
|
|
366
|
+
setLogoSrc(DEFAULT_ADMIN_LOGO);
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
setLogoFailed(true);
|
|
370
|
+
}, "onError")
|
|
371
|
+
}) : /* @__PURE__ */ React.createElement("div", {
|
|
372
|
+
className: "flex items-center gap-2"
|
|
373
|
+
}, /* @__PURE__ */ React.createElement(Image, {
|
|
374
|
+
src: INFURO_FAVICON_BASE64,
|
|
375
|
+
alt: "Infuro",
|
|
376
|
+
width: 18,
|
|
377
|
+
height: 18,
|
|
378
|
+
unoptimized: true
|
|
379
|
+
}), /* @__PURE__ */ React.createElement("span", {
|
|
380
|
+
className: "text-sm font-semibold text-gray-800"
|
|
381
|
+
}, "Infuro"))), /* @__PURE__ */ React.createElement("div", {
|
|
382
|
+
className: "flex items-center space-x-3"
|
|
383
|
+
}, /* @__PURE__ */ React.createElement(DropdownMenu, null, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, {
|
|
384
|
+
asChild: true
|
|
385
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
386
|
+
variant: "ghost",
|
|
387
|
+
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"
|
|
388
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
389
|
+
className: "h-7 w-7 rounded-full bg-gray-700 flex items-center justify-center overflow-hidden relative"
|
|
390
|
+
}, session?.user?.image ? /* @__PURE__ */ React.createElement(Image, {
|
|
391
|
+
src: session.user.image,
|
|
392
|
+
alt: session?.user?.name || "User",
|
|
393
|
+
fill: true,
|
|
394
|
+
className: "object-cover"
|
|
395
|
+
}) : /* @__PURE__ */ React.createElement("span", {
|
|
396
|
+
className: "text-xs font-medium text-gray-100"
|
|
397
|
+
}, session?.user?.name?.charAt(0).toUpperCase() || session?.user?.email?.charAt(0).toUpperCase() || "A")), !isMobile && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
398
|
+
className: "flex flex-col items-start"
|
|
399
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
400
|
+
className: "text-[13px] font-medium text-gray-900"
|
|
401
|
+
}, session?.user?.name || session?.user?.email || "Admin"), /* @__PURE__ */ React.createElement("span", {
|
|
402
|
+
className: "text-[11px] text-gray-500"
|
|
403
|
+
}, roleLabel)), /* @__PURE__ */ React.createElement(ChevronDown, {
|
|
404
|
+
className: "h-3.5 w-3.5 text-gray-400"
|
|
405
|
+
})))), /* @__PURE__ */ React.createElement(DropdownMenuContent, {
|
|
406
|
+
align: "end",
|
|
407
|
+
className: "w-56"
|
|
408
|
+
}, !isVendor && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
409
|
+
asChild: true
|
|
410
|
+
}, /* @__PURE__ */ React.createElement(Link2, {
|
|
411
|
+
href: "/admin/profile",
|
|
412
|
+
className: "flex items-center text-gray-600"
|
|
413
|
+
}, /* @__PURE__ */ React.createElement(User, {
|
|
414
|
+
className: "mr-2 h-4 w-4"
|
|
415
|
+
}), "Profile")), /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
416
|
+
asChild: true
|
|
417
|
+
}, /* @__PURE__ */ React.createElement(Link2, {
|
|
418
|
+
href: "/admin/settings",
|
|
419
|
+
className: "flex items-center text-gray-600"
|
|
420
|
+
}, /* @__PURE__ */ React.createElement(Settings, {
|
|
421
|
+
className: "mr-2 h-4 w-4"
|
|
422
|
+
}), "Settings"))), /* @__PURE__ */ React.createElement(DropdownMenuItem, {
|
|
423
|
+
onClick: handleLogout,
|
|
424
|
+
className: "text-red-600"
|
|
425
|
+
}, /* @__PURE__ */ React.createElement(LogOut, {
|
|
426
|
+
className: "mr-2 h-4 w-4"
|
|
427
|
+
}), "Sign Out"))))));
|
|
428
|
+
}
|
|
429
|
+
var DEFAULT_ADMIN_LOGO;
|
|
430
|
+
var init_Header = __esm({
|
|
431
|
+
"src/components/Admin/Header.tsx"() {
|
|
432
|
+
"use client";
|
|
433
|
+
init_client_sign_out();
|
|
434
|
+
init_button();
|
|
435
|
+
init_dropdown_menu();
|
|
436
|
+
init_use_mobile();
|
|
437
|
+
init_infuro_favicon();
|
|
438
|
+
init_vendor_scope();
|
|
439
|
+
DEFAULT_ADMIN_LOGO = "/images/logo/logo.png";
|
|
440
|
+
__name(AdminHeader, "AdminHeader");
|
|
441
|
+
}
|
|
442
|
+
});
|
|
441
443
|
var defaultValue, AdminConfigContext;
|
|
442
444
|
var init_admin_config_context = __esm({
|
|
443
445
|
"src/admin/admin-config-context.tsx"() {
|
|
@@ -457,7 +459,7 @@ var init_admin_config_context = __esm({
|
|
|
457
459
|
var CMS_VERSION;
|
|
458
460
|
var init_cms_version = __esm({
|
|
459
461
|
"src/lib/cms-version.ts"() {
|
|
460
|
-
CMS_VERSION = "1.0.
|
|
462
|
+
CMS_VERSION = "1.0.45" ;
|
|
461
463
|
}
|
|
462
464
|
});
|
|
463
465
|
function useCatalogCategories(enabled = true) {
|
|
@@ -589,7 +591,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
589
591
|
const iconActive = "text-gray-700";
|
|
590
592
|
const iconInactive = "text-gray-400";
|
|
591
593
|
const linkCls = "flex items-center px-2.5 py-[7px] text-[13px] font-medium rounded-md transition-colors";
|
|
592
|
-
const
|
|
594
|
+
const sectionCls7 = "mb-5";
|
|
593
595
|
const headingCls = "text-[11px] font-semibold text-gray-400 uppercase tracking-wider px-2.5 mb-1.5";
|
|
594
596
|
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";
|
|
595
597
|
return /* @__PURE__ */ React.createElement("aside", {
|
|
@@ -599,7 +601,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
599
601
|
}, /* @__PURE__ */ React.createElement("nav", {
|
|
600
602
|
className: "admin-scroll flex-1 min-h-0 px-3 py-4 pb-4 overflow-y-auto overscroll-contain"
|
|
601
603
|
}, showPlatformNav && /* @__PURE__ */ React.createElement("div", {
|
|
602
|
-
className:
|
|
604
|
+
className: sectionCls7
|
|
603
605
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
604
606
|
className: headingCls
|
|
605
607
|
}, "Main"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -611,7 +613,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
611
613
|
className: `h-4 w-4 mr-2 ${isActive("/admin/dashboard") ? iconActive : iconInactive}`
|
|
612
614
|
}), "Dashboard")))), showPlatformNav && customNavSections.length > 0 && customNavSections.map((section) => /* @__PURE__ */ React.createElement("div", {
|
|
613
615
|
key: section.title,
|
|
614
|
-
className:
|
|
616
|
+
className: sectionCls7
|
|
615
617
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
616
618
|
className: headingCls
|
|
617
619
|
}, section.title), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -627,7 +629,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
627
629
|
className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}`
|
|
628
630
|
}), item.label));
|
|
629
631
|
})))), showPlatformNav && customNavSections.length === 0 && customNavItems.length > 0 && /* @__PURE__ */ React.createElement("div", {
|
|
630
|
-
className:
|
|
632
|
+
className: sectionCls7
|
|
631
633
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
632
634
|
className: headingCls
|
|
633
635
|
}, "Custom"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -643,7 +645,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
643
645
|
className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}`
|
|
644
646
|
}), item.label));
|
|
645
647
|
}))), vendorPortal && /* @__PURE__ */ React.createElement("div", {
|
|
646
|
-
className:
|
|
648
|
+
className: sectionCls7
|
|
647
649
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
648
650
|
className: headingCls
|
|
649
651
|
}, "Main"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -655,7 +657,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
655
657
|
className: `h-4 w-4 mr-2 ${isActive("/admin/dashboard") ? iconActive : iconInactive}`
|
|
656
658
|
}), "Dashboard")))), vendorPortal && customNavSections.length > 0 && customNavSections.map((section) => /* @__PURE__ */ React.createElement("div", {
|
|
657
659
|
key: section.title,
|
|
658
|
-
className:
|
|
660
|
+
className: sectionCls7
|
|
659
661
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
660
662
|
className: headingCls
|
|
661
663
|
}, section.title), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -671,7 +673,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
671
673
|
className: `h-4 w-4 mr-2 ${isActive(item.href) ? iconActive : iconInactive}`
|
|
672
674
|
}), item.label));
|
|
673
675
|
})))), showStoreNav && /* @__PURE__ */ React.createElement("div", {
|
|
674
|
-
className:
|
|
676
|
+
className: sectionCls7
|
|
675
677
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
676
678
|
className: headingCls
|
|
677
679
|
}, "Store"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -737,7 +739,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
737
739
|
}, /* @__PURE__ */ React.createElement(Users, {
|
|
738
740
|
className: `h-4 w-4 mr-2 ${isActive("/admin/vendor_customers") ? iconActive : iconInactive}`
|
|
739
741
|
}), "Customers")))), !vendorPortal && /* @__PURE__ */ React.createElement("div", {
|
|
740
|
-
className:
|
|
742
|
+
className: sectionCls7
|
|
741
743
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
742
744
|
className: headingCls
|
|
743
745
|
}, "Management"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -773,7 +775,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
773
775
|
}, /* @__PURE__ */ React.createElement(Image$1, {
|
|
774
776
|
className: `h-4 w-4 mr-2 ${isActive("/admin/media") ? iconActive : iconInactive}`
|
|
775
777
|
}), "Media")))), vendorPortal && /* @__PURE__ */ React.createElement("div", {
|
|
776
|
-
className:
|
|
778
|
+
className: sectionCls7
|
|
777
779
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
778
780
|
className: headingCls
|
|
779
781
|
}, "Settings"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -794,7 +796,7 @@ function AdminSidebar({ variant = "sidebar" }) {
|
|
|
794
796
|
}, /* @__PURE__ */ React.createElement(FileText, {
|
|
795
797
|
className: `h-4 w-4 mr-2 ${isActive("/admin/policy") ? iconActive : iconInactive}`
|
|
796
798
|
}), "Policy")))), !vendorPortal && /* @__PURE__ */ React.createElement("div", {
|
|
797
|
-
className:
|
|
799
|
+
className: sectionCls7
|
|
798
800
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
799
801
|
className: headingCls
|
|
800
802
|
}, "System"), /* @__PURE__ */ React.createElement("ul", {
|
|
@@ -2104,9 +2106,6 @@ function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns,
|
|
|
2104
2106
|
currency: currency || "INR"
|
|
2105
2107
|
});
|
|
2106
2108
|
const [errors, setErrors] = useState({});
|
|
2107
|
-
const [password, setPassword] = useState("");
|
|
2108
|
-
const [confirmPassword, setConfirmPassword] = useState("");
|
|
2109
|
-
const isCustomerCreate = resource === "vendor_customers" && !existingData;
|
|
2110
2109
|
useEffect(() => {
|
|
2111
2110
|
fetch("/api/settings/store").then((res) => res.json()).then((data) => {
|
|
2112
2111
|
setFormData((prev) => ({
|
|
@@ -2234,8 +2233,6 @@ function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns,
|
|
|
2234
2233
|
});
|
|
2235
2234
|
setFormData(merged);
|
|
2236
2235
|
} else {
|
|
2237
|
-
setPassword("");
|
|
2238
|
-
setConfirmPassword("");
|
|
2239
2236
|
setFormData(columns.filter((col) => !col.hideInForm).reduce((acc, col) => {
|
|
2240
2237
|
const path = col.field || col.key;
|
|
2241
2238
|
if (!path) return acc;
|
|
@@ -2296,18 +2293,6 @@ function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns,
|
|
|
2296
2293
|
}
|
|
2297
2294
|
}
|
|
2298
2295
|
});
|
|
2299
|
-
if (isCustomerCreate) {
|
|
2300
|
-
if (!password) {
|
|
2301
|
-
newErrors["_password"] = "Password is required";
|
|
2302
|
-
} else if (password.length < 6) {
|
|
2303
|
-
newErrors["_password"] = "Password must be at least 6 characters";
|
|
2304
|
-
}
|
|
2305
|
-
if (!confirmPassword) {
|
|
2306
|
-
newErrors["_confirmPassword"] = "Please confirm your password";
|
|
2307
|
-
} else if (password && confirmPassword !== password) {
|
|
2308
|
-
newErrors["_confirmPassword"] = "Passwords do not match";
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
2296
|
setErrors(newErrors);
|
|
2312
2297
|
return Object.keys(newErrors).length === 0;
|
|
2313
2298
|
}, "validateForm");
|
|
@@ -2325,9 +2310,6 @@ function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns,
|
|
|
2325
2310
|
if (!existingData) {
|
|
2326
2311
|
delete payload.id;
|
|
2327
2312
|
}
|
|
2328
|
-
if (isCustomerCreate) {
|
|
2329
|
-
payload._password = password;
|
|
2330
|
-
}
|
|
2331
2313
|
try {
|
|
2332
2314
|
const res = await fetch(url, {
|
|
2333
2315
|
method,
|
|
@@ -2543,25 +2525,7 @@ Note: ${result.note}`);
|
|
|
2543
2525
|
"contact.name": e.target.value
|
|
2544
2526
|
})), "onChange")
|
|
2545
2527
|
})));
|
|
2546
|
-
}),
|
|
2547
|
-
className: "block text-sm font-medium mb-1"
|
|
2548
|
-
}, "Password"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
2549
|
-
type: "password",
|
|
2550
|
-
value: password,
|
|
2551
|
-
onChange: /* @__PURE__ */ __name((e) => setPassword(e.target.value), "onChange"),
|
|
2552
|
-
placeholder: "Min. 6 characters"
|
|
2553
|
-
}), errors["_password"] && /* @__PURE__ */ React26__default.createElement("p", {
|
|
2554
|
-
className: "text-red-500 text-sm mt-1"
|
|
2555
|
-
}, errors["_password"])), /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(Label3, {
|
|
2556
|
-
className: "block text-sm font-medium mb-1"
|
|
2557
|
-
}, "Confirm Password"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
2558
|
-
type: "password",
|
|
2559
|
-
value: confirmPassword,
|
|
2560
|
-
onChange: /* @__PURE__ */ __name((e) => setConfirmPassword(e.target.value), "onChange"),
|
|
2561
|
-
placeholder: "Re-enter password"
|
|
2562
|
-
}), errors["_confirmPassword"] && /* @__PURE__ */ React26__default.createElement("p", {
|
|
2563
|
-
className: "text-red-500 text-sm mt-1"
|
|
2564
|
-
}, errors["_confirmPassword"])))), /* @__PURE__ */ React26__default.createElement("div", {
|
|
2528
|
+
})), /* @__PURE__ */ React26__default.createElement("div", {
|
|
2565
2529
|
className: "flex gap-2 p-4 border-t border-gray-200 shrink-0 bg-white"
|
|
2566
2530
|
}, /* @__PURE__ */ React26__default.createElement(Button, {
|
|
2567
2531
|
type: "submit",
|
|
@@ -3745,13 +3709,13 @@ function CrudSearchFilterBar({ apiEndpoint, listFilters, relationLabelMaps, sear
|
|
|
3745
3709
|
}
|
|
3746
3710
|
const raw = (committedFilterValues[f.param] ?? "").trim();
|
|
3747
3711
|
if (!raw) return null;
|
|
3748
|
-
const
|
|
3712
|
+
const display2 = f.type === "select" ? labelForSelectValue(f, raw, relationLabelMaps) || raw : f.type === "multiSelect" ? labelsForMultiSelectValue(f, raw, relationLabelMaps) || raw : raw;
|
|
3749
3713
|
return /* @__PURE__ */ React.createElement("span", {
|
|
3750
3714
|
key: f.param,
|
|
3751
3715
|
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"
|
|
3752
3716
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
3753
3717
|
className: "truncate"
|
|
3754
|
-
}, f.label, ": ",
|
|
3718
|
+
}, f.label, ": ", display2), /* @__PURE__ */ React.createElement("button", {
|
|
3755
3719
|
type: "button",
|
|
3756
3720
|
className: "ml-0.5 shrink-0 rounded-full p-0.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900",
|
|
3757
3721
|
"aria-label": `Remove ${f.label}`,
|
|
@@ -11941,7 +11905,7 @@ var init_store_crud_configs = __esm({
|
|
|
11941
11905
|
addEditPageUrl: "/admin/brands"
|
|
11942
11906
|
},
|
|
11943
11907
|
product_categories: {
|
|
11944
|
-
title: "
|
|
11908
|
+
title: "Categories",
|
|
11945
11909
|
apiEndpoint: "/api/product_categories",
|
|
11946
11910
|
columns: [
|
|
11947
11911
|
{
|
|
@@ -20050,26 +20014,6 @@ var init_VendorRolesPage = __esm({
|
|
|
20050
20014
|
__name(VendorRolesPage, "VendorRolesPage");
|
|
20051
20015
|
}
|
|
20052
20016
|
});
|
|
20053
|
-
function DetailPageLayout({ main, sidebar }) {
|
|
20054
|
-
if (sidebar == null) {
|
|
20055
|
-
return /* @__PURE__ */ React26__default.createElement("div", {
|
|
20056
|
-
className: "min-w-0 w-full p-4 sm:p-6 space-y-6"
|
|
20057
|
-
}, main);
|
|
20058
|
-
}
|
|
20059
|
-
return /* @__PURE__ */ React26__default.createElement("div", {
|
|
20060
|
-
className: "min-w-0 w-full p-4 sm:p-6 grid grid-cols-1 xl:grid-cols-3 gap-4 sm:gap-6"
|
|
20061
|
-
}, /* @__PURE__ */ React26__default.createElement("div", {
|
|
20062
|
-
className: "min-w-0 w-full xl:col-span-2 space-y-6"
|
|
20063
|
-
}, main), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20064
|
-
className: "min-w-0 w-full xl:col-span-1 space-y-6"
|
|
20065
|
-
}, sidebar));
|
|
20066
|
-
}
|
|
20067
|
-
var init_DetailPageLayout = __esm({
|
|
20068
|
-
"src/components/Admin/DetailPageLayout.tsx"() {
|
|
20069
|
-
"use client";
|
|
20070
|
-
__name(DetailPageLayout, "DetailPageLayout");
|
|
20071
|
-
}
|
|
20072
|
-
});
|
|
20073
20017
|
|
|
20074
20018
|
// src/lib/vendor-profile.ts
|
|
20075
20019
|
function validateIndiaTaxIds(gstin, pan) {
|
|
@@ -20151,25 +20095,45 @@ function labelForRegistrationStatus(value) {
|
|
|
20151
20095
|
if (!value) return "\u2014";
|
|
20152
20096
|
return VENDOR_REGISTRATION_STATUSES.find((s) => s.value === value)?.label ?? value;
|
|
20153
20097
|
}
|
|
20154
|
-
function
|
|
20098
|
+
function display(value) {
|
|
20099
|
+
const s = value?.trim();
|
|
20100
|
+
return s ? s : "\u2014";
|
|
20101
|
+
}
|
|
20102
|
+
function ReadOnlyInput({ id, label, value, className }) {
|
|
20155
20103
|
return /* @__PURE__ */ React26__default.createElement("div", {
|
|
20156
|
-
className
|
|
20157
|
-
}, /* @__PURE__ */ React26__default.createElement(
|
|
20158
|
-
|
|
20159
|
-
}, label), /* @__PURE__ */ React26__default.createElement(
|
|
20160
|
-
|
|
20161
|
-
|
|
20104
|
+
className
|
|
20105
|
+
}, /* @__PURE__ */ React26__default.createElement(Label3, {
|
|
20106
|
+
htmlFor: id
|
|
20107
|
+
}, label), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
20108
|
+
id,
|
|
20109
|
+
value,
|
|
20110
|
+
readOnly: true,
|
|
20111
|
+
disabled: true,
|
|
20112
|
+
className: "mt-1.5 bg-gray-50"
|
|
20113
|
+
}));
|
|
20162
20114
|
}
|
|
20163
20115
|
function VendorPortalProfilePage() {
|
|
20164
20116
|
const router = useRouter();
|
|
20117
|
+
const searchParams = useSearchParams();
|
|
20118
|
+
const tabParam = searchParams.get("tab");
|
|
20165
20119
|
const { data: session, status } = useSession();
|
|
20166
20120
|
const sessionUser = session?.user;
|
|
20121
|
+
const [tab, setTab] = useState(tabParam === "password" ? "password" : "profile");
|
|
20167
20122
|
const [loading, setLoading] = useState(true);
|
|
20168
20123
|
const [error, setError] = useState(null);
|
|
20169
20124
|
const [vendor, setVendor] = useState(null);
|
|
20170
20125
|
const [owner, setOwner] = useState(null);
|
|
20171
|
-
const
|
|
20126
|
+
const [currentPassword, setCurrentPassword] = useState("");
|
|
20127
|
+
const [newPassword, setNewPassword] = useState("");
|
|
20128
|
+
const [confirmPassword, setConfirmPassword] = useState("");
|
|
20129
|
+
const [savingPassword, setSavingPassword] = useState(false);
|
|
20172
20130
|
const sessionUserId = sessionUser?.id != null ? Number(sessionUser.id) : null;
|
|
20131
|
+
useEffect(() => {
|
|
20132
|
+
if (tabParam === "password") setTab("password");
|
|
20133
|
+
else if (tabParam === "profile") setTab("profile");
|
|
20134
|
+
}, [
|
|
20135
|
+
tabParam
|
|
20136
|
+
]);
|
|
20173
20137
|
useEffect(() => {
|
|
20174
20138
|
if (status === "unauthenticated") {
|
|
20175
20139
|
router.replace("/admin/signin");
|
|
@@ -20180,16 +20144,15 @@ function VendorPortalProfilePage() {
|
|
|
20180
20144
|
router.replace("/admin/access-denied");
|
|
20181
20145
|
return;
|
|
20182
20146
|
}
|
|
20183
|
-
if (vendorId == null) {
|
|
20184
|
-
setError("No vendor is linked to your account.");
|
|
20185
|
-
setLoading(false);
|
|
20186
|
-
return;
|
|
20187
|
-
}
|
|
20188
20147
|
let cancelled = false;
|
|
20189
20148
|
(async () => {
|
|
20149
|
+
setLoading(true);
|
|
20190
20150
|
try {
|
|
20191
|
-
const res = await fetch(
|
|
20192
|
-
if (!res.ok)
|
|
20151
|
+
const res = await fetch("/api/admin/vendor/profile");
|
|
20152
|
+
if (!res.ok) {
|
|
20153
|
+
const errBody = await res.json().catch(() => ({}));
|
|
20154
|
+
throw new Error(errBody.error || "Failed to load vendor profile");
|
|
20155
|
+
}
|
|
20193
20156
|
const data = await res.json();
|
|
20194
20157
|
if (cancelled) return;
|
|
20195
20158
|
setVendor(data);
|
|
@@ -20230,9 +20193,13 @@ function VendorPortalProfilePage() {
|
|
|
20230
20193
|
email: data.email ?? null,
|
|
20231
20194
|
phone: data.phone ?? null
|
|
20232
20195
|
});
|
|
20196
|
+
setError(null);
|
|
20197
|
+
}
|
|
20198
|
+
} catch (e) {
|
|
20199
|
+
if (!cancelled) {
|
|
20200
|
+
setVendor(null);
|
|
20201
|
+
setError(e instanceof Error ? e.message : "Failed to load vendor profile.");
|
|
20233
20202
|
}
|
|
20234
|
-
} catch {
|
|
20235
|
-
if (!cancelled) setError("Failed to load vendor profile.");
|
|
20236
20203
|
} finally {
|
|
20237
20204
|
if (!cancelled) setLoading(false);
|
|
20238
20205
|
}
|
|
@@ -20244,158 +20211,293 @@ function VendorPortalProfilePage() {
|
|
|
20244
20211
|
status,
|
|
20245
20212
|
sessionUser,
|
|
20246
20213
|
router,
|
|
20247
|
-
|
|
20214
|
+
sessionUserId,
|
|
20215
|
+
session?.user?.name,
|
|
20216
|
+
session?.user?.email
|
|
20248
20217
|
]);
|
|
20249
|
-
|
|
20218
|
+
const handleChangePassword = /* @__PURE__ */ __name(async (e) => {
|
|
20219
|
+
e.preventDefault();
|
|
20220
|
+
if (newPassword !== confirmPassword) {
|
|
20221
|
+
toast.error("New password and confirmation do not match");
|
|
20222
|
+
return;
|
|
20223
|
+
}
|
|
20224
|
+
if (newPassword.length < 6) {
|
|
20225
|
+
toast.error("New password must be at least 6 characters");
|
|
20226
|
+
return;
|
|
20227
|
+
}
|
|
20228
|
+
setSavingPassword(true);
|
|
20229
|
+
try {
|
|
20230
|
+
const res = await fetch("/api/users/reset-password", {
|
|
20231
|
+
method: "POST",
|
|
20232
|
+
headers: {
|
|
20233
|
+
"Content-Type": "application/json"
|
|
20234
|
+
},
|
|
20235
|
+
body: JSON.stringify({
|
|
20236
|
+
currentPassword,
|
|
20237
|
+
newPassword
|
|
20238
|
+
})
|
|
20239
|
+
});
|
|
20240
|
+
const data = await res.json().catch(() => ({}));
|
|
20241
|
+
if (!res.ok) {
|
|
20242
|
+
toast.error(data.error || "Could not update password");
|
|
20243
|
+
return;
|
|
20244
|
+
}
|
|
20245
|
+
toast.success("Password updated");
|
|
20246
|
+
setCurrentPassword("");
|
|
20247
|
+
setNewPassword("");
|
|
20248
|
+
setConfirmPassword("");
|
|
20249
|
+
} catch {
|
|
20250
|
+
toast.error("Network error");
|
|
20251
|
+
} finally {
|
|
20252
|
+
setSavingPassword(false);
|
|
20253
|
+
}
|
|
20254
|
+
}, "handleChangePassword");
|
|
20255
|
+
const tabs = [
|
|
20256
|
+
{
|
|
20257
|
+
id: "profile",
|
|
20258
|
+
label: "Profile"
|
|
20259
|
+
},
|
|
20260
|
+
{
|
|
20261
|
+
id: "password",
|
|
20262
|
+
label: "Password"
|
|
20263
|
+
}
|
|
20264
|
+
];
|
|
20265
|
+
if (status === "unauthenticated") {
|
|
20266
|
+
return null;
|
|
20267
|
+
}
|
|
20268
|
+
if (status === "loading" || status === "authenticated" && loading) {
|
|
20250
20269
|
return /* @__PURE__ */ React26__default.createElement("div", {
|
|
20251
|
-
className: "flex justify-center py-
|
|
20252
|
-
}, "
|
|
20270
|
+
className: "flex justify-center py-8"
|
|
20271
|
+
}, /* @__PURE__ */ React26__default.createElement("div", {
|
|
20272
|
+
className: "h-6 w-6 animate-spin rounded-full border-2 border-gray-300 border-t-gray-600"
|
|
20273
|
+
}), /* @__PURE__ */ React26__default.createElement("span", {
|
|
20274
|
+
className: "ml-2 text-gray-600"
|
|
20275
|
+
}, "Loading..."));
|
|
20253
20276
|
}
|
|
20254
20277
|
if (error || !vendor) {
|
|
20255
20278
|
return /* @__PURE__ */ React26__default.createElement("div", {
|
|
20256
|
-
className: "
|
|
20279
|
+
className: "min-w-0 rounded-lg bg-white shadow-md"
|
|
20280
|
+
}, /* @__PURE__ */ React26__default.createElement("div", {
|
|
20281
|
+
className: "rounded-t-lg border-b border-gray-700 bg-gray-800 px-4 py-2.5"
|
|
20282
|
+
}, /* @__PURE__ */ React26__default.createElement("h1", {
|
|
20283
|
+
className: "text-base font-semibold text-white"
|
|
20284
|
+
}, "Profile"), /* @__PURE__ */ React26__default.createElement("p", {
|
|
20285
|
+
className: "mt-0.5 text-xs text-gray-300"
|
|
20286
|
+
}, "Your vendor details, and password")), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20287
|
+
className: "p-6"
|
|
20257
20288
|
}, /* @__PURE__ */ React26__default.createElement("p", {
|
|
20258
20289
|
className: "text-sm text-red-600"
|
|
20259
|
-
}, error ?? "Vendor profile not available."));
|
|
20290
|
+
}, error ?? "Vendor profile not available.")));
|
|
20260
20291
|
}
|
|
20261
20292
|
const ownerDesignation = readOwnerDesignation(vendor.metadata);
|
|
20262
|
-
return /* @__PURE__ */ React26__default.createElement(
|
|
20263
|
-
|
|
20264
|
-
|
|
20265
|
-
|
|
20266
|
-
|
|
20267
|
-
|
|
20268
|
-
|
|
20269
|
-
|
|
20270
|
-
|
|
20271
|
-
|
|
20272
|
-
|
|
20273
|
-
|
|
20274
|
-
|
|
20275
|
-
|
|
20276
|
-
|
|
20277
|
-
|
|
20278
|
-
|
|
20279
|
-
|
|
20280
|
-
|
|
20281
|
-
|
|
20282
|
-
|
|
20283
|
-
|
|
20284
|
-
|
|
20285
|
-
|
|
20286
|
-
|
|
20287
|
-
|
|
20288
|
-
|
|
20289
|
-
|
|
20290
|
-
|
|
20291
|
-
|
|
20292
|
-
|
|
20293
|
-
|
|
20294
|
-
|
|
20295
|
-
|
|
20296
|
-
|
|
20297
|
-
|
|
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
|
-
|
|
20293
|
+
return /* @__PURE__ */ React26__default.createElement("div", {
|
|
20294
|
+
className: "min-w-0 rounded-lg bg-white shadow-md"
|
|
20295
|
+
}, /* @__PURE__ */ React26__default.createElement("div", {
|
|
20296
|
+
className: "rounded-t-lg border-b border-gray-700 bg-gray-800 px-4 py-2.5"
|
|
20297
|
+
}, /* @__PURE__ */ React26__default.createElement("h1", {
|
|
20298
|
+
className: "text-base font-semibold text-white"
|
|
20299
|
+
}, "Profile"), /* @__PURE__ */ React26__default.createElement("p", {
|
|
20300
|
+
className: "mt-0.5 text-xs text-gray-300"
|
|
20301
|
+
}, "Your vendor details, and password")), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20302
|
+
className: "flex border-b"
|
|
20303
|
+
}, tabs.map((t) => /* @__PURE__ */ React26__default.createElement("button", {
|
|
20304
|
+
key: t.id,
|
|
20305
|
+
type: "button",
|
|
20306
|
+
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"}`,
|
|
20307
|
+
onClick: /* @__PURE__ */ __name(() => setTab(t.id), "onClick")
|
|
20308
|
+
}, t.label))), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20309
|
+
className: "min-w-0 p-6"
|
|
20310
|
+
}, tab === "profile" && /* @__PURE__ */ React26__default.createElement("div", {
|
|
20311
|
+
className: "space-y-8"
|
|
20312
|
+
}, /* @__PURE__ */ React26__default.createElement("section", {
|
|
20313
|
+
className: "space-y-4"
|
|
20314
|
+
}, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
20315
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20316
|
+
}, "Store"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20317
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20318
|
+
}, /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20319
|
+
id: "v-name",
|
|
20320
|
+
label: "Store name",
|
|
20321
|
+
value: display(vendor.name)
|
|
20322
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20323
|
+
id: "v-legal",
|
|
20324
|
+
label: "Legal name",
|
|
20325
|
+
value: display(vendor.legalName)
|
|
20326
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20327
|
+
id: "v-slug",
|
|
20328
|
+
label: "Slug",
|
|
20329
|
+
value: display(vendor.slug)
|
|
20330
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20331
|
+
id: "v-biz",
|
|
20332
|
+
label: "Business type",
|
|
20333
|
+
value: labelForBusinessType(vendor.businessType)
|
|
20334
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20335
|
+
id: "v-reg",
|
|
20336
|
+
label: "Registration status",
|
|
20337
|
+
value: labelForRegistrationStatus(vendor.registrationStatus)
|
|
20338
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20339
|
+
id: "v-active",
|
|
20340
|
+
label: "Active",
|
|
20341
|
+
value: vendor.active ? "Yes" : "No"
|
|
20342
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20343
|
+
id: "v-invite",
|
|
20344
|
+
label: "Invite status",
|
|
20345
|
+
value: display(vendor.inviteStatus)
|
|
20346
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20347
|
+
id: "v-created",
|
|
20348
|
+
label: "Created",
|
|
20349
|
+
value: vendor.createdAt ? new Date(vendor.createdAt).toLocaleString() : "\u2014"
|
|
20350
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20351
|
+
id: "v-desc",
|
|
20352
|
+
label: "Description",
|
|
20353
|
+
value: display(vendor.description),
|
|
20354
|
+
className: "md:col-span-2"
|
|
20355
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20356
|
+
id: "v-web",
|
|
20357
|
+
label: "Website",
|
|
20358
|
+
value: display(vendor.website),
|
|
20359
|
+
className: "md:col-span-2"
|
|
20360
|
+
}))), /* @__PURE__ */ React26__default.createElement("section", {
|
|
20361
|
+
className: "space-y-4"
|
|
20362
|
+
}, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
20363
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20364
|
+
}, "Contact"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20365
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20366
|
+
}, /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20367
|
+
id: "v-email",
|
|
20368
|
+
label: "Email",
|
|
20369
|
+
value: display(vendor.email)
|
|
20370
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20371
|
+
id: "v-phone",
|
|
20372
|
+
label: "Phone",
|
|
20373
|
+
value: display(vendor.phone)
|
|
20374
|
+
}))), /* @__PURE__ */ React26__default.createElement("section", {
|
|
20375
|
+
className: "space-y-4"
|
|
20376
|
+
}, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
20377
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20378
|
+
}, "Address"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20379
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20380
|
+
}, /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20381
|
+
id: "v-a1",
|
|
20382
|
+
label: "Address line 1",
|
|
20383
|
+
value: display(vendor.addressLine1)
|
|
20384
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20385
|
+
id: "v-a2",
|
|
20386
|
+
label: "Address line 2",
|
|
20387
|
+
value: display(vendor.addressLine2)
|
|
20388
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20389
|
+
id: "v-city",
|
|
20390
|
+
label: "City",
|
|
20391
|
+
value: display(vendor.city)
|
|
20392
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20393
|
+
id: "v-state",
|
|
20394
|
+
label: "State",
|
|
20395
|
+
value: display(vendor.state)
|
|
20396
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20397
|
+
id: "v-country",
|
|
20398
|
+
label: "Country",
|
|
20399
|
+
value: display(vendor.country)
|
|
20400
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20401
|
+
id: "v-postal",
|
|
20402
|
+
label: "Postal code",
|
|
20403
|
+
value: display(vendor.postalCode)
|
|
20404
|
+
}))), /* @__PURE__ */ React26__default.createElement("section", {
|
|
20405
|
+
className: "space-y-4"
|
|
20406
|
+
}, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
20407
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20408
|
+
}, "Tax & compliance"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20409
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20410
|
+
}, /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20411
|
+
id: "v-gstin",
|
|
20412
|
+
label: "GSTIN",
|
|
20413
|
+
value: display(vendor.gstin)
|
|
20414
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20415
|
+
id: "v-pan",
|
|
20416
|
+
label: "PAN",
|
|
20417
|
+
value: display(vendor.pan)
|
|
20418
|
+
}))), /* @__PURE__ */ React26__default.createElement("section", {
|
|
20419
|
+
className: "space-y-4"
|
|
20420
|
+
}, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
20421
|
+
className: "text-sm font-semibold text-gray-900"
|
|
20422
|
+
}, "Owner"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20423
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full"
|
|
20424
|
+
}, /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20425
|
+
id: "o-name",
|
|
20426
|
+
label: "Name",
|
|
20427
|
+
value: display(owner?.name)
|
|
20428
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20429
|
+
id: "o-email",
|
|
20430
|
+
label: "Email",
|
|
20431
|
+
value: display(owner?.email)
|
|
20432
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20433
|
+
id: "o-phone",
|
|
20434
|
+
label: "Phone",
|
|
20435
|
+
value: display(owner?.phone)
|
|
20436
|
+
}), /* @__PURE__ */ React26__default.createElement(ReadOnlyInput, {
|
|
20437
|
+
id: "o-desig",
|
|
20438
|
+
label: "Designation",
|
|
20439
|
+
value: display(ownerDesignation || void 0)
|
|
20440
|
+
})), vendor.logo ? /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(Label3, null, "Logo"), /* @__PURE__ */ React26__default.createElement("img", {
|
|
20441
|
+
src: vendor.logo,
|
|
20442
|
+
alt: "Vendor logo",
|
|
20443
|
+
className: "mt-1.5 max-h-24 rounded border border-gray-200 bg-white object-contain"
|
|
20444
|
+
})) : null)), tab === "password" && /* @__PURE__ */ React26__default.createElement("div", {
|
|
20445
|
+
className: "space-y-6"
|
|
20446
|
+
}, /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
20447
|
+
className: "mb-2 text-lg font-semibold text-gray-900"
|
|
20448
|
+
}, "Change password"), /* @__PURE__ */ React26__default.createElement("form", {
|
|
20449
|
+
onSubmit: handleChangePassword,
|
|
20450
|
+
className: "max-w-md space-y-4"
|
|
20451
|
+
}, /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(Label3, {
|
|
20452
|
+
htmlFor: "current-password",
|
|
20453
|
+
className: "text-sm text-gray-700"
|
|
20454
|
+
}, "Current password"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
20455
|
+
id: "current-password",
|
|
20456
|
+
type: "password",
|
|
20457
|
+
value: currentPassword,
|
|
20458
|
+
onChange: /* @__PURE__ */ __name((e) => setCurrentPassword(e.target.value), "onChange"),
|
|
20459
|
+
className: "mt-1.5",
|
|
20460
|
+
autoComplete: "current-password"
|
|
20461
|
+
})), /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(Label3, {
|
|
20462
|
+
htmlFor: "new-password",
|
|
20463
|
+
className: "text-sm text-gray-700"
|
|
20464
|
+
}, "New password"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
20465
|
+
id: "new-password",
|
|
20466
|
+
type: "password",
|
|
20467
|
+
value: newPassword,
|
|
20468
|
+
onChange: /* @__PURE__ */ __name((e) => setNewPassword(e.target.value), "onChange"),
|
|
20469
|
+
className: "mt-1.5",
|
|
20470
|
+
autoComplete: "new-password"
|
|
20471
|
+
})), /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(Label3, {
|
|
20472
|
+
htmlFor: "confirm-password",
|
|
20473
|
+
className: "text-sm text-gray-700"
|
|
20474
|
+
}, "Confirm new password"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
20475
|
+
id: "confirm-password",
|
|
20476
|
+
type: "password",
|
|
20477
|
+
value: confirmPassword,
|
|
20478
|
+
onChange: /* @__PURE__ */ __name((e) => setConfirmPassword(e.target.value), "onChange"),
|
|
20479
|
+
className: "mt-1.5",
|
|
20480
|
+
autoComplete: "new-password"
|
|
20481
|
+
})), /* @__PURE__ */ React26__default.createElement(Button, {
|
|
20482
|
+
type: "submit",
|
|
20483
|
+
variant: "secondary",
|
|
20484
|
+
disabled: savingPassword
|
|
20485
|
+
}, /* @__PURE__ */ React26__default.createElement(KeyRound, {
|
|
20486
|
+
className: "mr-2 h-4 w-4"
|
|
20487
|
+
}), savingPassword ? "Updating..." : "Update password"))))));
|
|
20387
20488
|
}
|
|
20388
|
-
var sectionCls;
|
|
20389
20489
|
var init_VendorPortalProfilePage = __esm({
|
|
20390
20490
|
"src/admin/pages/VendorPortalProfilePage.tsx"() {
|
|
20391
20491
|
"use client";
|
|
20392
20492
|
init_vendor_scope();
|
|
20393
|
-
|
|
20493
|
+
init_button();
|
|
20494
|
+
init_input();
|
|
20495
|
+
init_label();
|
|
20394
20496
|
init_vendor_profile();
|
|
20395
|
-
sectionCls = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50 space-y-3";
|
|
20396
20497
|
__name(labelForBusinessType, "labelForBusinessType");
|
|
20397
20498
|
__name(labelForRegistrationStatus, "labelForRegistrationStatus");
|
|
20398
|
-
__name(
|
|
20499
|
+
__name(display, "display");
|
|
20500
|
+
__name(ReadOnlyInput, "ReadOnlyInput");
|
|
20399
20501
|
__name(VendorPortalProfilePage, "VendorPortalProfilePage");
|
|
20400
20502
|
}
|
|
20401
20503
|
});
|
|
@@ -20632,6 +20734,26 @@ var init_SubmissionDetailPage = __esm({
|
|
|
20632
20734
|
__name(SubmissionDetailPage, "SubmissionDetailPage");
|
|
20633
20735
|
}
|
|
20634
20736
|
});
|
|
20737
|
+
function DetailPageLayout({ main, sidebar }) {
|
|
20738
|
+
if (sidebar == null) {
|
|
20739
|
+
return /* @__PURE__ */ React26__default.createElement("div", {
|
|
20740
|
+
className: "min-w-0 w-full p-4 sm:p-6 space-y-6"
|
|
20741
|
+
}, main);
|
|
20742
|
+
}
|
|
20743
|
+
return /* @__PURE__ */ React26__default.createElement("div", {
|
|
20744
|
+
className: "min-w-0 w-full p-4 sm:p-6 grid grid-cols-1 xl:grid-cols-3 gap-4 sm:gap-6"
|
|
20745
|
+
}, /* @__PURE__ */ React26__default.createElement("div", {
|
|
20746
|
+
className: "min-w-0 w-full xl:col-span-2 space-y-6"
|
|
20747
|
+
}, main), /* @__PURE__ */ React26__default.createElement("div", {
|
|
20748
|
+
className: "min-w-0 w-full xl:col-span-1 space-y-6"
|
|
20749
|
+
}, sidebar));
|
|
20750
|
+
}
|
|
20751
|
+
var init_DetailPageLayout = __esm({
|
|
20752
|
+
"src/components/Admin/DetailPageLayout.tsx"() {
|
|
20753
|
+
"use client";
|
|
20754
|
+
__name(DetailPageLayout, "DetailPageLayout");
|
|
20755
|
+
}
|
|
20756
|
+
});
|
|
20635
20757
|
|
|
20636
20758
|
// src/admin/pages/OrderDetailPage.tsx
|
|
20637
20759
|
var OrderDetailPage_exports = {};
|
|
@@ -22578,20 +22700,7 @@ function OrderPlacementPage({ editOrderId }) {
|
|
|
22578
22700
|
} catch {
|
|
22579
22701
|
}
|
|
22580
22702
|
}
|
|
22581
|
-
|
|
22582
|
-
if (placeForSomeoneElse) {
|
|
22583
|
-
if (contactEmail) {
|
|
22584
|
-
try {
|
|
22585
|
-
const res2 = await fetch(`/api/contacts?search=${encodeURIComponent(contactEmail)}&limit=5`);
|
|
22586
|
-
if (res2.ok) {
|
|
22587
|
-
const data = await res2.json();
|
|
22588
|
-
const match = data.data?.find((c) => c.email?.toLowerCase() === contactEmail.toLowerCase());
|
|
22589
|
-
if (match) orderContactId = match.id;
|
|
22590
|
-
}
|
|
22591
|
-
} catch {
|
|
22592
|
-
}
|
|
22593
|
-
}
|
|
22594
|
-
}
|
|
22703
|
+
const orderContactId = resolvedContactId;
|
|
22595
22704
|
const payload = {
|
|
22596
22705
|
status,
|
|
22597
22706
|
currency,
|
|
@@ -22613,6 +22722,9 @@ function OrderPlacementPage({ editOrderId }) {
|
|
|
22613
22722
|
};
|
|
22614
22723
|
if (orderContactId != null) payload.contactId = orderContactId;
|
|
22615
22724
|
if (!placeForSomeoneElse && contactId != null) payload.customerId = contactId;
|
|
22725
|
+
if (placeForSomeoneElse && selectedCustomerId != null) {
|
|
22726
|
+
payload.accountCustomerId = selectedCustomerId;
|
|
22727
|
+
}
|
|
22616
22728
|
if (coupons.length > 0) payload.discountId = coupons[0].discountId;
|
|
22617
22729
|
const url = editOrderId ? `/api/orders/${editOrderId}` : "/api/orders";
|
|
22618
22730
|
const method = editOrderId ? "PUT" : "POST";
|
|
@@ -27048,7 +27160,7 @@ function variantsFromForm(rows, defaultCurrency) {
|
|
|
27048
27160
|
};
|
|
27049
27161
|
}).filter((row) => row != null);
|
|
27050
27162
|
}
|
|
27051
|
-
function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptionRows, onVariantOptionRowsChange, variantRows, onVariantRowsChange, defaultCurrency, currencySymbol: currencySymbol3 }) {
|
|
27163
|
+
function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptionRows, onVariantOptionRowsChange, variantRows, onVariantRowsChange, defaultCurrency, currencySymbol: currencySymbol3, lockVariantStatus = false }) {
|
|
27052
27164
|
const parsedOptions = variantOptionsFromForm(variantOptionRows);
|
|
27053
27165
|
const baseCurrency = defaultCurrency.trim().toUpperCase() || "INR";
|
|
27054
27166
|
const setOptionName = /* @__PURE__ */ __name((index, value) => {
|
|
@@ -27118,7 +27230,7 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27118
27230
|
}), "This product has variants")), !hasVariants ? /* @__PURE__ */ React.createElement("p", {
|
|
27119
27231
|
className: "text-xs text-gray-500"
|
|
27120
27232
|
}, "Enable variants for products with options like size, color, or material.") : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
27121
|
-
className:
|
|
27233
|
+
className: sectionCls
|
|
27122
27234
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
27123
27235
|
className: "mb-3"
|
|
27124
27236
|
}, /* @__PURE__ */ React.createElement("p", {
|
|
@@ -27188,7 +27300,7 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27188
27300
|
disabled: !parsedOptions.length,
|
|
27189
27301
|
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"
|
|
27190
27302
|
}, "Generate variants")))), /* @__PURE__ */ React.createElement("div", {
|
|
27191
|
-
className:
|
|
27303
|
+
className: sectionCls
|
|
27192
27304
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
27193
27305
|
className: "mb-3 flex flex-wrap items-center justify-between gap-2"
|
|
27194
27306
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", {
|
|
@@ -27283,9 +27395,11 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27283
27395
|
})), /* @__PURE__ */ React.createElement("td", {
|
|
27284
27396
|
className: "px-3 py-2 align-top"
|
|
27285
27397
|
}, /* @__PURE__ */ React.createElement("select", {
|
|
27286
|
-
value: row.status,
|
|
27398
|
+
value: lockVariantStatus ? "draft" : row.status,
|
|
27287
27399
|
onChange: /* @__PURE__ */ __name((e) => setVariantField(i, "status", e.target.value), "onChange"),
|
|
27288
|
-
className: inputCls2
|
|
27400
|
+
className: inputCls2,
|
|
27401
|
+
disabled: lockVariantStatus,
|
|
27402
|
+
title: lockVariantStatus ? "Variant status stays draft until the product is approved" : void 0
|
|
27289
27403
|
}, /* @__PURE__ */ React.createElement("option", {
|
|
27290
27404
|
value: "draft"
|
|
27291
27405
|
}, "Draft"), /* @__PURE__ */ React.createElement("option", {
|
|
@@ -27294,7 +27408,9 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27294
27408
|
value: "reserved"
|
|
27295
27409
|
}, "Reserved"), /* @__PURE__ */ React.createElement("option", {
|
|
27296
27410
|
value: "sold"
|
|
27297
|
-
}, "Sold"))
|
|
27411
|
+
}, "Sold")), lockVariantStatus ? /* @__PURE__ */ React.createElement("p", {
|
|
27412
|
+
className: "mt-1 text-[11px] text-gray-500"
|
|
27413
|
+
}, "Locked until product approval") : null), /* @__PURE__ */ React.createElement("td", {
|
|
27298
27414
|
className: "px-3 py-2 align-top min-w-[240px]"
|
|
27299
27415
|
}, (() => {
|
|
27300
27416
|
const lines = row.imageUrlsText === "" ? [
|
|
@@ -27336,7 +27452,7 @@ function ProductVariantsSection({ hasVariants, onHasVariantsChange, variantOptio
|
|
|
27336
27452
|
className: "h-4 w-4"
|
|
27337
27453
|
})))))))))));
|
|
27338
27454
|
}
|
|
27339
|
-
var labelCls2, inputCls2,
|
|
27455
|
+
var labelCls2, inputCls2, sectionCls;
|
|
27340
27456
|
var init_ProductVariantsSection = __esm({
|
|
27341
27457
|
"src/admin/pages/ProductVariantsSection.tsx"() {
|
|
27342
27458
|
"use client";
|
|
@@ -27344,7 +27460,7 @@ var init_ProductVariantsSection = __esm({
|
|
|
27344
27460
|
init_ImageOrUrlField();
|
|
27345
27461
|
labelCls2 = "block text-xs font-medium text-gray-600 mb-1";
|
|
27346
27462
|
inputCls2 = "w-full rounded-md border border-gray-300 px-2 py-1.5 text-sm";
|
|
27347
|
-
|
|
27463
|
+
sectionCls = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
27348
27464
|
__name(emptyVariantOptionRow, "emptyVariantOptionRow");
|
|
27349
27465
|
__name(emptyVariantFormRow, "emptyVariantFormRow");
|
|
27350
27466
|
__name(variantOptionsFromForm, "variantOptionsFromForm");
|
|
@@ -27469,13 +27585,14 @@ function apiVariantsToDrafts(rows, _defaultCurrency) {
|
|
|
27469
27585
|
};
|
|
27470
27586
|
});
|
|
27471
27587
|
}
|
|
27472
|
-
async function syncProductVariants(productId, drafts) {
|
|
27588
|
+
async function syncProductVariants(productId, drafts, productStatus) {
|
|
27473
27589
|
const listRes = await fetch(`/api/product_variants?productId=${productId}&limit=500`);
|
|
27474
27590
|
const listData = listRes.ok ? await listRes.json() : {
|
|
27475
27591
|
data: []
|
|
27476
27592
|
};
|
|
27477
27593
|
const existing = Array.isArray(listData.data) ? listData.data : [];
|
|
27478
27594
|
const wantedIds = new Set(drafts.filter((d) => d.id != null).map((d) => d.id));
|
|
27595
|
+
const forceDraft = productStatus !== "available";
|
|
27479
27596
|
for (const row of existing) {
|
|
27480
27597
|
if (!wantedIds.has(row.id)) {
|
|
27481
27598
|
const del = await fetch(`/api/product_variants/${row.id}`, {
|
|
@@ -27485,6 +27602,7 @@ async function syncProductVariants(productId, drafts) {
|
|
|
27485
27602
|
}
|
|
27486
27603
|
}
|
|
27487
27604
|
for (const draft of drafts) {
|
|
27605
|
+
const nextStatus = forceDraft ? "draft" : draft.status === "reserved" || draft.status === "sold" ? draft.status : "available";
|
|
27488
27606
|
const payload = {
|
|
27489
27607
|
productId,
|
|
27490
27608
|
sku: draft.sku,
|
|
@@ -27492,7 +27610,7 @@ async function syncProductVariants(productId, drafts) {
|
|
|
27492
27610
|
compareAtPrice: draft.compareAtPrice,
|
|
27493
27611
|
currencyPrices: null,
|
|
27494
27612
|
inventory: draft.inventory,
|
|
27495
|
-
status:
|
|
27613
|
+
status: nextStatus,
|
|
27496
27614
|
attributes: draft.attributes,
|
|
27497
27615
|
imageUrls: draft.imageUrls.length ? draft.imageUrls : null
|
|
27498
27616
|
};
|
|
@@ -28307,7 +28425,7 @@ function ProductEditPage({ productId }) {
|
|
|
28307
28425
|
}
|
|
28308
28426
|
}
|
|
28309
28427
|
if (hasVariants) {
|
|
28310
|
-
const variantErr = await syncProductVariants(Number(savedId), variantsFromForm(variantRows, pricingConfig.defaultCurrency));
|
|
28428
|
+
const variantErr = await syncProductVariants(Number(savedId), variantsFromForm(variantRows, pricingConfig.defaultCurrency), String(savedProduct.status ?? status));
|
|
28311
28429
|
if (variantErr) {
|
|
28312
28430
|
setErrors([
|
|
28313
28431
|
variantErr
|
|
@@ -28321,7 +28439,7 @@ function ProductEditPage({ productId }) {
|
|
|
28321
28439
|
setVariantRows(variantsToForm(apiVariantsToDrafts(reloadRows, pricingConfig.defaultCurrency), pricingConfig.defaultCurrency));
|
|
28322
28440
|
}
|
|
28323
28441
|
} else {
|
|
28324
|
-
const variantErr = await syncProductVariants(Number(savedId), []);
|
|
28442
|
+
const variantErr = await syncProductVariants(Number(savedId), [], String(savedProduct.status ?? status));
|
|
28325
28443
|
if (variantErr) {
|
|
28326
28444
|
setErrors([
|
|
28327
28445
|
variantErr
|
|
@@ -28514,7 +28632,7 @@ function ProductEditPage({ productId }) {
|
|
|
28514
28632
|
}, "Step 1 \u2014 Product")), /* @__PURE__ */ React.createElement("h2", {
|
|
28515
28633
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28516
28634
|
}, "Product details"), /* @__PURE__ */ React.createElement("div", {
|
|
28517
|
-
className: `${
|
|
28635
|
+
className: `${sectionCls2} space-y-4`
|
|
28518
28636
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", {
|
|
28519
28637
|
className: labelCls3
|
|
28520
28638
|
}, "Name *"), /* @__PURE__ */ React.createElement("input", {
|
|
@@ -28733,13 +28851,14 @@ function ProductEditPage({ productId }) {
|
|
|
28733
28851
|
variantRows,
|
|
28734
28852
|
onVariantRowsChange: setVariantRows,
|
|
28735
28853
|
defaultCurrency: pricingConfig.defaultCurrency,
|
|
28736
|
-
currencySymbol: defaultCurrencySymbol
|
|
28854
|
+
currencySymbol: defaultCurrencySymbol,
|
|
28855
|
+
lockVariantStatus: vendorPortal && (status !== "available" || approvalOn && approvalStatus !== "approved")
|
|
28737
28856
|
}), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
28738
28857
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28739
28858
|
}, "Taxes & Policy"), /* @__PURE__ */ React.createElement("p", {
|
|
28740
28859
|
className: "text-xs text-gray-500 mb-2"
|
|
28741
28860
|
}, "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", {
|
|
28742
|
-
className: `${
|
|
28861
|
+
className: `${sectionCls2} space-y-4`
|
|
28743
28862
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", {
|
|
28744
28863
|
className: labelCls3
|
|
28745
28864
|
}, "Refund / Return Policy"), /* @__PURE__ */ React.createElement("select", {
|
|
@@ -28817,7 +28936,7 @@ function ProductEditPage({ productId }) {
|
|
|
28817
28936
|
}, "Attributes (facets)"), /* @__PURE__ */ React.createElement("p", {
|
|
28818
28937
|
className: "text-xs text-gray-500 mb-2"
|
|
28819
28938
|
}, "Search existing attributes or create new ones (like blog categories). Value on the right."), /* @__PURE__ */ React.createElement("div", {
|
|
28820
|
-
className: `${
|
|
28939
|
+
className: `${sectionCls2} space-y-2`
|
|
28821
28940
|
}, facetRows.map((row, i) => /* @__PURE__ */ React.createElement("div", {
|
|
28822
28941
|
key: i,
|
|
28823
28942
|
className: "flex gap-2 items-start"
|
|
@@ -28846,7 +28965,7 @@ function ProductEditPage({ productId }) {
|
|
|
28846
28965
|
}), " Add attribute"))), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
28847
28966
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28848
28967
|
}, "Media"), /* @__PURE__ */ React.createElement("div", {
|
|
28849
|
-
className: `${
|
|
28968
|
+
className: `${sectionCls2} space-y-3`
|
|
28850
28969
|
}, images.map((row, i) => /* @__PURE__ */ React.createElement("div", {
|
|
28851
28970
|
key: i,
|
|
28852
28971
|
className: "flex flex-wrap items-start gap-2 p-2 bg-white rounded border border-gray-200"
|
|
@@ -28888,7 +29007,7 @@ function ProductEditPage({ productId }) {
|
|
|
28888
29007
|
}), " Add image"))), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
28889
29008
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28890
29009
|
}, "Specifications"), /* @__PURE__ */ React.createElement("div", {
|
|
28891
|
-
className: `${
|
|
29010
|
+
className: `${sectionCls2} space-y-2`
|
|
28892
29011
|
}, specifications.map((row, i) => /* @__PURE__ */ React.createElement("div", {
|
|
28893
29012
|
key: i,
|
|
28894
29013
|
className: "flex gap-2"
|
|
@@ -28919,7 +29038,7 @@ function ProductEditPage({ productId }) {
|
|
|
28919
29038
|
}), " Add row"))), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
28920
29039
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
28921
29040
|
}, "SEO"), /* @__PURE__ */ React.createElement("div", {
|
|
28922
|
-
className:
|
|
29041
|
+
className: sectionCls2
|
|
28923
29042
|
}, /* @__PURE__ */ React.createElement(SeoSection, {
|
|
28924
29043
|
values: seo,
|
|
28925
29044
|
onChange: /* @__PURE__ */ __name((field, value) => setSeo((s) => ({
|
|
@@ -28929,7 +29048,7 @@ function ProductEditPage({ productId }) {
|
|
|
28929
29048
|
}))))
|
|
28930
29049
|
}));
|
|
28931
29050
|
}
|
|
28932
|
-
var isCreate2,
|
|
29051
|
+
var isCreate2, sectionCls2, labelCls3, inputCls3, DEFAULT_PRICING_CONFIG;
|
|
28933
29052
|
var init_ProductEditPage = __esm({
|
|
28934
29053
|
"src/admin/pages/ProductEditPage.tsx"() {
|
|
28935
29054
|
"use client";
|
|
@@ -28953,7 +29072,7 @@ var init_ProductEditPage = __esm({
|
|
|
28953
29072
|
init_product_variants();
|
|
28954
29073
|
__name(parseCategoryIdFromReturnUrl, "parseCategoryIdFromReturnUrl");
|
|
28955
29074
|
isCreate2 = /* @__PURE__ */ __name((id) => id === "create", "isCreate");
|
|
28956
|
-
|
|
29075
|
+
sectionCls2 = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
28957
29076
|
labelCls3 = "block text-xs font-medium text-gray-600 mb-1";
|
|
28958
29077
|
inputCls3 = "w-full rounded-md border border-gray-300 px-2 py-1.5 text-sm";
|
|
28959
29078
|
__name(buildProductMetadata, "buildProductMetadata");
|
|
@@ -29378,7 +29497,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29378
29497
|
main: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
29379
29498
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
29380
29499
|
}, "Basic info"), /* @__PURE__ */ React.createElement("div", {
|
|
29381
|
-
className: `${
|
|
29500
|
+
className: `${sectionCls3} space-y-4`
|
|
29382
29501
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("label", {
|
|
29383
29502
|
className: labelCls4
|
|
29384
29503
|
}, "Name *"), /* @__PURE__ */ React.createElement("input", {
|
|
@@ -29464,7 +29583,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29464
29583
|
}), "Advanced page content"), advancedOpen && /* @__PURE__ */ React.createElement("div", {
|
|
29465
29584
|
className: "space-y-4"
|
|
29466
29585
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
29467
|
-
className:
|
|
29586
|
+
className: sectionCls3
|
|
29468
29587
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
29469
29588
|
className: "text-xs font-medium text-gray-700 mb-2"
|
|
29470
29589
|
}, "Hero carousel"), heroSlides.map((slide, i) => /* @__PURE__ */ React.createElement("div", {
|
|
@@ -29510,7 +29629,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29510
29629
|
}, /* @__PURE__ */ React.createElement(Plus, {
|
|
29511
29630
|
className: "h-3.5 w-3.5"
|
|
29512
29631
|
}), " Add slide")), /* @__PURE__ */ React.createElement("div", {
|
|
29513
|
-
className:
|
|
29632
|
+
className: sectionCls3
|
|
29514
29633
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
29515
29634
|
className: "text-xs font-medium text-gray-700 mb-2"
|
|
29516
29635
|
}, "Variants"), variants.map((v, i) => /* @__PURE__ */ React.createElement("div", {
|
|
@@ -29570,7 +29689,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29570
29689
|
}, /* @__PURE__ */ React.createElement(Plus, {
|
|
29571
29690
|
className: "h-3.5 w-3.5"
|
|
29572
29691
|
}), " Add variant")), /* @__PURE__ */ React.createElement("div", {
|
|
29573
|
-
className:
|
|
29692
|
+
className: sectionCls3
|
|
29574
29693
|
}, /* @__PURE__ */ React.createElement("label", {
|
|
29575
29694
|
className: labelCls4
|
|
29576
29695
|
}, "Experience description"), /* @__PURE__ */ React.createElement("textarea", {
|
|
@@ -29580,7 +29699,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29580
29699
|
rows: 2,
|
|
29581
29700
|
placeholder: "Optional"
|
|
29582
29701
|
})), /* @__PURE__ */ React.createElement("div", {
|
|
29583
|
-
className:
|
|
29702
|
+
className: sectionCls3
|
|
29584
29703
|
}, /* @__PURE__ */ React.createElement("label", {
|
|
29585
29704
|
className: labelCls4
|
|
29586
29705
|
}, "Brochure URL"), /* @__PURE__ */ React.createElement("input", {
|
|
@@ -29593,7 +29712,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29593
29712
|
sidebar: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
29594
29713
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
29595
29714
|
}, "Status"), /* @__PURE__ */ React.createElement("div", {
|
|
29596
|
-
className:
|
|
29715
|
+
className: sectionCls3
|
|
29597
29716
|
}, /* @__PURE__ */ React.createElement("label", {
|
|
29598
29717
|
className: "flex items-center gap-2 cursor-pointer"
|
|
29599
29718
|
}, /* @__PURE__ */ React.createElement("input", {
|
|
@@ -29606,7 +29725,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29606
29725
|
}, "Active")))), /* @__PURE__ */ React.createElement("section", null, /* @__PURE__ */ React.createElement("h2", {
|
|
29607
29726
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
29608
29727
|
}, "SEO"), /* @__PURE__ */ React.createElement("div", {
|
|
29609
|
-
className:
|
|
29728
|
+
className: sectionCls3
|
|
29610
29729
|
}, /* @__PURE__ */ React.createElement(SeoSection, {
|
|
29611
29730
|
values: seo,
|
|
29612
29731
|
onChange: /* @__PURE__ */ __name((field, value) => setSeo((s) => ({
|
|
@@ -29616,7 +29735,7 @@ function CollectionEditPage({ collectionId }) {
|
|
|
29616
29735
|
}))))
|
|
29617
29736
|
}));
|
|
29618
29737
|
}
|
|
29619
|
-
var isCreate3, emptySlide, emptyVariant,
|
|
29738
|
+
var isCreate3, emptySlide, emptyVariant, sectionCls3, labelCls4, inputCls4;
|
|
29620
29739
|
var init_CollectionEditPage = __esm({
|
|
29621
29740
|
"src/admin/pages/CollectionEditPage.tsx"() {
|
|
29622
29741
|
"use client";
|
|
@@ -29639,7 +29758,7 @@ var init_CollectionEditPage = __esm({
|
|
|
29639
29758
|
price: "",
|
|
29640
29759
|
extraSpecs: []
|
|
29641
29760
|
}), "emptyVariant");
|
|
29642
|
-
|
|
29761
|
+
sectionCls3 = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
29643
29762
|
labelCls4 = "block text-xs font-medium text-gray-600 mb-1";
|
|
29644
29763
|
inputCls4 = "w-full rounded-md border border-gray-300 px-2 py-1.5 text-sm";
|
|
29645
29764
|
__name(CollectionEditPage, "CollectionEditPage");
|
|
@@ -31121,7 +31240,7 @@ function EventEditPage({ eventId }) {
|
|
|
31121
31240
|
onClick: /* @__PURE__ */ __name(() => setActiveTab("settings"), "onClick")
|
|
31122
31241
|
}, "Settings"))), /* @__PURE__ */ React.createElement(DetailPageLayout, {
|
|
31123
31242
|
main: activeTab === "basic" ? /* @__PURE__ */ React.createElement("section", {
|
|
31124
|
-
className:
|
|
31243
|
+
className: sectionCls4
|
|
31125
31244
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
31126
31245
|
className: "grid gap-3 sm:grid-cols-2"
|
|
31127
31246
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -31254,7 +31373,7 @@ function EventEditPage({ eventId }) {
|
|
|
31254
31373
|
}, "Online"), /* @__PURE__ */ React.createElement("option", {
|
|
31255
31374
|
value: "hybrid"
|
|
31256
31375
|
}, "Hybrid"))))) : activeTab === "venue" ? /* @__PURE__ */ React.createElement("section", {
|
|
31257
|
-
className:
|
|
31376
|
+
className: sectionCls4
|
|
31258
31377
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
31259
31378
|
className: "grid gap-3 sm:grid-cols-2"
|
|
31260
31379
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -31294,7 +31413,7 @@ function EventEditPage({ eventId }) {
|
|
|
31294
31413
|
onChange: /* @__PURE__ */ __name((e) => setCountry(e.target.value), "onChange"),
|
|
31295
31414
|
className: inputCls6
|
|
31296
31415
|
})))) : activeTab === "datetime" ? /* @__PURE__ */ React.createElement("section", {
|
|
31297
|
-
className:
|
|
31416
|
+
className: sectionCls4
|
|
31298
31417
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
31299
31418
|
className: "grid gap-3 sm:grid-cols-2"
|
|
31300
31419
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -31332,7 +31451,7 @@ function EventEditPage({ eventId }) {
|
|
|
31332
31451
|
onChange: /* @__PURE__ */ __name((e) => setRegistrationClosesAt(e.target.value), "onChange"),
|
|
31333
31452
|
className: inputCls6
|
|
31334
31453
|
})))) : /* @__PURE__ */ React.createElement("section", {
|
|
31335
|
-
className:
|
|
31454
|
+
className: sectionCls4
|
|
31336
31455
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
31337
31456
|
className: "space-y-6"
|
|
31338
31457
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h2", {
|
|
@@ -31427,7 +31546,7 @@ function EventEditPage({ eventId }) {
|
|
|
31427
31546
|
returnUrl: eventEditUrl
|
|
31428
31547
|
})) : null);
|
|
31429
31548
|
}
|
|
31430
|
-
var ADDITIONAL_VENUE_MAX_CHARS, DEFAULT_EVENT_TIMEZONE, DEFAULT_EVENT_CURRENCY, EVENT_SOCIAL_KEYS, isCreate4,
|
|
31549
|
+
var ADDITIONAL_VENUE_MAX_CHARS, DEFAULT_EVENT_TIMEZONE, DEFAULT_EVENT_CURRENCY, EVENT_SOCIAL_KEYS, isCreate4, sectionCls4, labelCls6, inputCls6, ENTITY_TYPE_OPTIONS;
|
|
31431
31550
|
var init_EventEditPage = __esm({
|
|
31432
31551
|
"src/admin/pages/EventEditPage.tsx"() {
|
|
31433
31552
|
"use client";
|
|
@@ -31452,7 +31571,7 @@ var init_EventEditPage = __esm({
|
|
|
31452
31571
|
DEFAULT_EVENT_CURRENCY = "INR";
|
|
31453
31572
|
EVENT_SOCIAL_KEYS = EVENT_SOCIAL_FIELDS.map((f) => f.key);
|
|
31454
31573
|
isCreate4 = /* @__PURE__ */ __name((id) => id === "create", "isCreate");
|
|
31455
|
-
|
|
31574
|
+
sectionCls4 = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
31456
31575
|
labelCls6 = "block text-xs font-medium text-gray-600 mb-1";
|
|
31457
31576
|
inputCls6 = "w-full rounded-md border border-gray-300 px-2 py-1.5 text-sm";
|
|
31458
31577
|
__name(RequiredLabel, "RequiredLabel");
|
|
@@ -32156,6 +32275,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32156
32275
|
const [ownerEmail, setOwnerEmail] = useState("");
|
|
32157
32276
|
const [ownerPhone, setOwnerPhone] = useState("");
|
|
32158
32277
|
const [ownerDesignation, setOwnerDesignation] = useState("");
|
|
32278
|
+
const [ownerUserId, setOwnerUserId] = useState(null);
|
|
32159
32279
|
const [termsAccepted, setTermsAccepted] = useState(false);
|
|
32160
32280
|
const [reinviting, setReinviting] = useState(false);
|
|
32161
32281
|
const [inviteDialog, setInviteDialog] = useState(null);
|
|
@@ -32215,6 +32335,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32215
32335
|
setOwnerDesignation(readOwnerDesignation(data.metadata));
|
|
32216
32336
|
const userId = data.userId;
|
|
32217
32337
|
if (userId != null && Number.isFinite(Number(userId))) {
|
|
32338
|
+
setOwnerUserId(Number(userId));
|
|
32218
32339
|
const userRes = await fetch(`/api/users/${userId}`);
|
|
32219
32340
|
if (userRes.ok) {
|
|
32220
32341
|
const user = await userRes.json();
|
|
@@ -32224,6 +32345,8 @@ function VendorEditPage({ vendorId }) {
|
|
|
32224
32345
|
setOwnerPhone(user.phone ?? "");
|
|
32225
32346
|
}
|
|
32226
32347
|
}
|
|
32348
|
+
} else if (!cancelled) {
|
|
32349
|
+
setOwnerUserId(null);
|
|
32227
32350
|
}
|
|
32228
32351
|
} catch {
|
|
32229
32352
|
if (!cancelled) setErrors([
|
|
@@ -32438,6 +32561,13 @@ function VendorEditPage({ vendorId }) {
|
|
|
32438
32561
|
setSaving(false);
|
|
32439
32562
|
return;
|
|
32440
32563
|
}
|
|
32564
|
+
if (!ownerName.trim() || !ownerEmail.trim()) {
|
|
32565
|
+
setErrors([
|
|
32566
|
+
"Owner name and owner email are required"
|
|
32567
|
+
]);
|
|
32568
|
+
setSaving(false);
|
|
32569
|
+
return;
|
|
32570
|
+
}
|
|
32441
32571
|
const taxError = validateIndiaTaxIds(gstin.trim().toUpperCase() || null, pan.trim().toUpperCase() || null);
|
|
32442
32572
|
if (taxError) {
|
|
32443
32573
|
setErrors([
|
|
@@ -32473,6 +32603,26 @@ function VendorEditPage({ vendorId }) {
|
|
|
32473
32603
|
]);
|
|
32474
32604
|
return;
|
|
32475
32605
|
}
|
|
32606
|
+
if (ownerUserId != null) {
|
|
32607
|
+
const userRes = await fetch(`/api/users/${ownerUserId}`, {
|
|
32608
|
+
method: "PUT",
|
|
32609
|
+
headers: {
|
|
32610
|
+
"Content-Type": "application/json"
|
|
32611
|
+
},
|
|
32612
|
+
body: JSON.stringify({
|
|
32613
|
+
name: ownerName.trim(),
|
|
32614
|
+
email: ownerEmail.trim(),
|
|
32615
|
+
phone: ownerPhone.trim() || null
|
|
32616
|
+
})
|
|
32617
|
+
});
|
|
32618
|
+
if (!userRes.ok) {
|
|
32619
|
+
const data = await userRes.json().catch(() => ({}));
|
|
32620
|
+
setErrors([
|
|
32621
|
+
data.error || "Vendor saved, but updating owner details failed"
|
|
32622
|
+
]);
|
|
32623
|
+
return;
|
|
32624
|
+
}
|
|
32625
|
+
}
|
|
32476
32626
|
toast.success("Vendor saved");
|
|
32477
32627
|
router.push(listReturnUrl);
|
|
32478
32628
|
} catch {
|
|
@@ -32494,7 +32644,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32494
32644
|
className: "rounded-lg bg-white shadow-md min-h-[420px]"
|
|
32495
32645
|
}, /* @__PURE__ */ React26__default.createElement(DetailPageHeader, {
|
|
32496
32646
|
title: create ? "Add vendor" : "Edit vendor",
|
|
32497
|
-
subtitle: create ? "Register a vendor store and create the owner invite" : "Update store and registration details",
|
|
32647
|
+
subtitle: create ? "Register a vendor store and create the owner invite" : "Update store, owner, and registration details",
|
|
32498
32648
|
closeHref: listReturnUrl,
|
|
32499
32649
|
menuItems: create ? [
|
|
32500
32650
|
{
|
|
@@ -32520,7 +32670,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32520
32670
|
main: /* @__PURE__ */ React26__default.createElement(React26__default.Fragment, null, /* @__PURE__ */ React26__default.createElement("section", null, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
32521
32671
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32522
32672
|
}, "Business"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
32523
|
-
className:
|
|
32673
|
+
className: sectionCls5
|
|
32524
32674
|
}, /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(FieldLabel, {
|
|
32525
32675
|
htmlFor: "vendorName",
|
|
32526
32676
|
required: true
|
|
@@ -32585,7 +32735,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32585
32735
|
})))), /* @__PURE__ */ React26__default.createElement("section", null, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
32586
32736
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32587
32737
|
}, "Contact"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
32588
|
-
className:
|
|
32738
|
+
className: sectionCls5
|
|
32589
32739
|
}, /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(FieldLabel, {
|
|
32590
32740
|
htmlFor: "vendorEmail"
|
|
32591
32741
|
}, "Store email"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
@@ -32604,7 +32754,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32604
32754
|
})))), /* @__PURE__ */ React26__default.createElement("section", null, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
32605
32755
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32606
32756
|
}, "Address"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
32607
|
-
className:
|
|
32757
|
+
className: sectionCls5
|
|
32608
32758
|
}, /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(FieldLabel, {
|
|
32609
32759
|
htmlFor: "addressLine1"
|
|
32610
32760
|
}, "Address line 1"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
@@ -32655,7 +32805,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32655
32805
|
}))))), /* @__PURE__ */ React26__default.createElement("section", null, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
32656
32806
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32657
32807
|
}, "Tax (India)"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
32658
|
-
className:
|
|
32808
|
+
className: sectionCls5
|
|
32659
32809
|
}, /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(FieldLabel, {
|
|
32660
32810
|
htmlFor: "gstin"
|
|
32661
32811
|
}, "GSTIN"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
@@ -32675,36 +32825,33 @@ function VendorEditPage({ vendorId }) {
|
|
|
32675
32825
|
})))), /* @__PURE__ */ React26__default.createElement("section", null, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
32676
32826
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32677
32827
|
}, "Owner"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
32678
|
-
className:
|
|
32828
|
+
className: sectionCls5
|
|
32679
32829
|
}, /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(FieldLabel, {
|
|
32680
32830
|
htmlFor: "ownerName",
|
|
32681
|
-
required:
|
|
32831
|
+
required: true
|
|
32682
32832
|
}, "Name"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
32683
32833
|
id: "ownerName",
|
|
32684
|
-
required:
|
|
32685
|
-
readOnly: !create,
|
|
32834
|
+
required: true,
|
|
32686
32835
|
value: ownerName,
|
|
32687
32836
|
onChange: /* @__PURE__ */ __name((e) => setOwnerName(e.target.value), "onChange"),
|
|
32688
|
-
className: `mt-1 ${fieldClass}
|
|
32837
|
+
className: `mt-1 ${fieldClass}`
|
|
32689
32838
|
})), /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(FieldLabel, {
|
|
32690
32839
|
htmlFor: "ownerEmail",
|
|
32691
|
-
required:
|
|
32840
|
+
required: true
|
|
32692
32841
|
}, "Email"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
32693
32842
|
id: "ownerEmail",
|
|
32694
32843
|
type: "email",
|
|
32695
|
-
required:
|
|
32696
|
-
readOnly: !create,
|
|
32844
|
+
required: true,
|
|
32697
32845
|
value: ownerEmail,
|
|
32698
32846
|
onChange: /* @__PURE__ */ __name((e) => setOwnerEmail(e.target.value), "onChange"),
|
|
32699
|
-
className: `mt-1 ${fieldClass}
|
|
32847
|
+
className: `mt-1 ${fieldClass}`
|
|
32700
32848
|
})), /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(FieldLabel, {
|
|
32701
32849
|
htmlFor: "ownerPhone"
|
|
32702
32850
|
}, "Phone"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
32703
32851
|
id: "ownerPhone",
|
|
32704
32852
|
value: ownerPhone,
|
|
32705
32853
|
onChange: /* @__PURE__ */ __name((e) => setOwnerPhone(e.target.value), "onChange"),
|
|
32706
|
-
|
|
32707
|
-
className: `mt-1 ${fieldClass} ${!create ? "bg-gray-100" : ""}`
|
|
32854
|
+
className: `mt-1 ${fieldClass}`
|
|
32708
32855
|
})), /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(FieldLabel, {
|
|
32709
32856
|
htmlFor: "ownerDesignation"
|
|
32710
32857
|
}, "Designation"), /* @__PURE__ */ React26__default.createElement(Input, {
|
|
@@ -32713,10 +32860,10 @@ function VendorEditPage({ vendorId }) {
|
|
|
32713
32860
|
onChange: /* @__PURE__ */ __name((e) => setOwnerDesignation(e.target.value), "onChange"),
|
|
32714
32861
|
placeholder: "e.g. Director, Proprietor",
|
|
32715
32862
|
className: `mt-1 ${fieldClass}`
|
|
32716
|
-
})), !create && /* @__PURE__ */ React26__default.createElement("p", {
|
|
32717
|
-
className: "text-xs text-
|
|
32718
|
-
}, "
|
|
32719
|
-
className:
|
|
32863
|
+
})), !create && !ownerUserId && /* @__PURE__ */ React26__default.createElement("p", {
|
|
32864
|
+
className: "text-xs text-amber-700"
|
|
32865
|
+
}, "No owner user is linked to this vendor, so owner name/email/phone cannot be saved yet."))), create && /* @__PURE__ */ React26__default.createElement("section", null, /* @__PURE__ */ React26__default.createElement("div", {
|
|
32866
|
+
className: sectionCls5
|
|
32720
32867
|
}, /* @__PURE__ */ React26__default.createElement("div", {
|
|
32721
32868
|
className: "flex items-start gap-2"
|
|
32722
32869
|
}, /* @__PURE__ */ React26__default.createElement(Checkbox, {
|
|
@@ -32730,7 +32877,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32730
32877
|
sidebar: /* @__PURE__ */ React26__default.createElement(React26__default.Fragment, null, !create && /* @__PURE__ */ React26__default.createElement("section", null, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
32731
32878
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32732
32879
|
}, "Status"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
32733
|
-
className:
|
|
32880
|
+
className: sectionCls5
|
|
32734
32881
|
}, /* @__PURE__ */ React26__default.createElement("div", null, /* @__PURE__ */ React26__default.createElement(FieldLabel, {
|
|
32735
32882
|
htmlFor: "registrationStatus"
|
|
32736
32883
|
}, "Registration status"), /* @__PURE__ */ React26__default.createElement("select", {
|
|
@@ -32765,7 +32912,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32765
32912
|
})))), create ? /* @__PURE__ */ React26__default.createElement("section", null, /* @__PURE__ */ React26__default.createElement("h2", {
|
|
32766
32913
|
className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2"
|
|
32767
32914
|
}, "Owner access"), /* @__PURE__ */ React26__default.createElement("div", {
|
|
32768
|
-
className:
|
|
32915
|
+
className: sectionCls5
|
|
32769
32916
|
}, /* @__PURE__ */ React26__default.createElement("p", {
|
|
32770
32917
|
className: "text-sm text-gray-600"
|
|
32771
32918
|
}, "Creates the vendor and an invite for the owner. After create, you can send the invite email or copy the invite link."), /* @__PURE__ */ React26__default.createElement(Button, {
|
|
@@ -32803,7 +32950,7 @@ function VendorEditPage({ vendorId }) {
|
|
|
32803
32950
|
onClick: closeInviteDialog
|
|
32804
32951
|
}, "Done")))));
|
|
32805
32952
|
}
|
|
32806
|
-
var isCreate6, fieldClass, selectClass,
|
|
32953
|
+
var isCreate6, fieldClass, selectClass, sectionCls5;
|
|
32807
32954
|
var init_VendorEditPage = __esm({
|
|
32808
32955
|
"src/admin/pages/VendorEditPage.tsx"() {
|
|
32809
32956
|
"use client";
|
|
@@ -32825,7 +32972,7 @@ var init_VendorEditPage = __esm({
|
|
|
32825
32972
|
isCreate6 = /* @__PURE__ */ __name((id) => id === "create", "isCreate");
|
|
32826
32973
|
fieldClass = "w-full rounded-md border border-gray-300 px-3 py-2 text-sm";
|
|
32827
32974
|
selectClass = `${fieldClass} bg-white`;
|
|
32828
|
-
|
|
32975
|
+
sectionCls5 = "min-w-0 overflow-hidden border border-gray-200 rounded-lg p-4 bg-gray-50/50 space-y-4";
|
|
32829
32976
|
__name(ErrorsBanner, "ErrorsBanner");
|
|
32830
32977
|
__name(FieldLabel, "FieldLabel");
|
|
32831
32978
|
__name(VendorEditPage, "VendorEditPage");
|
|
@@ -33124,11 +33271,6 @@ function CollectionsWorkspacePage() {
|
|
|
33124
33271
|
showVendorColumn,
|
|
33125
33272
|
vendorOptions
|
|
33126
33273
|
]);
|
|
33127
|
-
const listParams = useMemo(() => isCatalog ? {
|
|
33128
|
-
isCatalog: "true"
|
|
33129
|
-
} : void 0, [
|
|
33130
|
-
isCatalog
|
|
33131
|
-
]);
|
|
33132
33274
|
const createQueryParams = useMemo(() => isCatalog ? {
|
|
33133
33275
|
isCatalog: "true"
|
|
33134
33276
|
} : void 0, [
|
|
@@ -33144,7 +33286,6 @@ function CollectionsWorkspacePage() {
|
|
|
33144
33286
|
createQueryParams,
|
|
33145
33287
|
defaultSortField: "sortOrder",
|
|
33146
33288
|
defaultSortOrder: "asc",
|
|
33147
|
-
extraListParams: listParams,
|
|
33148
33289
|
filters: collectionFilters
|
|
33149
33290
|
});
|
|
33150
33291
|
}
|
|
@@ -38136,7 +38277,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38136
38277
|
onClick: /* @__PURE__ */ __name(() => setActiveTab("settings"), "onClick")
|
|
38137
38278
|
}, "Settings"))), /* @__PURE__ */ React.createElement(DetailPageLayout, {
|
|
38138
38279
|
main: activeTab === "basic" ? /* @__PURE__ */ React.createElement("section", {
|
|
38139
|
-
className:
|
|
38280
|
+
className: sectionCls6
|
|
38140
38281
|
}, /* @__PURE__ */ React.createElement("dl", {
|
|
38141
38282
|
className: "grid gap-4 sm:grid-cols-2"
|
|
38142
38283
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("dt", {
|
|
@@ -38193,7 +38334,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38193
38334
|
}, "Mode"), /* @__PURE__ */ React.createElement("dd", {
|
|
38194
38335
|
className: valueCls
|
|
38195
38336
|
}, formatMode(event.entityMode))))) : activeTab === "venue" ? /* @__PURE__ */ React.createElement("section", {
|
|
38196
|
-
className:
|
|
38337
|
+
className: sectionCls6
|
|
38197
38338
|
}, /* @__PURE__ */ React.createElement("dl", {
|
|
38198
38339
|
className: "grid gap-4 sm:grid-cols-2"
|
|
38199
38340
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -38217,7 +38358,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38217
38358
|
}, "Country"), /* @__PURE__ */ React.createElement("dd", {
|
|
38218
38359
|
className: valueCls
|
|
38219
38360
|
}, displayValue(event.country ?? (event.cityCountry?.includes(",") ? event.cityCountry.split(",").slice(1).join(",").trim() : null)))))) : activeTab === "datetime" ? /* @__PURE__ */ React.createElement("section", {
|
|
38220
|
-
className:
|
|
38361
|
+
className: sectionCls6
|
|
38221
38362
|
}, /* @__PURE__ */ React.createElement("dl", {
|
|
38222
38363
|
className: "grid gap-4 sm:grid-cols-2"
|
|
38223
38364
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("dt", {
|
|
@@ -38249,7 +38390,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38249
38390
|
}, event.registrationClosesAt ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", null, regClosesFormatted.dateLine), regClosesFormatted.timeLine ? /* @__PURE__ */ React.createElement("div", {
|
|
38250
38391
|
className: "text-gray-600"
|
|
38251
38392
|
}, regClosesFormatted.timeLine) : null) : "\u2014")))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("section", {
|
|
38252
|
-
className:
|
|
38393
|
+
className: sectionCls6
|
|
38253
38394
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
38254
38395
|
className: "space-y-6"
|
|
38255
38396
|
}, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h2", {
|
|
@@ -38310,7 +38451,7 @@ function EventDetailPage({ eventId }) {
|
|
|
38310
38451
|
}))
|
|
38311
38452
|
}));
|
|
38312
38453
|
}
|
|
38313
|
-
var
|
|
38454
|
+
var sectionCls6, labelCls7, valueCls;
|
|
38314
38455
|
var init_EventDetailPage = __esm({
|
|
38315
38456
|
"src/admin/pages/EventDetailPage.tsx"() {
|
|
38316
38457
|
"use client";
|
|
@@ -38322,7 +38463,7 @@ var init_EventDetailPage = __esm({
|
|
|
38322
38463
|
init_DetailPageLayout();
|
|
38323
38464
|
init_DetailPageHeader();
|
|
38324
38465
|
init_EventProductsSection();
|
|
38325
|
-
|
|
38466
|
+
sectionCls6 = "border border-gray-200 rounded-lg p-4 bg-gray-50/50";
|
|
38326
38467
|
labelCls7 = "text-xs font-medium text-gray-500";
|
|
38327
38468
|
valueCls = "text-sm text-gray-900 mt-0.5";
|
|
38328
38469
|
__name(displayValue, "displayValue");
|