Compare commits

..

No commits in common. "0468739cdc77c745a17a6070723320f3f138ae69" and "6d651dd65aa9310a5c3ac513b4a80c18fdcab447" have entirely different histories.

5 changed files with 93 additions and 88 deletions

View File

@ -249,11 +249,11 @@ function formatContent(content) {
function generateDetailsHtml(item) {
let html = `<details class="custom-details" ${item.isOpen ? "open" : ""}>`;
html += `<summary>`;
if (item.tag) {
html += `<a class="tag" target="normal" @click.stop="true" > ${item.tag} </a>`;
// console.log(" html 1 ", html);
}
html += `${item.title || "بدون عنوان"}`;
@ -272,11 +272,6 @@ function generateDetailsHtml(item) {
html += `</details>`;
if(item.background)
html = html.replaceAll("#bcolor#", item.background)
else
html = html.replaceAll("#bcolor#", "")
// console.log(" html 10 ", html);
return html;
}
@ -519,16 +514,6 @@ onBeforeUnmount(() => {
}
}
.bcolor1{
background: rgb(227, 242, 253) !important;
}
.bcolor2{
background: rgb(232, 245, 233) !important;
}
.bcolor3{
background: rgb(243, 229, 245) !important;
}
/* استایل آکاردئون‌ها */
.custom-details {
position: relative;

View File

@ -190,39 +190,15 @@ const headerTools = computed(() => [
placeholder: "انتخاب کنید",
items: [
{ label: " همه", value: "all" },
{ label: "تعارض مستقر", value: "تعارض مستقر" },
{ label: "مطلق مقدم، مقید موخر", value: "مطلق مقدم، مقید موخر" },
{ label: "مقید مقدم، مطلق موخر", value: "مقید مقدم، مطلق موخر" },
{ label: "تکرار حکم", value: "تکرار حکم" },
{ label: "بدون تعارض", value: "بدون تعارض" },
{ label: " تعارض مستقر", value: "stable" },
{ label: "تعارض مشروط", value: "conditional" },
{ label: "تکرار حکم", value: "duplicate" },
],
},
},
{
key: "label",
label: "اعتبار داتیک:",
},
{
type: "dropdown",
key: "dropdown",
name: "state_etebar",
dropdownSchema: {
width: "8em",
modelValue: null, // اینو بذار
optionAttribute: "title",
valueAttribute: "value",
searchable: false,
placeholder: "انتخاب کنید",
items: [
{ label: " همه", value: "all" },
{ label: "نامعتبر", value: "invalid" },
{ label: "معتبر", value: "valid" },
],
},
},
{
key: "label",
label: "اعتبار تشخیصی:",
label: " وضعیت اعتبار:",
},
{
type: "dropdown",

View File

@ -51,18 +51,12 @@ const setDataEditor = async () => {
accordionItems.value = [];
let node = {};
/////-----------------------------------------
if (_source.previous_info) {
let item = _source.previous_info;
node = {
background:"bcolor1",
isOpen: false,
id: item.section_mom_id,
title:
`<a class="label #bcolor# " href="#">قانون مقدم : </a>` +
item.qanon_title +
" - " +
item.full_path,
title: `<a class="label" href="#">قانون مقدم : </a>` + item.qanon_title + " - " + item.full_path,
tag: item.state_etebar,
content: _source.content1,
link_label: "«منبع»",
@ -72,21 +66,16 @@ const setDataEditor = async () => {
children: [],
};
if (item.group_section_ids?.length > 1)
node["children"].push({
isOpen: false,
id: item.context_id,
title: "متن کامل با اجزاء دیگر مورد توجه : ",
content: _source.context1,
});
node["children"].push({
isOpen: false,
id: item.context_id,
title: "متن کامل با اجزاء دیگر مورد توجه : ",
content: _source.context1,
});
accordionItems.value.push(node);
let unrepeat_id = {}
item.rule_ids.forEach((rule_id) => {
if(unrepeat_id[rule_id])
return
unrepeat_id[rule_id] = 1
let content = _source.rules_content[rule_id] ?? "";
accordionItems.value.push({
isOpen: false,
@ -97,18 +86,12 @@ const setDataEditor = async () => {
});
}
/////-----------------------------------------
if (_source.next_info) {
let item = _source.next_info;
node = {
background:"bcolor2",
isOpen: false,
id: item.section_mom_id,
title:
`<a class="label #bcolor# " href="#">قانون موخر : </a>` +
item.qanon_title +
" - " +
item.full_path,
title: `<a class="label">قانون موخر : </a>` + item.qanon_title + " - " + item.full_path,
tag: item.state_etebar,
content: _source.content2,
link_label: "«منبع»",
@ -117,23 +100,16 @@ const setDataEditor = async () => {
.replace("{{section_id}}", item.section_mom_id),
children: [],
};
if (item.group_section_ids?.length > 1)
node["children"].push({
isOpen: false,
id: item.context_id,
title: "متن کامل با اجزاء دیگر مورد توجه : ",
content: _source.context1,
});
node["children"].push({
isOpen: false,
id: item.context_id,
title: "متن کامل با اجزاء دیگر مورد توجه : ",
content: _source.context1,
});
accordionItems.value.push(node);
let unrepeat_id = {}
item.rule_ids.forEach((rule_id) => {
if(unrepeat_id[rule_id])
return
unrepeat_id[rule_id] = 1
let content = _source.rules_content[rule_id] ?? "";
accordionItems.value.push({
isOpen: false,
@ -146,7 +122,6 @@ const setDataEditor = async () => {
/////-------------وحدت موضوع----------------------
node = {
background:"bcolor3",
isOpen: true,
id: 11,
title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",

View File

@ -23,13 +23,13 @@
},
{ "key": "next_info.full_path", "title": "ماده موخر", "width": "1" },
{
"key": "conflict_relation_identification.main_type",
"title": "تعارض- بررسی اول",
"key": "subject_unity.main_type",
"title": "وضعیت وحدت موضوع",
"width": "2"
},
{
"key": "conflict_evaluation.main_type",
"title": "تعارض -بررسی نهایی",
"key": "conflict_relation_identification.main_type",
"title": "تعارض",
"width": "2"
}
],

69
app/pages/login.vue Executable file
View File

@ -0,0 +1,69 @@
<template>
<div
class="min-h-[calc(100dvh-4em)] flex items-center justify-center p-4 bg-gray-100 dark:bg-dark-primary"
>
<div
class="max-w-md w-full bg-white dark:bg-dark-primary-800 rounded-2xl shadow-xl p-8 text-center border border-gray-200 dark:border-dark-primary-600"
>
<!-- Tabs -->
<ul class="flex border-b border-gray-200">
<li class="flex-1">
<button
class="w-full py-3.5 font-medium transition-all duration-200 cursor-pointer"
:class="tabClass('login')"
@click="setActive('login')"
>
ورود
</button>
</li>
<li class="flex-1">
<button
class="w-full py-3.5 font-medium transition-all duration-200 cursor-pointer"
:class="tabClass('register')"
@click="setActive('register')"
>
ثبتنام
</button>
</li>
</ul>
<!-- Content -->
<div class="mt-8">
<component :is="currentComponent" />
</div>
</div>
</div>
</template>
<script setup>
import { ref } from "vue";
definePageMeta({ layout: "login-layout" });
// --- Lazy load components ---
import LoginForm from "~/components/lazy-load/auth/LoginForm.vue";
import RegisterForm from "~/components/lazy-load/auth/RegisterForm.vue";
// --- State ---
const activeTab = ref("login");
const currentComponent = ref(LoginForm);
const componentsMap = {
login: LoginForm,
register: RegisterForm,
};
// --- Methods ---
function setActive(tab) {
activeTab.value = tab;
currentComponent.value = componentsMap[tab];
}
// --- Compute class for tabs ---
function tabClass(tab) {
if (activeTab.value === tab) {
return "text-primary border-b-1 border-primary font-semibold";
} else {
return "text-gray-500 hover:text-primary";
}
}
</script>
<style></style>