���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
.output.2
/
server
/
chunks
/
build
/
Viewing: create-CNPGjPnj.mjs
import { b as useI18n, u as useHead, j as useToast, i as useNuxtApp, c as useLocalePath, x as useAsyncData, s as useRuntimeConfig, p as __nuxt_component_2$1, k as __nuxt_component_4$1, n as navigateTo } from './server.mjs'; import { defineComponent, ref, withAsyncContext, reactive, mergeProps, unref, withCtx, createVNode, toDisplayString, useSSRContext } from 'vue'; import { u as useAPI } from './useAPI-dGPJZ6yO.mjs'; import { ssrRenderAttrs, ssrRenderAttr, ssrInterpolate, ssrRenderList, ssrIncludeBooleanAttr, ssrLooseContain, ssrRenderClass, ssrRenderComponent, ssrLooseEqual } from 'vue/server-renderer'; import '../runtime.mjs'; import 'node:http'; import 'node:https'; import 'fs'; import 'path'; import 'node:fs'; import 'node:url'; import '@iconify/utils'; import 'consola/core'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'devalue'; import '@unhead/ssr'; import 'unhead'; import '@unhead/shared'; import 'vue-router'; import '@vueuse/core'; import 'tailwind-merge'; import '@iconify/vue'; import '@iconify/utils/lib/css/icon'; import './fetch-5zL7LryB.mjs'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "create", __ssrInlineRender: true, async setup(__props) { let __temp, __restore; const { t } = useI18n(); useHead({ title: t("makeUnit") }); const toast = useToast(); const loading = ref(false); useI18n(); const { $api } = useNuxtApp(); const config = useRuntimeConfig(); const localePath = useLocalePath(); const { data } = ([__temp, __restore] = withAsyncContext(async () => useAsyncData(async () => { const [fields] = await Promise.all([ $api(config.public.API_URL + "/analyze/materials") ]); const fieldsOptions = JSON.parse(fields).data.materials; return { fields: fieldsOptions }; }, { server: true }, "$xXuVZ6ovh6")), __temp = await __temp, __restore(), __temp); let row_id = 1; const form = reactive({ material_id: 1, panel_description: "", rotate_status: false, num_slice: 1, slice: [ { "row_id": row_id, "length": "", "width": "", "count": "1", "length_one": 0, "length_two": 0, "width_one": 0, "width_two": 0, "rotate_status": false, "description": "" } ] }); const removeSliceRow = (i) => { row_id = row_id - 1; form.slice.splice(i, 1); form.num_slice = form.num_slice - 1; }; const handelClick = async () => { loading.value = true; for (let index = 0; index < form.slice.length; index++) { const element = form.slice[index]; if (!element.width) { return toast.add({ title: t("Section ") + (index + 1) + " " + t("Width_Alert"), color: "orange" }), loading.value = false; } if (!element.length) { return toast.add({ title: t("Section ") + (index + 1) + " " + t("Length_Alert"), color: "orange" }), loading.value = false; } if (!element.count) { return toast.add({ title: t("Section ") + (index + 1) + " " + t("Number_Alert"), color: "orange" }), loading.value = false; } } await useAPI("/analyze/custom-list/add", { method: "POST", body: form, immediate: true, server: true, onResponse({ request, response, options }) { if (response.status != 422) { return navigateTo(localePath("/analyze/list")); } } }); }; return (_ctx, _push, _parent, _attrs) => { const _component_UIcon = __nuxt_component_2$1; const _component_UButton = __nuxt_component_4$1; _push(`<div${ssrRenderAttrs(mergeProps({ class: "w-[95%] mx-auto" }, _attrs))}><div${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} class="mb-2"><div class="bg-[#f7941d] text-black block w-full rounded-t-md overflow-hidden"><div class="flex items-center justify-between px-2 py-2"><span class="w-4/12 text-base font-bold text-right text-white"></span><div class="flex items-start justify-center w-4/12"><span id="title_group_1" class="block text-sm font-bold">${ssrInterpolate(unref(t)("add_piece"))}</span></div><span class="w-4/12 block"></span></div></div><div class="pt-2 border-b border-l border-r border-gray-400 min-h-[90vh] !rounded-t-none rounded-md overflow-hidden"><div class="flex flex-wrap w-full mx-auto"><div class="flex items-start justify-start flex-wrap w-full mb-4"><div class="w-full mb-2"><div class="mx-auto w-[98%]"><select class="block w-full h-9 py-0 !px-3 text-sm bg-white text-gray-900 border border-gray-300 rounded focus:ring-main-700 focus:border-main-700"><!--[-->`); ssrRenderList(unref(data).fields, (row, i) => { _push(`<option${ssrRenderAttr("value", row.id)}>${ssrInterpolate(_ctx.$i18n.locale == "en" ? row.title_en : row.title)}</option>`); }); _push(`<!--]--></select></div></div><div class="w-full mb-2"><div class="mx-auto w-[98%]"><textarea rows="1" class="block w-full h-9 py-1 !px-3 text-xs bg-white text-gray-900 border border-gray-300 rounded 3xl:h-9 focus:ring-main-700 focus:border-main-700 placeholder-slate-400"${ssrRenderAttr("placeholder", unref(t)("Sheet name and code"))}>${ssrInterpolate(unref(form).panel_description)}</textarea></div></div><div class="w-full"><div class="mx-auto w-[98%] flex justify-start items-center"><input type="checkbox"${ssrIncludeBooleanAttr(Array.isArray(unref(form).rotate_status) ? ssrLooseContain(unref(form).rotate_status, null) : unref(form).rotate_status) ? " checked" : ""} class="w-5 h-5 text-red-900 border-2 border-red-900 cursor-pointer focus:border-red-900 focus:ring-red-900"><span class="mr-5 text-sm text-black">${ssrInterpolate(unref(t)("Total rotation of parts"))}</span></div></div></div></div><section class="flex separator items-center justify-between w-full pb-5"><div class="flex items-center justify-center flex-row px-2"><button type="button" class="${ssrRenderClass([_ctx.$i18n.locale == "en" ? "mr-2 pr-2" : "ml-2 pl-2", "mb-0 w-auto h-7 text-xs bold flex justify-center items-center bg-gray-50 border-green-500 hover:bg-green-50 border rounded cursor-pointer"])}"><i class="mx-1 text-xl bx bx-plus text-green-500"></i><span class="flex w-full justify-center items-center">${ssrInterpolate(unref(t)("Add row"))}</span></button><button type="button" class="${ssrRenderClass([_ctx.$i18n.locale == "en" ? " pr-2" : " pl-2", "mb-0 :w-auto h-7 text-xs bold flex justify-center items-center bg-gray-50 border-red-500 hover:bg-red-50 border rounded cursor-pointer"])}"><i class="mx-1 text-xl bx bx-minus text-red-500"></i><span class="flex w-full justify-center items-center">${ssrInterpolate(unref(t)("Reduce line"))}</span></button></div></section><div class="w-full"><div class="w-full flex items-center bg-gray-300 text-gray-700"><div class="w-[75px] text-center">${ssrInterpolate(unref(t)("row_number"))}</div><div class="w-[125px] text-center">${ssrInterpolate(unref(t)("count"))}</div><div class="w-[125px] text-center">${ssrInterpolate(unref(t)("width"))}</div><div class="w-[125px] text-center">${ssrInterpolate(unref(t)("length"))}</div><div class="w-[125px] text-center">${ssrInterpolate(unref(t)("description"))}</div></div><!--[-->`); ssrRenderList(unref(form).num_slice, (row, i) => { _push(`<div class="w-full flex justify-start items-start mb-2 pb-0 border-b border-dashed border-main-700 odd:bg-gray-300 pt-2"><div class="w-[12%] mr-[.1rem]"><span class="w-full py-0 !pr-0 text-xs text-gray-900 h-7 3xl:h-9 flex items-center rounded justify-center text-center bold border-2 border-red-700 border-dashed focus:!ring-0">`); if (1 < i + 1) { _push(ssrRenderComponent(_component_UIcon, { onClick: ($event) => removeSliceRow(i), name: "i-heroicons-x-circle", class: "text-xl text-red-600 cursor-pointer ml-1" }, null, _parent)); } else { _push(`<!---->`); } _push(` ${ssrInterpolate(i + 1)}</span><div class="w-full flex flex-col items-center justify-end my-[.3rem]"><input type="checkbox"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].rotate_status) ? ssrLooseContain(unref(form).slice[i].rotate_status, null) : unref(form).slice[i].rotate_status) ? " checked" : ""} class="text-red-900 border-2 border-red-900 cursor-pointer focus:border-red-900 focus:ring-red-900"><span class="text-xs text-black">${ssrInterpolate(unref(t)("rotation"))}</span></div></div><div class="w-[88%] flex flex-wrap justify-start items-center"><div class="w-[24%] mr-[.1rem] mb-[.1rem]"><input${ssrRenderAttr("placeholder", unref(t)("number"))}${ssrRenderAttr("value", unref(form).slice[i].count)}${ssrRenderAttr("id", unref(form).slice[i].row_id + "1")} class="{{(i+1)%2 == 0 ? 'bg-main-400' : 'bg-white'}} block w-full py-0 !px-3 text-xs bg-white text-gray-900 border border-gray-300 text-center bold rounded h-7 3xl:h-9 focus:ring-main-700 focus:border-main-700"></div><div class="w-[24%] mr-[.1rem] mb-[.1rem]"><input${ssrRenderAttr("placeholder", unref(t)("Width"))}${ssrRenderAttr("value", unref(form).slice[i].width)}${ssrRenderAttr("id", unref(form).slice[i].row_id + "2")} class="{{(i+1)%2 == 0 ? 'bg-main-400' : 'bg-white'}} block w-full py-0 !px-3 text-xs bg-white text-gray-900 border border-gray-300 text-center bold rounded h-7 3xl:h-9 focus:ring-main-700 focus:border-main-700"></div><div class="w-[24%] mr-[.1rem] mb-[.1rem]"><input${ssrRenderAttr("value", unref(form).slice[i].length)}${ssrRenderAttr("placeholder", unref(t)("length"))}${ssrRenderAttr("id", unref(form).slice[i].row_id + "3")} class="{{(i+1)%2 == 0 ? 'bg-main-400' : 'bg-white'}} block w-full py-0 !px-3 text-xs bg-white text-gray-900 border border-gray-300 text-center bold rounded h-7 3xl:h-9 focus:ring-main-700 focus:border-main-700"></div><div class="w-[24%] mb-[.1rem] mr-[.1rem]"><textarea rows="1"${ssrRenderAttr("id", unref(form).slice[i].row_id + "4")} class="{{(i+1)%2 == 0 ? 'bg-main-400' : 'bg-white'}} block w-full py-1 !px-3 text-xs bg-white text-gray-900 border border-gray-300 rounded description h-7 3xl:h-9 focus:ring-main-700 focus:border-main-700 placeholder-slate-400"${ssrRenderAttr("placeholder", unref(t)("description"))}>${ssrInterpolate(unref(form).slice[i].description)}</textarea></div><div class="w-[24%] mr-[.1rem]"><select${ssrRenderAttr("id", unref(form).slice[i].row_id + "5")} class="{{(i+1)%2 == 0 ? 'bg-main-400' : 'bg-white'}} block w-full py-0 !px-3 text-xs bg-white text-gray-900 border border-gray-300 rounded h-7 3xl:h-9 focus:ring-main-700 focus:border-main-700"><option value="0"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_two) ? ssrLooseContain(unref(form).slice[i].width_two, "0") : ssrLooseEqual(unref(form).slice[i].width_two, "0")) ? " selected" : ""}>${ssrInterpolate(unref(t)("width two"))}</option><option value="1"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_two) ? ssrLooseContain(unref(form).slice[i].width_two, "1") : ssrLooseEqual(unref(form).slice[i].width_two, "1")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Strip"))}</option><option value="2"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_two) ? ssrLooseContain(unref(form).slice[i].width_two, "2") : ssrLooseEqual(unref(form).slice[i].width_two, "2")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Farsi"))}</option><option value="3"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_two) ? ssrLooseContain(unref(form).slice[i].width_two, "3") : ssrLooseEqual(unref(form).slice[i].width_two, "3")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Groove"))}</option><option value="0"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_two) ? ssrLooseContain(unref(form).slice[i].width_two, "0") : ssrLooseEqual(unref(form).slice[i].width_two, "0")) ? " selected" : ""}>${ssrInterpolate(unref(t)("none"))}</option></select></div><div class="w-[24%] mr-[.1rem]"><select${ssrRenderAttr("id", unref(form).slice[i].row_id + "6")} class="{{(i+1)%2 == 0 ? 'bg-main-400' : 'bg-white'}} block w-full py-0 !px-3 text-xs bg-white text-gray-900 border border-gray-300 rounded h-7 3xl:h-9 focus:ring-main-700 focus:border-main-700"><option value="0"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_one) ? ssrLooseContain(unref(form).slice[i].width_one, "0") : ssrLooseEqual(unref(form).slice[i].width_one, "0")) ? " selected" : ""}>${ssrInterpolate(unref(t)("width one"))}</option><option value="1"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_one) ? ssrLooseContain(unref(form).slice[i].width_one, "1") : ssrLooseEqual(unref(form).slice[i].width_one, "1")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Strip"))}</option><option value="2"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_one) ? ssrLooseContain(unref(form).slice[i].width_one, "2") : ssrLooseEqual(unref(form).slice[i].width_one, "2")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Farsi"))}</option><option value="3"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_one) ? ssrLooseContain(unref(form).slice[i].width_one, "3") : ssrLooseEqual(unref(form).slice[i].width_one, "3")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Groove"))}</option><option value="0"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].width_one) ? ssrLooseContain(unref(form).slice[i].width_one, "0") : ssrLooseEqual(unref(form).slice[i].width_one, "0")) ? " selected" : ""}>${ssrInterpolate(unref(t)("none"))}</option></select></div><div class="w-[24%] mr-[.1rem]"><select${ssrRenderAttr("id", unref(form).slice[i].row_id + "7")} class="{{(i+1)%2 == 0 ? 'bg-main-400' : 'bg-white'}} block w-full py-0 !px-3 text-xs bg-white text-gray-900 border border-gray-300 rounded h-7 3xl:h-9 focus:ring-main-700 focus:border-main-700"><option value="0"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_two) ? ssrLooseContain(unref(form).slice[i].length_two, "0") : ssrLooseEqual(unref(form).slice[i].length_two, "0")) ? " selected" : ""}>${ssrInterpolate(unref(t)("length two"))}</option><option value="1"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_two) ? ssrLooseContain(unref(form).slice[i].length_two, "1") : ssrLooseEqual(unref(form).slice[i].length_two, "1")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Strip"))}</option><option value="2"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_two) ? ssrLooseContain(unref(form).slice[i].length_two, "2") : ssrLooseEqual(unref(form).slice[i].length_two, "2")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Farsi"))}</option><option value="3"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_two) ? ssrLooseContain(unref(form).slice[i].length_two, "3") : ssrLooseEqual(unref(form).slice[i].length_two, "3")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Groove"))}</option><option value="0"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_two) ? ssrLooseContain(unref(form).slice[i].length_two, "0") : ssrLooseEqual(unref(form).slice[i].length_two, "0")) ? " selected" : ""}>${ssrInterpolate(unref(t)("none"))}</option></select></div><div class="w-[24%] mr-[.1rem]"><select${ssrRenderAttr("id", unref(form).slice[i].row_id + "8")} class="{{(i+1)%2 == 0 ? 'bg-main-400' : 'bg-white'}} block w-full py-0 !px-3 text-xs bg-white text-gray-900 border border-gray-300 rounded h-7 3xl:h-9 focus:ring-main-700 focus:border-main-700"><option value="0"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_one) ? ssrLooseContain(unref(form).slice[i].length_one, "0") : ssrLooseEqual(unref(form).slice[i].length_one, "0")) ? " selected" : ""}>${ssrInterpolate(unref(t)("length one"))}</option><option value="1"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_one) ? ssrLooseContain(unref(form).slice[i].length_one, "1") : ssrLooseEqual(unref(form).slice[i].length_one, "1")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Strip"))}</option><option value="2"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_one) ? ssrLooseContain(unref(form).slice[i].length_one, "2") : ssrLooseEqual(unref(form).slice[i].length_one, "2")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Farsi"))}</option><option value="3"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_one) ? ssrLooseContain(unref(form).slice[i].length_one, "3") : ssrLooseEqual(unref(form).slice[i].length_one, "3")) ? " selected" : ""}>${ssrInterpolate(unref(t)("Groove"))}</option><option value="0"${ssrIncludeBooleanAttr(Array.isArray(unref(form).slice[i].length_one) ? ssrLooseContain(unref(form).slice[i].length_one, "0") : ssrLooseEqual(unref(form).slice[i].length_one, "0")) ? " selected" : ""}>${ssrInterpolate(unref(t)("none"))}</option></select></div></div></div>`); }); _push(`<!--]--></div></div></div><footer class="bg-white flex justify-between items-center pb-2 pt-1 sm:border-r sm:border-l w-full sm:w-9/12 md:w-7/12 lg:w-6/12 2xl:w-5/12 mx-auto fixed bottom-0 right-0 left-0 border-t"><div class="px-1 w-full">`); _push(ssrRenderComponent(_component_UButton, { onClick: handelClick, loading: unref(loading), square: "", class: "w-full flex text-white rounded-sm border h-10 bg-main-700 items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<span class="block px-2 text-xs bold truncate"${_scopeId}>${ssrInterpolate(unref(t)("registration"))}</span>`); } else { return [ createVNode("span", { class: "block px-2 text-xs bold truncate" }, toDisplayString(unref(t)("registration")), 1) ]; } }), _: 1 }, _parent)); _push(`</div></footer></div>`); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/unit/make/create.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default }; //# sourceMappingURL=create-CNPGjPnj.mjs.map
Coded With 💗 by
0x6ick Mod By V1rus_Alfa