diff --git a/app/components/auto-import/TiptapEditor.vue b/app/components/auto-import/TiptapEditor.vue index dd072f4..7293181 100755 --- a/app/components/auto-import/TiptapEditor.vue +++ b/app/components/auto-import/TiptapEditor.vue @@ -248,7 +248,14 @@ function formatContent(content) { } function generateDetailsHtml(item) { - let html = `
`; + let html = `
`; + if(item.background) + html.replace("#bcolor#", item.background) + else + html.replace("#bcolor#", "") + + + html += ``; if (item.tag) { html += ` ${item.tag} `; @@ -515,6 +522,16 @@ onBeforeUnmount(() => { } } +.b_color1{ + background: rgb(227, 242, 253) +} +.b_color2{ + background: rgb(232, 245, 233) +} +.b_color3{ + background: rgb(243, 229, 245) +} + /* استایل آکاردئون‌ها */ .custom-details { position: relative; diff --git a/app/components/lazy-load/data-entry/RelationEdit.vue b/app/components/lazy-load/data-entry/RelationEdit.vue index b2d45a2..af4379e 100644 --- a/app/components/lazy-load/data-entry/RelationEdit.vue +++ b/app/components/lazy-load/data-entry/RelationEdit.vue @@ -54,9 +54,14 @@ const setDataEditor = async () => { if (_source.previous_info) { let item = _source.previous_info; node = { + background:"b_color1", isOpen: false, id: item.section_mom_id, - title: `قانون مقدم : ` + item.qanon_title + " - " + item.full_path, + title: + `قانون مقدم : ` + + item.qanon_title + + " - " + + item.full_path, tag: item.state_etebar, content: _source.content1, link_label: "«منبع»", @@ -66,16 +71,21 @@ const setDataEditor = async () => { children: [], }; - node["children"].push({ - isOpen: false, - id: item.context_id, - title: "متن کامل با اجزاء دیگر مورد توجه : ", - content: _source.context1, - }); + if (item.group_section_ids?.length > 1) + 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, @@ -89,9 +99,14 @@ const setDataEditor = async () => { if (_source.next_info) { let item = _source.next_info; node = { + background:"b_color2", isOpen: false, id: item.section_mom_id, - title: `قانون موخر : ` + item.qanon_title + " - " + item.full_path, + title: + `قانون موخر : ` + + item.qanon_title + + " - " + + item.full_path, tag: item.state_etebar, content: _source.content2, link_label: "«منبع»", @@ -100,12 +115,14 @@ const setDataEditor = async () => { .replace("{{section_id}}", item.section_mom_id), children: [], }; - node["children"].push({ - isOpen: false, - id: item.context_id, - title: "متن کامل با اجزاء دیگر مورد توجه : ", - content: _source.context1, - }); + + if (item.group_section_ids?.length > 1) + node["children"].push({ + isOpen: false, + id: item.context_id, + title: "متن کامل با اجزاء دیگر مورد توجه : ", + content: _source.context1, + }); accordionItems.value.push(node); @@ -122,6 +139,7 @@ const setDataEditor = async () => { /////-------------وحدت موضوع---------------------- node = { + background:"b_color3", isOpen: true, id: 11, title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",