148 lines
5.1 KiB
JavaScript
148 lines
5.1 KiB
JavaScript
import { defineComponent, ref, mergeProps, unref, withCtx, createVNode, useSSRContext } from 'vue';
|
|
import { ssrRenderComponent, ssrRenderAttrs, ssrRenderList, ssrRenderAttr, ssrInterpolate } from 'vue/server-renderer';
|
|
import { C as CustomerCard, a as CustomerCardSkeleton } from './CustomerCardSkeleton-kdwNkDdL.mjs';
|
|
import { b as useUserStore, a as useConfigStore, u as useRouter$1, aB as FloatButton } from './server.mjs';
|
|
import { B as BasicIconOld } from './BasicIconOld-93vAWohq.mjs';
|
|
import './UserProfilePic-CmaGJi8K.mjs';
|
|
import './empty_user-BaUNCdgf.mjs';
|
|
import './_plugin-vue_export-helper-1tPrXgE0.mjs';
|
|
import './BasicButton-B9iMRxfW.mjs';
|
|
import '@ant-design/icons-vue';
|
|
import 'vue-content-loader';
|
|
import '../_/nitro.mjs';
|
|
import 'node:http';
|
|
import 'node:https';
|
|
import 'node:events';
|
|
import 'node:buffer';
|
|
import 'node:fs';
|
|
import 'node:url';
|
|
import 'consola';
|
|
import 'ipx';
|
|
import 'node:path';
|
|
import 'node:crypto';
|
|
import 'pinia';
|
|
import '@supabase/supabase-js';
|
|
import '@babel/runtime/helpers/esm/extends';
|
|
import '@babel/runtime/helpers/esm/objectSpread2';
|
|
import '@ant-design/colors';
|
|
import '@ctrl/tinycolor';
|
|
import 'stylis';
|
|
import 'vue-types';
|
|
import 'lodash-es';
|
|
import 'axios';
|
|
import 'resize-observer-polyfill';
|
|
import 'dom-align';
|
|
import 'lodash-es/uniq.js';
|
|
import 'lodash-es/pick.js';
|
|
import 'lodash-es/isPlainObject.js';
|
|
import 'lodash-es/debounce.js';
|
|
import 'lodash-es/cloneDeep.js';
|
|
import 'async-validator';
|
|
import 'lodash-es/find.js';
|
|
import 'lodash-es/isEqual.js';
|
|
import 'compute-scroll-into-view';
|
|
import 'lodash-es/intersection.js';
|
|
import 'lodash-es/omit.js';
|
|
import 'lodash-es/isNumber.js';
|
|
import 'throttle-debounce';
|
|
import 'lodash-es/fromPairs.js';
|
|
import 'lodash-es/partition.js';
|
|
import '../routes/renderer.mjs';
|
|
import 'vue-bundle-renderer/runtime';
|
|
import 'unhead/server';
|
|
import 'devalue';
|
|
import 'unhead/utils';
|
|
|
|
const _imports_0 = "" + __buildAssetsURL("not_found.CbOIXISv.svg");
|
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
__name: "CustomersList",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
useUserStore();
|
|
const config = useConfigStore();
|
|
const router = useRouter$1();
|
|
const loading = ref(false);
|
|
ref(false);
|
|
ref(0);
|
|
ref(10);
|
|
const users = ref([]);
|
|
function deleteUser(id) {
|
|
users.value.splice(users.value.findIndex((x) => x.id === id), 1);
|
|
}
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_a_float_button = FloatButton;
|
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
class: ["flex flex-col gap-2 min-h-50vh pt5", users.value?.length > 0 ? "" : "justify-center"]
|
|
}, _attrs))}>`);
|
|
if (!loading.value) {
|
|
_push(`<!--[-->`);
|
|
if (users.value.length !== 0) {
|
|
_push(`<!--[-->`);
|
|
ssrRenderList(users.value, (user) => {
|
|
_push(ssrRenderComponent(CustomerCard, {
|
|
user,
|
|
onRefresh: ($event) => deleteUser(user.id)
|
|
}, null, _parent));
|
|
});
|
|
_push(`<!--]-->`);
|
|
} else {
|
|
_push(`<!--[--><img${ssrRenderAttr("src", _imports_0)} alt="orders" class="w-30 self-center"><p class="self-center text-gray-6">${ssrInterpolate(unref(config).useString("customerListIsEmpty"))}</p><!--]-->`);
|
|
}
|
|
_push(`<!--]-->`);
|
|
} else {
|
|
_push(`<!--[-->`);
|
|
ssrRenderList(8, (i) => {
|
|
_push(ssrRenderComponent(CustomerCardSkeleton, null, null, _parent));
|
|
});
|
|
_push(`<!--]-->`);
|
|
}
|
|
if (unref(config).isSeller) {
|
|
_push(ssrRenderComponent(_component_a_float_button, {
|
|
shape: "circle",
|
|
type: "primary",
|
|
onClick: ($event) => unref(router).push({ name: "user-add" }),
|
|
class: "bottom-10vh w-3rem h-3rem"
|
|
}, {
|
|
icon: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(ssrRenderComponent(BasicIconOld, { icon: "vuesax-linear:add" }, null, _parent2, _scopeId));
|
|
} else {
|
|
return [
|
|
createVNode(BasicIconOld, { icon: "vuesax-linear:add" })
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div>`);
|
|
};
|
|
}
|
|
});
|
|
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
_sfc_main$1.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("views/base/pages/statisticsList/components/CustomersList.vue");
|
|
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
};
|
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
__name: "customers",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
_push(ssrRenderComponent(_sfc_main$1, _attrs, null, _parent));
|
|
};
|
|
}
|
|
});
|
|
const _sfc_setup = _sfc_main.setup;
|
|
_sfc_main.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/user/statistics_list/customers.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
|
|
export { _sfc_main as default };
|
|
//# sourceMappingURL=customers-CpUE9bCj.mjs.map
|