���Root Mod By V1rus_Alfa
User / IP
:
216.73.216.158
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
/
pages.2
/
projects
/
Viewing: index.vue
<script setup lang="ts"> const {t, locale} = useI18n() const localePath = useLocalePath() const toast = useToast() const isOpenProject = ref(false); const loadingEdit = ref(false); const loading = ref(true); const deleteConfirmationIsOpen = ref(false); function toggleDeleteDialog() { deleteConfirmationIsOpen.value = !deleteConfirmationIsOpen.value; } const state = reactive({ project_id: undefined, name: undefined, name_employer: undefined, page: 1, }) const projects = ref([ { id: null, name: '', } ]); async function getAllAnalyzeProjects() { const {data} = await useAPI('/analyze/project/get', { immediate: true, server: true, }) projects.value = data.value?.projects?.data; } await getAllAnalyzeProjects(); console.log('projects', projects); const toggleModal = (obj: any) => { state.project_id = obj['id']; state.name = obj['name']; state.name_employer = obj['name_employer']; isOpenProject.value = true; } // Project request async function ProjectReq() { if (!state.name) { return toast.add({title: t('project_name'), color: "orange"}) } if (!state.name_employer) { return toast.add({title: t('Employer name'), color: "orange"}) } if (!state.project_id) { return toast.add({title: t('refresh page'), color: "orange"}) } loadingEdit.value = true; await useAPI('/analyze/project/edit', { method: 'POST', body: { project_id: state.project_id, name: state.name, name_employer: state.name_employer, }, immediate: true, server: true, }) loadingEdit.value = false; isOpenProject.value = false; } async function Delete(id: any) { loadingEdit.value = true; await useAPI('/analyze/project/delete', { method: 'POST', body: { project_id: id, }, immediate: true, server: true, }) loadingEdit.value = false; } definePageMeta({ title: '', layout: 'with-out-footer', middleware: ['auth'], }); useHead({ title: 'projects_list' }); onMounted(() => { loading.value = false; }) </script> <template> <div> <section :dir="locale == 'en' ? 'ltr' : 'rtl'" class="-mt-6 mb-10"> <ul> <li class="py-4 w-full border-b-2 odd:bg-gray-100 even:bg-white even:text-gray-900" v-for="(row, idx) in projects" :key="idx"> <div class="pb-2 px-2 cursor-pointer flex justify-between items-center"> <label class=" block w-full text-main-700 cursor-pointer text-xs "> {{ row.name }} </label> <div class="flex justify-end items-center"> <UIcon @click="toggleModal(row)" name="i-heroicons-pencil-square" :class="locale == 'en' ? 'mr-4' : 'ml-4'" class="text-green-600 cursor-pointer ml-4 text-base"/> <ULink square :loading="loadingEdit" @click.prevent.stop="!deleteConfirmationIsOpen" class="flex items-center !text-red-600 !shadow-none justify-center"> <UIcon name="i-heroicons-trash" :class="locale == 'en' ? 'mr-4' : 'ml-4'" class="text-red-600 cursor-pointer text-base"/> </ULink> <SharedConfirmationDialog :toggle-show-up="deleteConfirmationIsOpen" :message="t('are_you_sure_to_do_this_operation')" @on-closed="toggleDeleteDialog" @on-confirmed="Delete(row.id)" /> <ULink :to="localePath('/project/'+row.id)" square class=" flex text-white rounded bg-red-700 items-center justify-center"> <span class=" block p-1 text-xs truncate "> {{ t('View_Details') }} </span> </ULink> </div> </div> </li> </ul> </section> <UModal v-model="isOpenProject" class=" !top-0"> <div :dir="locale == 'en' ? 'ltr' : 'rtl'" class=" flex justify-between items-center p-2"> <span class=" block bold text-xs truncate !top-0 !bottom-auto !justify-start "> {{ t('Project Information') }} </span> <UButton color="gray" variant="ghost" icon="i-heroicons-x-mark-20-solid" class="-my-1" @click="isOpenProject = false"/> </div> <div :dir="locale == 'en' ? 'ltr' : 'rtl'" class=" h-96 w-full mb-6 mt-3 px-4 pt-3 max-h-full overflow-y-auto "> <div class=" flex justify-start items-center w-full mb-3"> <label :class="locale == 'en' ? ' text-left' : ' text-right'" class="block w-4/12 text-gray-500 bg-white text-xs "> {{ t('Project Name') }} </label> <UInput variant="outline" class="w-9/12" :inputClass="' w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 pl-2 py-0 text-xs' " v-model="state.name" /> </div> <div class=" flex justify-start items-center w-full mb-3"> <label :class="locale == 'en' ? ' text-left' : ' text-right'" class="block w-4/12 text-gray-500 bg-white text-xs "> {{ t('Name Of Employer') }} </label> <UInput :loading="false" variant="outline" class="w-9/12" :inputClass="' w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 pl-2 py-0 text-xs' " v-model="state.name_employer" /> </div> </div> <div class=" flex justify-around mb-2 items-center "> <UButton @click="isOpenProject = false" square class="w-5/12 flex px-2 text-white rounded bg-blue-700 items-center justify-center"> <span class=" block px-2 text-xs truncate "> {{ t('Cancel') }} </span> </UButton> <UButton :loading="loadingEdit" @click="ProjectReq()" square class="w-5/12 flex px-2 h-8 text-white rounded bg-main-700 items-center justify-center"> <span class=" block px-2 text-xs truncate "> {{ t('Edit') }} </span> </UButton> </div> </UModal> <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-6/12"> <ULink external :to="localePath('/analyze/start')" class="w-full flex bg-green-700 hover:bg-green-600 rounded border h-7 text-white items-center justify-center"> <span class=" block px-2 text-sm truncate "> {{ t('New Project') }} </span> </ULink> </div> <div class="px-1 w-6/12"> <ULink :to="localePath('/')" class="w-full flex bg-red-700 rounded border h-7 text-white items-center justify-center" color="red" > <span class=" block px-2 text-sm truncate "> {{ t('Main Page') }} </span> </ULink> </div> </footer> </div> </template>
Coded With 💗 by
0x6ick Mod By V1rus_Alfa