Design pages.

This commit is contained in:
mustafa-rezae 2025-02-26 11:22:21 +03:30
parent 0b606984b6
commit 29e3034e3f
56 changed files with 1604 additions and 13665 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

View File

@ -0,0 +1,3 @@
<svg width="140" height="201" viewBox="0 0 140 201" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect y="0.28418" width="140" height="200" rx="8" fill="#D9D9D9"/>
</svg>

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,486 +0,0 @@
.user-modal {
width: 720px;
height: 528px;
top: 50%;
left: 50%;
bottom: unset;
right: unset;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
.popUp-tab {
&__header {
position: absolute;
z-index: 10;
right: 0;
top: 0;
width: 160px;
height: calc(100% - 65px);
background: white;
border-left: 1px solid #f1f1f1;
padding: 20px 0;
&-title {
font-size: 16px;
color: #444444;
margin-bottom: 32px;
padding-right: 23px;
padding-left: 23px;
}
}
&__menu {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column !important ;
.nav-tabs {
border: unset;
display: flex;
flex-direction: column !important ;
}
a {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
flex-direction: column !important ;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding-right: 23px;
border-radius: 0;
width: 100%;
border: unset;
margin: 0;
font-size: 14px;
color: #444444;
padding-top: 6px;
padding-bottom: 6px;
margin-bottom: 5px;
padding-left: 23px;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
&.active {
background-color: #e8fcff;
}
&:hover {
background-color: #e8fcff;
}
}
}
&__content {
padding-top: 0px !important ;
height: calc(100% - 75px);
.tab-pane {
padding-right: 205px;
}
}
&__buttons {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
z-index: 11;
padding-left: 24px;
padding-right: 24px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
border-top: 1px solid #f1f1f1;
background: white;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
height: 65px;
}
}
.my-profile {
padding-left: 48px;
padding-bottom: 80px;
height: 100%;
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
&__pic {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding-top: 45px;
padding-bottom: 45px;
border-bottom: 1px solid #f1f1f1;
position: relative;
.aks-file-upload-content {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.aks-file-upload-preview {
height: unset !important;
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.aks-file-upload-image img {
width: 72px;
height: 72px !important;
border-radius: 50%;
}
.aks-file-upload-p-header {
display: none;
}
label {
margin: 0;
}
.aks-file-upload-label {
background: #f7fafe;
border-radius: 50%;
width: 72px;
height: 72px;
border: 2px solid #f1f1f1;
position: relative;
color: rgba(0, 0, 0, 0);
}
.aks-file-upload-label::before {
content: "+";
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
width: 100%;
height: 100%;
position: absolute;
color: #bac4ce;
font-weight: bold;
font-size: 18px;
}
}
&__form {
padding-top: 10px;
overflow: unset !important;
}
&__container {
height: 100%;
}
.form-row {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding: 0;
border: unset;
margin-right: 0;
margin-left: 0;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
&:not(:last-child) {
margin-bottom: 16px;
}
}
label {
width: 130px;
font-size: 14px;
color: #444444;
}
input {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
background: white;
border: 1px solid #f1f1f1;
border-radius: 10px;
height: 40px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding-right: 25px;
padding-left: 25px;
color: #444444;
// &::-webkit-input-placeholder {
// color: #444444;
// font-size: 14px;
// opacity: 1;
// }
// &:-ms-input-placeholder {
// color: #444444;
// font-size: 14px;
// opacity: 1;
// }
// &::-ms-input-placeholder {
// color: #444444;
// font-size: 14px;
// opacity: 1;
// }
// &::placeholder {
// color: #444444;
// font-size: 14px;
// opacity: 1;
// }
&:focus {
border-radius: 10px;
outline: unset;
border-color: #00b6e3;
}
}
.input-container {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
input,
textarea {
width: 100%;
}
}
textarea {
flex: 1;
background: white;
border: 1px solid #f1f1f1;
border-radius: 10px;
min-height: max-content;
// height: 155px;
display: flex;
align-items: center;
padding-right: 25px;
padding-left: 25px;
resize: none;
padding-top: 10px;
/* color: rgba(78, 78, 78, 0.3); */
height: 10em;
// &::-moz-placeholder {
// color: rgba(78, 78, 78, 0.3);
// font-size: 14px;
// opacity: 1;
// }
// &:-ms-input-placeholder {
// color: rgba(78, 78, 78, 0.3);
// font-size: 14px;
// opacity: 1;
// }
// &::placeholder {
// color: rgba(78, 78, 78, 0.3);
// font-size: 14px;
// opacity: 1;
// }
&:focus {
border-radius: 10px;
outline: unset;
border-color: #00b6e3;
}
}
}
.tab-pane {
height: 100%;
}
}
.user-modal .os-host-rtl > .os-scrollbar-vertical {
right: unset;
left: 10px;
width: 6px;
padding-top: 25px;
}
.user-modal
.os-theme-dark
> .os-scrollbar
> .os-scrollbar-track
> .os-scrollbar-handle {
background: rgba(0, 0, 0, 0.1);
}
.show.user-modal__modal {
background-color: rgba(27, 39, 51, 0.1);
}
.show.user-modal__modal .modal-dialog {
z-index: 3;
}
#user-modal .modal-dialog {
-webkit-transform: unset;
transform: unset;
left: 0;
right: 0;
}
#user-modal .user-modal {
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
top: 40%;
}
#user-modal.show .user-modal {
top: 50%;
}
.popUp-tab {
position: fixed;
top: 30%;
width: 304px;
background-color: white;
border-radius: 20px;
border: 1px solid #bac4ce;
overflow: hidden;
&__clear {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
color: #444444;
font-size: 14px;
padding-right: 16px;
padding-left: 16px;
height: 32px;
margin-left: 15px;
&:hover {
color: #00b6e3;
}
}
&__submit {
border-radius: 20px;
border: 2px solid #00b6e3;
font-size: 14px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding-right: 16px;
padding-left: 16px;
color: #00b6e3;
height: 32px;
-webkit-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
&:hover {
background-color: #00b6e3;
color: #fff;
}
}
&__header {
padding: 24px;
padding-top: 17px;
font-size: 14px;
}
form {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.form-row {
padding-right: 24px;
padding-left: 24px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding-bottom: 16px;
&:not(:first-child) {
padding-top: 16px;
}
&:not(:last-child) {
border-bottom: 1px solid #f1f1f1;
}
&--radio {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
}
&__buttons {
padding: 24px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
justify-content: flex-end;
border-top: 1px solid #f1f1f1;
}
input {
max-width: 100%;
color: #444444;
font-size: 16px;
// &::-webkit-input-placeholder {
// color: #bac4ce;
// }
// &:-ms-input-placeholder {
// color: #bac4ce;
// }
// &::-ms-input-placeholder {
// color: #bac4ce;
// }
// &::placeholder {
// color: #bac4ce;
// }
}
textarea {
max-width: 100%;
color: #444444;
font-size: 14px;
outline: none !important;
height: 20px;
resize: none;
overflow: hidden;
// &::-webkit-input-placeholder {
// color: #bac4ce;
// }
// &:-ms-input-placeholder {
// color: #bac4ce;
// }
// &::-ms-input-placeholder {
// color: #bac4ce;
// }
// &::placeholder {
// color: #bac4ce;
// }
}
.close-btn {
display: none !important;
}
}
.modal-dialog-scrollable {
.modal-body {
overflow-y: hidden !important;
}
}
#overlay-plugin2 {
height: 350px !important ;
}
#overlay-plugin1{
max-width: 100% !important ;
}

View File

@ -1,71 +0,0 @@
.search-page__search-container {
.dropdown-toggle {
/* min-width: 9.5em; */
background: #fff !important;
border: unset !important;
}
.myStyle {
width: 100%;
}
.button-search {
background-color: #fff !important;
border: 1px solid #fff !important;
width: 34px !important;
height: 90% !important;
margin-top: 2px;
/* margin-left: 2px; */
z-index: 99;
}
.input-group-prepend {
position: absolute;
left: 1em;
top: 11px;
margin-right: 4em;
border-right: solid #eee 1px;
}
.input-group {
width: 45em;
height: 3.5em;
border: 1px solid #eee;
// border-radius: 0.5em;
border-color: rgba(150, 243, 243, 0.4588235294);
background: #fff;
align-items: center;
z-index: 9;
}
.dropdown-menu {
transform: unset !important;
left: 0;
right: auto;
min-width: 10em;
font-size: 0.9rem;
border: none;
// border-radius: 0.5em;
text-align: right;
margin-top: 4em;
background-color: #fff;
box-shadow: 0 0.4688rem 2.1875rem rgba(4, 9, 20, 0.03),
0 0.9375rem 1.4063rem rgba(4, 9, 20, 0.03),
0 0.25rem 0.5313rem rgba(4, 9, 20, 0.03),
0 0.125rem 0.1875rem rgba(4, 9, 20, 0.03);
top: -10px !important;
left: 8px !important;
}
.button {
width: 143px !important;
border-radius: 4px !important;
}
.dropdown-item {
display: block;
width: 100%;
padding: 0.25rem 1.5rem;
clear: both;
font-weight: 400;
color: #212529;
text-align: inherit;
white-space: nowrap;
background-color: transparent;
border: 0;
position: relative;
}
}

View File

@ -1,841 +0,0 @@
.searchNavigation {
.nav-tabs-container {
display: flex;
justify-content: center;
}
.filters__delete {
margin-bottom: 0;
}
.filter-items {
li {
min-width: 14em;
max-width: 16em;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 1em;
button {
top: -0.4em !important;
left: -0.9em !important;
}
}
}
// .sub-header {
// div {
// width: 5em;
// }
// }
.float-label {
position: absolute;
top: -1.5em;
right: 0.5em;
background-color: #fff;
padding: 0px 0.5em;
font-size: 0.8rem;
color: #6f6f6f;
z-index: 1;
}
.tabel-main {
position: static !important;
top: unset;
}
.dropdown-main {
position: relative;
right: 18px;
top: 5px;
.dropdown-toggle::after {
background-image: none;
}
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
height: 10vh !important;
width: 100%;
// right: 56px;
// height: 64px;
// width: calc(100% - 56px);
// border-bottom: 1px solid white;
// background: #fff;
//padding-top: 15px;
//padding-bottom: 15px;
.header-Breadcrumbs {
position: relative;
flex: 1;
margin: auto 5px;
display: flex;
}
.header-button {
position: relative;
display: flex;
top: auto;
right: 0px;
flex: 2;
justify-content: flex-start;
div {
margin-left: 8px;
}
}
}
.detail-page {
&__header {
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 47px;
padding-right: 47px;
border-bottom: 1px solid #f1f1f1;
padding-bottom: 10px;
height: 64px;
.document-list__star {
opacity: 1 !important;
}
}
&__head {
display: flex;
flex-direction: column;
}
&__title {
font-size: 14px;
display: flex;
align-items: center;
i {
margin-right: 3px;
font-size: 26px !important;
background: -webkit-linear-gradient(#c1d4da 0%, #e2e8ef 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
&__breadcrumb {
ul {
display: flex;
align-items: center;
list-style: none;
}
li {
display: flex;
align-items: center;
&:not(:last-child):after {
content: ">";
padding-right: 8px;
padding-left: 8px;
padding-top: 4px;
font-size: 10px;
font-weight: bold;
color: #bac4ce;
display: flex;
justify-content: center;
align-items: center;
}
&:last-child {
flex: 1;
a {
}
}
}
a {
display: block;
font-size: 12px;
color: #92a2b2;
}
}
&__meta {
ul {
display: flex;
align-items: center;
}
li {
}
}
&__shared-user {
}
&__content {
max-height: calc(100vh - 151px);
padding-right: 40px;
padding-top: 40px;
padding-bottom: 40px;
max-width: 696px;
margin-right: auto;
margin-left: auto;
h1 {
font-size: 24px;
color: #444444;
margin-top: 8px;
margin-bottom: 8px;
}
p {
font-size: 16px;
font-weight: lighter;
line-height: 30px;
margin-bottom: 8px;
}
}
&__edit-btn {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
a {
min-width: 88px;
height: 40px;
color: white;
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
border-radius: 20px;
background: #1b2733;
&:hover {
color: white;
opacity: 0.8;
}
}
}
}
.pages-content {
width: 100%;
padding: 0;
}
.combo-list {
position: relative;
border-bottom: 1px solid #eee;
.form-control,
.multiselect {
// width: 15em;
font-family: sahel-semi-bold;
}
}
.select-export-container {
// position: absolute;
// top: 1rem;
// left: 0;
// z-index: 999;
.select-export-type-label {
display: flex;
align-items: center;
position: absolute;
top: 0em;
background-color: #fff;
right: 0.6em;
padding: 0 0.4em;
margin: 0;
font-size: 0.8rem;
}
// .tavasi::before {
// font-size: 1.1rem;
// }
.form-control {
font-size: 0.9rem;
padding-top: 0.3em;
height: 2.2em;
}
}
.position1 {
grid-template-columns: 0fr 2fr;
}
.position2 {
grid-template-columns: 23em auto;
}
.navigation-filter {
position: fixed;
right: 0px;
top: 103px;
border-radius: 50%;
width: 2.5em;
height: 2.5em;
box-shadow: 0px 0px 7px 1px #eee;
background-color: #eee;
display: flex;
align-items: center;
justify-content: center;
}
@media (max-width: 575.98px) {
.nav {
li {
.nav-link {
font-size: 0.8rem;
}
}
li.desktop:nth-child(n + 4) {
display: none;
}
.dropdown-menu {
a.dropdown-item:nth-child(-n + 3) {
display: none;
}
}
// .combo-list {
// margin-top: 1em;
// }
}
.header-avatar {
left: 0px;
position: absolute;
bottom: 0.25rem;
}
.dropdown-main {
margin-bottom: 10px;
width: 100%;
text-align: right;
}
#table1 {
// background-color: red !important;
}
#myTabContent {
position: relative;
}
.position1 {
grid-template-columns: auto;
}
.position2 {
grid-template-columns: auto;
}
.tabel {
display: grid !important;
}
.tabel-main {
position: relative;
top: 5rem;
width: 100%;
}
.m1 {
margin-top: 25px;
}
.pages-content {
width: 22em;
position: fixed !important;
z-index: 10;
background-color: #fff;
top: 0em !important;
height: 100dvh;
right: 0px;
.main-tree {
.filter-list {
// height: 10em;
}
.main-tree-body {
overflow: auto;
overflow-x: hidden;
width: 100%;
}
.min-height-tree {
height: calc(100vh - 8em) !important;
}
.max-height-tree {
height: calc(100vh - 5em);
}
}
}
.tab-content {
margin-top: 2em;
}
.navigation-filter {
position: fixed;
right: 0px;
top: 103px;
border-radius: 50%;
width: 2.5em;
height: 2.5em;
box-shadow: 0px 0px 7px 1px #eee;
background-color: #eee;
display: flex;
align-items: center;
justify-content: center;
}
.my-table {
width: 100%;
overflow-x: hidden !important;
// height: calc(100vh - 24em) !important;
.table-responsive {
height: calc(100vh - 24em) !important;
table {
.thead {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
.subtitle {
display: none;
}
}
}
tbody {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
.subtitle {
display: none;
}
}
}
}
}
}
.my-list {
.list-content {
height: calc(-19em + 100vh) !important;
}
}
}
@media only screen and (min-width: 576px) and (max-width: 767.98px) {
.nav {
li {
.nav-link {
font-size: 0.8rem;
}
}
li.desktop:nth-child(n + 4) {
display: none;
}
.dropdown-menu {
a.dropdown-item:nth-child(-n + 3) {
display: none;
}
}
// .combo-list {
// margin-top: 1em;
// }
}
.dropdown-main {
position: relative;
right: 18px;
width: 90%;
top: 5px;
margin-bottom: 10px;
.dropdown-toggle::after {
background-image: none;
}
}
.table .table-borderless .table-hover {
display: inline-block !important;
}
#myTabContent {
position: relative;
}
// .dropdown {
// top: 10px;
// }
.multiselect {
// width: 11em;
}
.tabel {
display: grid;
}
.tabel-main {
position: relative;
top: 3rem;
}
.position1 {
grid-template-columns: auto;
}
.position2 {
grid-template-columns: auto;
}
.m1 {
margin-top: 22px;
width: 100%;
}
.multiselect {
// width: 43rem !important;
margin-bottom: 5px;
div {
width: 100%;
}
}
.pages-content {
width: 23em;
position: fixed !important;
z-index: 9;
background-color: #fff;
top: 0em !important;
height: 100dvh;
right: 0px;
.main-tree {
.filter-list {
// height: 10em;
}
.main-tree-body {
overflow: auto;
overflow-x: hidden;
width: 100%;
}
.min-height-tree {
height: calc(100vh - 8em) !important;
}
.max-height-tree {
height: calc(100vh - 5em);
}
}
}
.tab-content {
margin-top: 2em;
}
.navigation-filter {
position: fixed;
right: 0px;
top: 103px;
border-radius: 50%;
width: 2.5em;
height: 2.5em;
box-shadow: 0px 0px 7px 1px #eee;
background-color: #eee;
display: flex;
align-items: center;
justify-content: center;
}
.my-table {
overflow-x: hidden !important;
.table-responsive {
height: calc(100dvh - 22em);
table {
.thead {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
}
}
tbody {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
}
}
}
}
}
.my-list {
.list-content {
height: calc(-19em + 100vh) !important;
}
}
.main-page__content {
}
}
@media only screen and (min-width: 768px) and (max-width: 991.98px) {
#myTabContent {
position: relative;
}
.multiselect {
// width: 11em;
}
.tabel {
display: grid;
}
.tabel-main {
position: relative;
top: 3rem;
}
.smart_phones {
display: none;
}
.pages-content {
.main-tree {
.filter-list {
// height: 10em;
}
.main-tree-body {
overflow: auto;
overflow-x: hidden;
width: 100%;
}
.min-height-tree {
height: calc(100vh - 12em) !important;
}
.max-height-tree {
height: calc(100vh - 9em);
}
}
}
.tab-content {
margin-top: 2em;
}
.position1 {
grid-template-columns: auto;
}
.position2 {
grid-template-columns: auto;
}
.navigation-filter {
position: fixed;
right: 0px;
top: 103px;
border-radius: 50%;
width: 2.5em;
height: 2.5em;
box-shadow: 0px 0px 7px 1px #eee;
background-color: #eee;
display: flex;
align-items: center;
justify-content: center;
}
.my-table {
overflow-x: hidden !important;
.table-responsive {
height: calc(100dvh - 22em);
table {
.thead {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
}
}
tbody {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
}
}
}
}
}
.my-list {
.list-content {
height: calc(-19em + 100vh) !important;
}
}
}
@media only screen and (min-width: 992px) and (max-width: 1199.98px) {
.multiselect {
// width: 13em;
}
#myTabContent {
position: relative;
}
.tabel {
display: grid;
}
.tabel-main {
position: relative;
top: 3rem;
}
.smart_phones {
display: none;
}
.pages-content {
.main-tree {
.filter-list {
// height: 10em;
}
.main-tree-body {
overflow: auto;
overflow-x: hidden;
width: 100%;
}
.min-height-tree {
height: calc(100vh - 12em) !important;
}
.max-height-tree {
height: calc(100vh - 9em);
}
}
}
.my-table {
overflow-x: hidden !important;
.table-responsive {
height: calc(100dvh - 20em);
table {
.thead {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
}
}
tbody {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
}
}
}
}
}
.my-list {
.list-content {
height: calc(-15em + 100vh) !important;
}
}
}
@media (min-width: 1200px) {
.multiselect {
// width: 13em;
}
#myTabContent {
position: relative;
}
.tabel {
display: grid;
}
.tabel-main {
position: relative;
top: 3rem;
}
.smart_phones {
display: none;
}
.pages-content {
.main-tree {
.filter-list {
// height: 10em;
}
.main-tree-body {
overflow: auto;
overflow-x: hidden;
width: 100%;
}
.max-height-tree {
height: calc(100vh - 9em);
}
}
}
.my-table {
overflow-x: hidden !important;
.table-responsive {
height: calc(100dvh - 20em);
table {
.thead {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
}
}
tbody {
tr {
.voices {
display: none;
}
.meet_no {
display: none;
}
.format {
display: none;
}
}
}
}
}
}
.my-list {
.list-content {
height: calc(-15em + 100vh) !important;
}
}
}
}

View File

@ -1,589 +0,0 @@
// .main {
// position: fixed;
// z-index: 99;
// background-color: #fff;
// // width: 97%;
// // right: 58px;
// left: 0;
// right: 400px;
// }
// .main-full {
// width: 97%;
// right: 58px;
// }
// .button-text {
// border: none;
// background-color: initial;
// position: relative;
// top: 4px;
// }
// .Active {
// color: #00b6e3;
// position: relative;
// &::before {
// content: "";
// position: absolute;
// top: 36px;
// width: 52px;
// }
// }
// .nav-item-link:hover {
// color: #00b6e3 !important;
// }
// .active {
// color: #00b6e3 !important;
// position: relative;
// &::after {
// content: "";
// top: 30px;
// right: -3px;
// width: 100%;
// }
// }
// .schemasGetter {
// width: auto;
// margin-left: 20px;
// }
// .nav-item-header {
// display: flex;
// // justify-content: space-around;
// div {
// cursor: pointer;
// text-align: center;
// .nav-item-link {
// text-decoration: none;
// }
// }
// }
// .nav-item {
// display: flex;
// justify-content: flex-end;
// }
// .main-option {
// display: flex;
// justify-content: flex-end;
// }
.header__logo {
display: flex;
justify-content: space-between;
align-items: center;
}
// .select-button {
// border: 0px !important;
// }
// .dropdown-item {
// text-align: right !important;
// }
// .dropdown {
// appearance: none;
// }
// .Possibilities {
// // background-color: red;
// width: 97%;
// top: 3px;
// position: relative;
// margin: 0 auto;
// height: auto;
// padding: 5px;
// }
// .Possibilities-select {
// width: 6rem;
// // background-color: red;
// position: absolute;
// right: 49%;
// display: flex;
// align-content: center;
// justify-content: center;
// align-items: center;
// }
// .Possibilities-select-item {
// padding: 4px;
// border: 0;
// outline: 0 !important;
// }
// .state-button {
// color: red;
// }
// .class-border {
// height: 99px !important;
// }
// @media (max-width: 575.98px) {
// .row-nav.topheader {
// width: 360px;
// margin-right: 0;
// }
// .row-nav {
// font-size: 12px;
// }
// }
// @media only screen and (min-width: 768px) and (max-width: 991.98px) {
// .img-img {
// display: none !important;
// }
// }
// @media only screen and (min-width: 576px) and (max-width: 767.98px) {
// // .main {
// // right: 8px;
// // }
// .img-img {
// display: none !important;
// }
// .header__logo {
// justify-content: flex-start;
// }
// // .class-border {
// // height: 174px !important;
// // }
// .display-none {
// display: none !important;
// }
// }
// @media (max-width: 575.98px) {
// .main {
// right: 8px;
// }
// .img-img {
// display: none !important;
// }
// .header__logo {
// justify-content: flex-start;
// }
// .class-border {
// height: 174px !important;
// }
// .display-none {
// display: none !important;
// // display: inline;
// }
// }
// .active {
// // color:active;
// }
// .smart_phones {
// display: none;
// }
// .dropdown-container {
// position: relative;
// }
// .m-w1 {
// // min-width: 34em;
// min-width: 60em;
// }
// .main {
// // position: fixed;
// // z-index: 99;
// // background-color: #fff;
// // width: 97%;
// // right: 58px;
// // left: 0;
// // right: 400px;
// margin-right: var(--sidebar-collapsed-width);
// &.expanded {
// margin-right: var(--sidebar-width) !important;
// }
// .nav-tabs {
// .nav-item {
// &.show .nav-link {
// color: #22b0d2;
// }
// .nav-link {
// border-top-left-radius: 0.3em;
// border-top-right-radius: 0.3em;
// border-bottom-right-radius: 0;
// border-bottom-left-radius: 0;
// &.active {
// color: #22b0d2;
// }
// }
// }
// .float-label {
// position: absolute;
// top: -0.5em;
// right: 0;
// background-color: #fff;
// padding: 0 1em;
// font-size: 0.8rem;
// color: #6f6f6f;
// }
// .form-control {
// min-width: 11em;
// border-radius: 0.5em;
// }
// }
// }
// .button-text {
// border: none;
// background-color: initial;
// margin-top: 6px;
// position: relative;
// top: 4px;
// }
// .description {
// position: absolute;
// right: 0;
// margin-right: 1.5em;
// margin-top: 1em;
// // margin-right: 30px;
// }
// .nav-item-link:hover {
// // color: #00b6e3 !important ;
// color: var(--primary-color);
// }
// .nav-item-header {
// display: flex;
// // justify-content: space-around;
// div {
// cursor: pointer;
// text-align: center;
// .nav-item-link {
// text-decoration: none;
// }
// }
// }
// .nav-item {
// display: flex;
// justify-content: flex-end;
// height: 3em;
// a {
// span {
// display: none;
// }
// }
// }
// .main-option {
// display: flex;
// justify-content: flex-end;
// }
// .header__logo {
// width: 12em;
// margin: 15px;
// display: flex;
// justify-content: space-between;
// align-items: center;
// }
// .select-button {
// border: 0px !important;
// }
// .dropdown-item {
// text-align: right !important;
// }
// // .dropdown {
// // appearance: none;
// // }
// // .dropdown-toggle::after {
// // background-image: none;
// // }
// .Possibilities {
// // background-color: red;
// width: 97%;
// top: 3px;
// position: relative;
// margin: 0 auto;
// height: auto;
// padding: 5px;
// }
// .Possibilities-select {
// margin-left: 20px;
// margin-top: 5px;
// }
// .Possibilities-select-item {
// padding: 4px;
// border: 0;
// outline: 0 !important;
// }
// .state-button {
// color: red;
// }
// @media (max-width: 575.98px) {
// .desktop {
// display: none;
// }
// .button-advanced-search {
// right: 1.3em !important;
// top: 5.1em !important;
// }
// .smart_phones {
// display: flex;
// flex-direction: column;
// .button-text {
// margin-top: 0;
// }
// .button-filter {
// position: relative;
// .button-filter-active {
// color: var(--primary-color);
// }
// }
// .dropdown-content {
// position: absolute;
// top: 46px;
// left: -42px;
// z-index: 9999;
// background-color: #fff;
// width: 10em;
// height: auto;
// border: 1px solid var(--primary-color);
// border-radius: 15px;
// // display: block;
// /* Add other styling as needed */
// }
// }
// .row-nav {
// width: 360px;
// margin-right: 0;
// // margin-top: 16px;
// }
// .active {
// color: var(--primary-color);
// position: relative;
// // &::after {
// // content: "";
// // border-bottom: 2px solid var(--primary-color);
// // position: absolute;
// // top: 40px;
// // right: -3px;
// // width: 100%;
// // }
// }
// .m-w1 {
// // min-width: 21em;
// min-width: 50em;
// }
// // .main {
// // right: 8px;
// // }
// .img-img {
// display: none !important;
// }
// .dropdown-toggle {
// span {
// display: none;
// }
// }
// .header__logo {
// justify-content: flex-start;
// }
// .class-border {
// height: 12em !important;
// }
// .display-none {
// display: none !important;
// // display: inline;
// }
// }
// @media only screen and (min-width: 576px) and (max-width: 767.98px) {
// .desktop {
// display: none;
// }
// .button-advanced-search {
// right: 1.3em !important;
// top: 5.1em !important;
// }
// .smart_phones {
// display: flex;
// flex-direction: column;
// .button-text {
// margin-top: 0;
// }
// .button-filter {
// position: relative;
// .button-filter-active {
// color: var(--primary-color);
// }
// }
// .dropdown-content {
// position: absolute;
// top: 46px;
// left: -42px;
// z-index: 9999;
// background-color: #fff;
// width: 10em;
// height: auto;
// border: 1px solid var(--primary-color);
// border-radius: 15px;
// // display: block;
// /* Add other styling as needed */
// }
// }
// // .main {
// // right: 8px;
// // }
// .img-img {
// display: none !important;
// }
// .dropdown-toggle {
// span {
// display: none;
// }
// }
// .header__logo {
// justify-content: flex-start;
// }
// .class-border {
// height: 12em !important;
// }
// .display-none {
// display: none !important;
// }
// }
// @media only screen and (min-width: 768px) and (max-width: 991.98px) {
// .img-img {
// display: none !important;
// }
// .class-border {
// height: 99px !important;
// }
// .display-logo {
// display: none;
// }
// .dropdown-toggle {
// span {
// display: none;
// }
// }
// .nav-item-header-desktop {
// display: none;
// }
// .dropdown-content {
// position: absolute;
// top: 38px;
// left: -42px;
// z-index: 9999;
// background-color: #fff;
// width: 10em;
// height: auto;
// border: 1px solid var(--primary-color);
// border-radius: 15px;
// }
// .active {
// &::after {
// content: "";
// top: 32px;
// }
// }
// .button-advanced-search {
// right: 1em !important;
// top: 0.8em !important;
// }
// }
// @media only screen and (min-width: 992px) and (max-width: 1199.98px) {
// .display-logo {
// display: none;
// }
// .nav-item-header-tablet {
// display: none;
// }
// .description {
// margin-top: 2em;
// }
// .class-border {
// height: 8.3em !important;
// }
// .button-advanced-search {
// right: 1em !important;
// top: 0.8em !important;
// }
// }
// @media only screen and (min-width: 1200px) and (max-width: 1919.98px) {
// .nav-item-header-tablet {
// display: none;
// }
// .description {
// margin-right: -12.5em;
// margin-top: 1.6em;
// }
// .class-border {
// height: 7.8em !important;
// }
// .button-advanced-search {
// right: 1em !important;
// top: 0.6em !important;
// }
// }
// @media only screen and (min-width: 1920px) {
// .class-border {
// height: 7.2em !important;
// }
// .smart_phones {
// display: none;
// }
// .nav-item-header-tablet {
// display: none;
// }
// .description {
// margin-right: -12.5em;
// margin-top: 1.6em;
// }
// .button-advanced-search {
// // right: 16em !important;
// // top: 1.3em !important;
// right: 1em !important;
// top: 0.3em !important;
// }
// }
// .active {
// color: var(--primary-color);
// }
// .show-category-btn {
// }
// .button-advanced-search {
// margin-top: 0.2em;
// position: absolute;
// right: 2.5em;
// top: 1.5em;
// border-left: 1px #eee solid;
// border-radius: unset !important;
// z-index: 99;
// color: var(--primary-color);
// // svg {
// &:hover {
// font-weight: bold;
// transition-duration: 0.3s;
// }
// // }
// }

View File

@ -1,12 +1,24 @@
:root {
--ui-primary: #00a762;
--ui-color-four: #4be8ae;
--ui-container-wide: 1200px;
--ui-color-one: #444;
--ui-color-three: #626b84;
--ui-color-two: #1b2132;
--ui-container: 720px; /* library show page*/
--ui-container-two: 1232px; /* library show page*/
}
@import "tailwindcss";
@import "@nuxt/ui";
/* custom imports */
@import "../../../../../assets/common/scss/_IRANSansX.scss";
@import "../../../../../assets/common/scss/_takrim.scss";
@theme {
--font-sans: "IRANSansX", "Public Sans", sans-serif;
--container-lg: 720px;
}
@layer {

View File

@ -1,3 +0,0 @@
.comment-list .comments .comment-container.replayer .comment {
max-width: 20em;
}

View File

@ -1,130 +0,0 @@
.main-page__content {
// .pages {
// .pages-content {
.menu-bar__content {
position: fixed !important;
max-width: 24em;
min-width: 22em;
z-index: 3;
background-color: #fff;
right: 0;
// overflow: hidden;
transition: right 0.3s ease-out;
top: 0;
bottom: 4.5em;
&.mini {
right: -100%;
transition: right 0.3s ease-out;
}
.home-list__header {
.search-form {
.form-group {
.form-control {
// width: 98%;
}
.dropdown {
// width: 1.5rem;
// position: relative;
// left: 0.5rem;
// top: 0.25rem;
}
}
}
}
.home-list__content {
.scroll-needed {
height: calc(100dvh - 10em);
}
}
.hide-list-panel {
}
.groups-header {
display: flex;
justify-content: space-between;
align-items: center;
.right-icons {
.toggle-list {
display: none!important;
}
// .group-name {
// display: none;
// }
}
.left-icons {
position: relative;
display: flex;
align-items: center;
}
.dropdown {
&.profile-dropdown {
.nav-link {
&.dropdown-toggle {
span {
display: none;
}
}
}
}
}
.btn {
// display: none;
}
}
.create-forms {
right: 0;
z-index: 99;
max-width: 80%;
border-left: 1px solid #eee;
}
}
.position-relative {
.show-toggle-list-panel {
// position: absolute;
// right: 3rem;
// top: 0.25rem;
// display: block;
// button {
// left: 0px;
// }
}
.dropdown {
// position: absolute;
// top: 0px;
}
}
.hide-list-panel .toggle-mobile-nav {
// position: absolute;
// bottom: 0.25rem;
// right: 0.25rem;
}
}
#myTabContent {
#property {
// position: relative;
// top: 8rem;
}
}
// }
// }
// }
.navbar {
.profile-dropdown {
// bottom: 0.5rem;
}
}

View File

@ -1,40 +0,0 @@
#replays {
position: fixed !important;
left: -25em;
top: 0;
bottom: 4.5em;
transition: left 0.3s ease-out;
max-width: 80%;
z-index: 98;
&.show {
transition: left 0.3s ease-out;
left: 0;
}
.replay-list {
.comment-container {
.comment {
margin-right: 0;
&::after,
&::before {
display: none;
}
.comment-header {
display: flex;
align-items: center;
margin-bottom: 0.5em;
.commentor-avatar {
margin-left: 0.5em;
position: static;
}
}
.comment-actions {
visibility: visible;
}
}
}
}
}

View File

@ -1,78 +0,0 @@
.mobile-footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
/* height: 3.5em; */
/* -webkit-box-shadow: 0px 1px 6px 3px #eee; */
box-shadow: 0px 1px 6px 3px #eee;
display: flex;
flex-direction: column;
justify-content: center;
padding: 0.5em 1em;
background-color: #fafafa;
z-index: 98;
.footer-menu {
display: flex;
align-items: center;
justify-content: space-between;
justify-content: space-around;
list-style: none;
margin: 0;
padding: 0;
.footer-menu-item {
.footer-menu-item-btn {
width: 3.3em;
height: 3.3em;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 50%;
padding: 0;
color: #333;
position: relative;
* {
padding: 0;
}
.button-title {
font-size: 0.8rem;
// color:#6f6f6f;
}
&.active {
color: #00b6e3;
// fill:blue;
.icon {
// background-color: blue;
}
// border: 1px solid #c7c7c7;
// background-color: #fafafa;
// border-color: green;
// transform: translateY(-10px) scale(1.1);
&::before {
content: "";
display: block;
position: absolute;
top: -0.6em;
left: 0;
right: 0;
border-top: 2px solid #00b6e3;
}
}
&.disabled, &:disabled {
opacity: 0.4;
// filter: grayscale(0.6);
}
}
}
}
}

View File

@ -1,126 +0,0 @@
.main-page__content {
#comments-and-replays {
.chat-list-group-info {
.group-info-actions {
& > .btn:not(.issue-redirect-btn),
& > .multiselect,
& > .multiselect-container {
display: none;
}
}
.group-row .group-content .group-title-container .group-title {
max-width: 13em;
}
.group-row
.group-content
.group-description-container
.group-description {
max-width: 13em;
}
}
.comment-list {
.comments {
// height: 70vh;
// height: calc(100dvh - 70px - 63px - 3.7em);
// height: calc(100dvh - 8.5em);
// height: calc(100dvh - 10em);
.drop {
// height: calc(100dvh - 16.5em);
.stream {
// height: calc(100dvh - 12em);
// height: calc(100dvh - 16.5em);
height: calc(100dvh - 16.5em);
&.filter-is-active {
// height: calc(100dvh - 21em) !important;
// height: calc(100dvh - 24.5em) !important;
height: calc(100dvh - 21em);
& + .empty .wrapper {
bottom: 5em;
}
}
}
}
}
&.replays-is-open {
.comments {
// height: 70vh;
// height: calc(100dvh - 70px - 63px - 3.7em);
// height: calc(100dvh - 8.5em);
// height: calc(100dvh - 10em);
.drop {
// height: calc(100dvh - 16.5em);
.stream {
height: calc(100dvh - 20em);
&.filter-is-active {
// height: calc(100dvh - 21em) !important;
// height: calc(100dvh - 24.5em) !important;
height: calc(100dvh - 24em);
& + .empty .wrapper {
bottom: 8.5em;
}
}
}
}
}
}
.comment-form-container {
min-width: unset;
}
.comments {
.comment-container {
margin: 0;
&.replayer {
.comment {
margin-left: 0;
}
}
.comment {
margin-right: 0;
max-width: 20em;
&::after,
&::before {
display: none;
}
.comment-header {
display: flex;
align-items: center;
margin-bottom: 0.5em;
.commentor-avatar {
margin-left: 0.5em;
position: static;
}
}
.comment-actions {
visibility: visible;
}
}
}
.first-last-button {
display: none;
}
}
}
.menu-multiselect {
}
.auth-page .sign-up--tabs {
height: auto;
}
}
}

View File

@ -1,157 +0,0 @@
// 1600px
@media screen and (max-width: 100em) {
// @import "./1600/my_table_1600";
// @import "./1600/the_list_panel_1600";
// @import "./1600/sub_header_1600";
}
// 1399px
@media screen and (max-width: 87.499em) {
// @import "./1399/the_list_panel-1399";
// @import "./1399/_sub_header_1399";
}
// 991px
@media screen and (max-width: 61.998em) {
.main-page__content {
.search-items {
height: calc(100vh - 18em);
}
.filter-list-container {
padding-top: 0.5em;
position: fixed;
width: 23em;
z-index: 9;
// width: auto;
.main-filter {
display: none;
}
.mobile-mode {
display: flex;
justify-content: flex-start;
.btn {
border-radius: 50%;
// font-size: 0.7rem;
width: 2.5em;
height: 2.5em;
box-shadow: 0px 0px 7px 1px #eee;
display: flex;
justify-content: center;
align-items: center;
transform: translateX(1.5em);
background-color: #eee;
&:hover {
filter: brightness(0.8);
}
}
}
&.expanded {
top: 0;
bottom: 0;
background: #fff;
justify-content: center;
box-shadow: -1px 0px 7px 1px #eee;
.main-filter {
display: block;
}
}
}
.nav.nav-tabs {
li {
.nav-link {
font-size: 0.8rem;
}
}
li.desktop:nth-child(n + 4) {
display: none;
}
// .combo-list {
// margin-top: 1em;
// }
}
.summary-container {
padding-top: 0.5em;
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 9;
width: auto;
&.expanded {
background: #fff;
justify-content: center;
box-shadow: -1px 0px 7px 1px #eee;
}
}
.search-container {
.btn,
.form-control {
font-size: 0.9rem;
}
.logo {
max-width: 2.3em;
}
}
.advanced-search {
position: fixed;
}
}
// .nav-sidebar {
// display: block;
// &.sidebar-expanded-mobile {
// display: block;
// }
// }
// @import "./991/_sub_header_991";
// @import "./991/my_table_991";
}
// 767px
@media screen and (max-width: 47.938em) {
.main-page__content {
margin-right: 0 !important;
}
// @import "./767/group";
// @import "./767/the_list_panel_767";
// @import "./767/the_navbar_767";
// @import "./767/_sub_header_767";
// @import "./767/the-footer";
}
// 575px
@media screen and (max-width: 35.938em) {
// @import "./575/main_575";
// @import "./575/my_table_575";
// @import "./575/the_list_panel_575";
// @import "./575/the_navbar_575";
// @import "./575/sub_header_575";
.majles-search-table {
.table-responsive {
height: calc(-28em + 100vh);
}
}
}
// 399px
@media screen and (max-width: 24.938em) {
// @import "./399/my_table_399";
// @import "./399/sub_header_399";
// @import "./399/the-_navbar_399";
// @import "./399/the_list_panel_399";
}
//360px
@media screen and (max-width: 22.5em) {
// @import "./360/main_360";
// @import "./360/sub_header_360";
// @import "./360/the_list_panel_360";
// @import "./360/the_navbar_360";
}

View File

@ -1,7 +0,0 @@
@media only screen and (min-width: 576px) and (max-width: 767.98px){
.majles-search-table {
.table-responsive {
height: calc(-17em + 100vh);
}
}
}

View File

@ -1,78 +0,0 @@
.main-page__content {
.menu-bar__content {
// max-width: 50%;
// min-width: 50%;
.groups-header {
// display: flex;
// justify-content: space-between;
// align-items: center;
.dropdown {
&.profile-dropdown {
// display: none;
}
}
}
.group-filter-mobile {
// display: none;
}
.toggle-sidebar {
// display: none;
}
.toggle-menu-bar {
// display: none;
}
&.mini {
// max-width: 5em;
// min-width: 5em;
.right-icons {
& > .btn:not(.toggle-list), .group-name ,& > svg {
// display: none;
}
}
.groups-header {
.toggle-search {
// display: none;
}
.toggle-filter {
// display: none;
}
}
.group-item {
.group-row {
.group-picture-container {
.context-menu-dropdown {
// display: none !important;
}
.group-picture.mini-mode {
// display: inline !important;
// cursor: pointer;
}
.group-picture {
// display: none;
}
}
.group-content {
// display: none;
}
}
}
.home-list__content {
}
}
}
.position-relative {
.dropdown {
// top: 50px;
}
}
}

View File

@ -1,80 +0,0 @@
.main-page__content {
.menu-bar__content {
// max-width: 24em;
// min-width: 20em;
.groups-header {
// display: flex;
// justify-content: space-between;
// align-items: center;
.dropdown {
&.profile-dropdown {
// display: none;
}
}
}
.group-filter-mobile {
// display: none;
}
.toggle-sidebar {
// display: none;
}
.toggle-menu-bar {
// display: none;
}
&.mini {
// max-width: 5em;
// min-width: 5em;
.right-icons {
& > .btn:not(.toggle-list),
.group-name,
& > svg {
// display: none;
}
}
.groups-header {
.toggle-search {
// display: none;
}
.toggle-filter {
// display: none;
}
}
.group-item {
.group-row {
.group-picture-container {
.context-menu-dropdown {
// display: none !important;
}
.group-picture.mini-mode {
// display: inline !important;
// cursor: pointer;
}
.group-picture {
// display: none;
}
}
.group-content {
// display: none;
}
}
}
.home-list__content {
}
}
}
.position-relative {
.dropdown {
// top: 50px;
}
}
}

View File

@ -1,81 +0,0 @@
.main-page__content {
.menu-bar__content {
// max-width: 40%;
// min-width: 40%;
right:4.5em;
.groups-header {
// display: flex;
// justify-content: space-between;
// align-items: center;
.dropdown {
&.profile-dropdown {
// display: none;
}
}
}
.group-filter-mobile {
// display: none;
}
.toggle-sidebar {
// display: none;
}
.toggle-menu-bar {
// display: none;
}
&.mini {
// max-width: 5em;
// min-width: 5em;
.right-icons {
& > .btn:not(.toggle-list),
.group-name,
& > svg {
// display: none;
}
}
.groups-header {
.toggle-search {
// display: none;
}
.toggle-filter {
// display: none;
}
}
.group-item {
.group-row {
.group-picture-container {
.context-menu-dropdown {
// display: none !important;
}
.group-picture.mini-mode {
// display: inline !important;
// cursor: pointer;
}
.group-picture {
// display: none;
}
}
.group-content {
// display: none;
}
}
}
.home-list__content {
}
}
}
.position-relative {
.dropdown {
// top: 50px;
}
}
}

View File

@ -1,81 +0,0 @@
.main-page__content {
.menu-bar__content {
// -webkit-box-flex: 1;
// -ms-flex: 1 1 100%;
// max-width: 200px;
// width: auto;
// position: fixed!important;
.groups-header {
display: flex;
justify-content: space-between;
align-items: center;
.dropdown {
&.profile-dropdown {
display: none;
}
}
}
.group-filter-mobile {
display: none;
}
.toggle-sidebar {
display: none;
}
.toggle-menu-bar {
display: none;
}
&.mini {
max-width: 5em;
min-width: 5em;
.right-icons {
& > .btn:not(.toggle-list), .group-name ,& > svg {
display: none;
}
}
.groups-header {
.toggle-search {
display: none;
}
.toggle-filter {
display: none;
}
}
.group-item {
.group-row {
.group-picture-container {
.context-menu-dropdown {
display: none !important;
}
.group-picture.mini-mode {
display: inline !important;
cursor: pointer;
}
.group-picture {
display: none;
}
}
.group-content {
display: none;
}
}
}
.home-list__content {
}
}
}
.position-relative {
.dropdown {
// top: 50px;
}
}
}

View File

@ -1,3 +0,0 @@
.mobile-footer {
display: none;
}

View File

@ -1,63 +0,0 @@
// 200px
@media screen and (min-width: 200px) {
}
//400px
@media screen and (min-width: 24.938em) {
}
// 576px
@media screen and (min-width: 36em) {
.main-page__content {
.search-items {
height: calc(100vh - 17em);
}
}
}
// 768px
@media screen and (min-width: 48em) {
}
// 992px
@media screen and (min-width: 62em) {
.mobile-mode {
display: none;
}
.main-page__content {
.search-items {
height: calc(100vh - 12.5em);
}
}
.qanon-content,
.majles-qaSection-content,
.majles-qanon-content,
.majles-mashruh-content {
.search-items {
height: calc(100vh - 14.5em);
}
}
.main-filter {
.search-items {
height: calc(100vh - 16.8em);
}
}
.majles-search-table {
.table-responsive {
height: calc(-15em + 100vh);
}
}
}
// 1200px
// 1400px
// // 1600px
// @media screen and (min-width: 100.000em) {
// @import "./992/category_992";
// }
// //1800px
// @media screen and (min-width: 112.500em) {}
// //2000px
// @media screen and (min-width: 125.000em) {}

View File

@ -1,12 +0,0 @@
// the base pixel size is : "16px"
//
// max width media queries
//
@import "./max_width/max_width.scss";
//
// min width media queries
//
@import "./min_width/min-width.scss";
@import "./min_and_max/min-and-max.scss";

View File

@ -3,8 +3,12 @@ const props = defineProps({
showFilter: {
default: false,
},
showPrevSearch: {
default: false,
},
});
const emit = defineEmits(["response-ready"]);
const router = useRouter();
export type Sample = {
fromPerson: string;
@ -123,17 +127,23 @@ const loading = ref(false);
// }
// );
const clearSimilar = () => {
console.info("clearSimilar");
};
const onBlur = () => {
// console.info("onBlue");
};
const onChange = () => {
// console.info("onChange");
};
const onUpdateModel = (newVal) => {
// console.info("onUpdateModel", newVal);
const onUpdateModel = (newVal: string) => {
console.info("onUpdateModel", newVal);
};
const onSearch = () => {
console.info("onSearch");
router.push({
name: "hadithSearch",
});
};
const onKeyDown = () => {
// console.info("onKeyDown");
@ -152,49 +162,54 @@ const onSend = () => {
</script>
<template>
<div class="hadith-search-root">
<div class="prev-search-item flex items-center">
<span class="total">۴۷ مشابه </span>
<span class="text me-auto">
عَنِ الْحَسَنِ بْنِ عَلِيِّ بْنِ يُوسُفَ، عَنْ جَدِّهِ، قَالَ:
</span>
<UButton
icon="i-lucide:x"
color="neutral"
variant="ghost"
class="clear-similar-btn"
@click="clearSimilar"
/>
</div>
<div class="search-input">
<UInputMenu
class="w-full"
:items="[]"
v-model="searchTerm"
v-model:open="open"
v-model:search-term="searchTerm"
placeholder="هوشمند جستجو کنید..."
:ui="{
base: ['hadith-search-input'],
}"
:content="{
align: 'start',
side: 'bottom',
sideOffset: 4,
}"
:loading="loading"
highlight
highlightOnHover
@focus="open = true"
@blur="open = false"
@change="onChange"
@update:modelValue="onUpdateModel"
@update:searchTerm="onUpdateModel"
@keydown="onKeyDown"
@keyup="onKeyUp"
@keydown.enter="onSend"
>
</UInputMenu>
<div class="hadith-search-root-wrapper">
<div class="hadith-search-root">
<div v-if="showPrevSearch" class="prev-search-item flex items-center">
<span class="total">۴۷ مشابه </span>
<span class="text me-auto">
عَنِ الْحَسَنِ بْنِ عَلِيِّ بْنِ يُوسُفَ، عَنْ جَدِّهِ، قَالَ:
</span>
<UButton
icon="i-lucide:x"
color="neutral"
variant="ghost"
class="clear-similar-btn"
@click="clearSimilar"
/>
</div>
<div class="search-input">
<UInputMenu
class="w-full focus:placeholder-gray-800"
:items="[]"
v-model="searchTerm"
v-model:open="open"
v-model:search-term="searchTerm"
placeholder="هوشمند جستجو کنید..."
:ui="{
base: ['hadith-search-input'],
}"
:content="{
align: 'start',
side: 'bottom',
sideOffset: 4,
}"
:loading="loading"
highlight
highlightOnHover
@focus="open = true"
@blur="open = false"
@change="onChange"
@update:modelValue="onUpdateModel"
@update:searchTerm="onUpdateModel"
@keydown="onKeyDown"
@keyup="onKeyUp"
@keydown.enter="onSend"
>
</UInputMenu>
</div>
<UButton class="my-trailing-button">
<UIcon @click.prevent="onSearch" name="i-lucide-search" />
</UButton>
</div>
<div class="search-filter my-3 space-x-2" v-if="props.showFilter">
<UDropdownMenu
@ -219,188 +234,200 @@ const onSend = () => {
</div>
</template>
<style>
.hadith-search-root {
position: relative;
<style scoped>
.hadith-search-root-wrapper {
max-width: 656px;
width: 100%;
margin: 0 1em;
&::before {
content: "";
position: absolute;
left: 1em;
right: 1em;
top: 50%;
backdrop-filter: blur(60px);
background: linear-gradient(137.41deg, #ffffff -42.82%, #e5e0ff 87.9%);
filter: blur(60px);
width: 626px;
height: 68px;
z-index: 0;
}
.prev-search-item {
width: 328;
height: 49;
gap: 6px;
border-radius: 12px;
border-width: 0.5px;
padding-top: 8px;
padding-right: 12px;
padding-bottom: 8px;
padding-left: 12px;
background: #626b84;
border: 0.5px solid;
margin-bottom: 0.7em;
border-image-source: linear-gradient(
102.02deg,
#4be8ae 7.38%,
#00a762 91.78%
);
.total {
width: 53;
height: 24;
gap: 4px;
border-radius: 6px;
padding: 5px 7px;
background: #1b213266;
font-family: IRANSansX;
font-weight: 500;
font-size: 10px;
line-height: 15px;
letter-spacing: 0%;
text-align: right;
color: #ffffff;
}
.text {
font-family: Takrim;
font-weight: 400;
font-size: 16px;
line-height: 32px;
letter-spacing: 0%;
text-align: right;
color: #ffffff;
}
.clear-similar-btn {
width: 32px;
height: 32px;
gap: 4px;
border-radius: 60px;
padding-top: 11px;
padding-right: 6px;
padding-bottom: 11px;
padding-left: 6px;
background: #1b213266;
color: #fff;
}
}
.search-input {
.hadith-search-root {
position: relative;
}
.search-filter {
.filter-item {
/* width: 81px; */
height: 40px;
&::before {
content: "";
position: absolute;
left: 1em;
right: 1em;
top: 50%;
backdrop-filter: blur(60px);
background: linear-gradient(137.41deg, #ffffff -42.82%, #e5e0ff 87.9%);
filter: blur(60px);
width: 626px;
height: 68px;
z-index: 0;
}
.prev-search-item {
width: 328;
height: 49;
gap: 6px;
border-radius: 12px;
border-width: 0.3px;
border-width: 0.5px;
padding-top: 8px;
padding-right: 12px;
padding-bottom: 8px;
padding-left: 12px;
gap: 4px;
background-color: #fff;
border: 0.3px solid #e0e0e0;
box-shadow: 0px 1px 4px 0px #0000000d;
color: #8a92a8;
font-family: IRANSansX;
font-weight: 400;
font-size: 13px;
line-height: 20px;
letter-spacing: 0%;
text-align: right;
background: #626b84;
border: 0.5px solid;
margin-bottom: 0.7em;
&.active {
color: linear-gradient(102.02deg, #4be8ae 7.38%, #00a762 91.78%);
border-image-source: linear-gradient(
102.02deg,
#4be8ae 7.38%,
#00a762 91.78%
);
* {
color: #fff;
.total {
width: 53;
height: 24;
gap: 4px;
border-radius: 6px;
padding: 5px 7px;
background: #1b213266;
font-family: IRANSansX;
font-weight: 500;
font-size: 10px;
line-height: 15px;
letter-spacing: 0%;
text-align: right;
color: #ffffff;
}
.text {
font-family: Takrim;
font-weight: 400;
font-size: 16px;
line-height: 32px;
letter-spacing: 0%;
text-align: right;
color: #ffffff;
}
.clear-similar-btn {
width: 32px;
height: 32px;
gap: 4px;
border-radius: 60px;
padding-top: 11px;
padding-right: 6px;
padding-bottom: 11px;
padding-left: 6px;
background: #1b213266;
color: #fff;
}
}
.search-input {
position: relative;
}
.search-filter {
.filter-item {
/* width: 81px; */
height: 40px;
border-radius: 12px;
border-width: 0.3px;
padding-top: 8px;
padding-right: 12px;
padding-bottom: 8px;
padding-left: 12px;
gap: 4px;
background-color: #fff;
border: 0.3px solid #e0e0e0;
box-shadow: 0px 1px 4px 0px #0000000d;
color: #8a92a8;
font-family: IRANSansX;
font-weight: 400;
font-size: 13px;
line-height: 20px;
letter-spacing: 0%;
text-align: right;
&.active {
color: linear-gradient(102.02deg, #4be8ae 7.38%, #00a762 91.78%);
* {
color: #fff;
}
}
}
}
}
&.search-page {
&::before {
content: none;
}
.my-trailing-button {
width: 32px;
height: 32px;
}
.hadith-search-input {
height: 56px;
&.search-page {
&::before {
content: none;
}
.my-trailing-button {
width: 32px;
height: 32px;
}
.hadith-search-input {
height: 56px;
}
}
}
}
.my-trailing-button {
position: absolute;
z-index: 1;
width: 48px;
height: 48px;
justify-content: center;
align-items: center;
padding: 0;
border-radius: 50px;
background: linear-gradient(320.71deg, #b9fde0 6.56%, #e4f9f0 69.69%);
left: 12px;
top: 0;
bottom: 0;
margin: auto;
transition: all 0.2s ease-in-out;
&:hover {
transition: all 0.2s ease-in-out;
background: linear-gradient(320.71deg, #54ecaa 6.56%, #b6f0d9 69.69%);
}
& > span {
width: 18px;
height: 18px;
background-image: linear-gradient(102.02deg, #4be8ae 7.38%, #00a762 91.78%);
}
}
.hadith-search-input {
z-index: 0;
height: 72px;
justify-content: space-between;
padding-top: 12px;
padding-right: 12px;
padding-bottom: 12px;
padding-left: 12px;
border-radius: 12px;
border-width: 0.3px;
background-color: #fff;
border: 0.3px solid #e0e0e0;
box-shadow: 0px 1px 4px 0px #0000000d;
font-family: IRANSansX;
font-weight: 300;
font-size: 14px;
line-height: 21px;
letter-spacing: 0%;
text-align: right;
color: #a7acbe;
}
</style>
<style>
.hadith-search-root-wrapper {
.my-trailing-button {
position: absolute;
z-index: 1;
width: 48px;
height: 48px;
justify-content: center;
align-items: center;
padding: 0;
border-radius: 50px;
background: linear-gradient(320.71deg, #b9fde0 6.56%, #e4f9f0 69.69%);
left: 12px;
top: 0;
bottom: 0;
margin: auto;
transition: all 0.2s ease-in-out;
&:hover {
transition: all 0.2s ease-in-out;
background: linear-gradient(320.71deg, #54ecaa 6.56%, #b6f0d9 69.69%);
}
& > span {
width: 18px;
height: 18px;
background-image: linear-gradient(
102.02deg,
#4be8ae 7.38%,
#00a762 91.78%
);
}
}
.hadith-search-input {
z-index: 0;
height: 72px;
justify-content: space-between;
padding-top: 12px;
padding-right: 12px;
padding-bottom: 12px;
padding-left: 12px;
border-radius: 12px;
border-width: 0.3px;
background-color: #fff;
border: 0.3px solid #e0e0e0;
box-shadow: 0px 1px 4px 0px #0000000d;
font-family: IRANSansX;
font-weight: 300;
font-size: 14px;
line-height: 21px;
letter-spacing: 0%;
text-align: right;
color: #a7acbe;
}
}
</style>

View File

@ -0,0 +1,147 @@
<script setup>
const props = defineProps({
list: {
default() {
return [];
},
},
noDataText: {
default: "نتیجه‌ای یافت نشد!",
},
noDataIcon: {
default: "/img/no-data.png",
},
});
</script>
<template>
<div class="library-list-contianer">
<div class="page-header flex items-center">
<span class="title">کتابخانه</span>
<NuxtImg
fit="auto"
quality="80"
placeholder
src="/img/haditha-title.svg"
/>
</div>
<div class="library-list grid grid-cols-5 gap-x-28 gap-y-12">
<UCard
v-if="props.list.length"
v-for="(item, index) in props.list"
:key="index"
variant="solid"
:ui="{
root: 'ring ring-[white] divide-y divide-[var(--ui-border)] rounded-0 shadow-none bg-transparent library-list-item',
header: 'header',
body: 'sm:p-0 p-0 bg-transparent',
footer: 'footer',
}"
>
<!-- <template #header></template> -->
<ULink
:to="{
name:'hadithLibraryShow',
params:{
id:1,
slug:'اصول کافی-جلد 1'
}
}"
color="neutral"
variant="outline"
:ui="{
leadingIcon: 'text-(--ui-primary)',
}"
@click=""
>
<NuxtImg
fit="auto"
quality="80"
placeholder
src="/img/sample-bgi.svg"
/>
<p class="title">اصول کافی</p>
<p class="version">جلد 1</p>
</ULink>
<!-- <template #footer> </template> -->
</UCard>
<no-data
class="h-full w-full flex flex-col justify-center items-center"
v-else
>
<NuxtImg fit="auto" quality="80" placeholder :src="props.noDataIcon" />
<p class="no-data-text">{{ props.noDataText }}</p>
</no-data>
</div>
</div>
</template>
<style scoped>
.library-list-contianer {
margin-top: 10em;
max-width: 1200px;
width: 100%;
margin: 0 1em;
margin-right: auto;
margin-left: auto;
.page-header {
margin-bottom: 2em;
.title {
margin-left: 0.4em;
font-family: IRANSansX;
font-weight: 300;
font-size: 24px;
line-height: 36px;
letter-spacing: 0%;
text-align: center;
color: var(--ui-color-two);
}
}
.library-list {
/* padding: 1em 1.3em; */
height: calc(100dvh - 13.5em);
overflow-y: auto;
.library-list-item {
width: 140;
height: 200;
border-radius: 8px;
.title {
margin-top: 0.7em;
font-family: IRANSansX;
font-weight: 400;
font-size: 13px;
line-height: 19.5px;
letter-spacing: 0%;
text-align: right;
color: #444444;
}
.version {
font-family: IRANSansX;
font-weight: 400;
font-size: 10px;
line-height: 15px;
letter-spacing: 0%;
text-align: right;
color: #444444;
}
}
}
.no-data-text {
font-family: IRANSansX;
font-weight: 300;
font-size: 16px;
line-height: 24px;
letter-spacing: 0%;
text-align: center;
}
}
</style>

View File

@ -1,900 +0,0 @@
<template>
<div class="my-content">
<template v-if="viewMode == 'list'">
<div class="row">
<div class="col-12 main-content firefox-scrollbar">
<template v-if="items.length">
<div
class="mb-3 border-bottom main-content-item p-3"
v-for="(itemData, i) in items"
:key="i"
>
<template v-if="itemData.inner_hits">
<div
class="row"
v-for="(collapseItem, indexCollapse) in schemaItems
.collapse_items?.items || []"
:key="indexCollapse"
>
<template v-if="collapseItem.array_key">
<div
class="col-12"
v-for="(subItemData, s) in getArrayData(
itemData,
collapseItem
)"
>
<lineContent
:lineSchema="collapseItem"
:itemData="subItemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</div>
</template>
<template v-else>
<lineContent
:lineSchema="collapseItem"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</template>
</div>
</template>
<template v-else>
<div
v-if="schemaItems && schemaItems.items"
class="row"
v-for="(lineSchema, index) in schemaItems?.items || []"
:key="index"
>
<lineContent
:lineSchema="lineSchema"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
@openPrevent="openPrevent"
>
</lineContent>
</div>
</template>
<div
class="search-item__actions"
v-if="schemaItems.actions?.length"
>
<span class="tavasi tavasi-more-vert"></span>
<template v-for="(schema, indexIcon) in schemaItems.actions">
<button
:key="'action' + indexIcon"
v-if="schema.key != 'tbookmark' || isRealUser"
:title="schema.title"
class="btn"
:type="schema.type"
>
<svg
v-if="schema.key == 'tbookmark'"
@click.pevent="AddToFavorites(itemData, schema, i)"
class=""
:class="
itemData._source[schema.key] == 1
? 'icon icon-' + schema.toggle_icons.icon1
: 'icon icon-' + schema.toggle_icons.icon2
"
>
<use
:xlink:href="
itemData._source[schema.key] == 1
? '#icon-' + schema.toggle_icons.icon1
: '#icon-' + schema.toggle_icons.icon2
"
></use>
</svg>
<svg
@click="handlerActionsList(itemData, schema.key, schema)"
v-else
:class="'icon icon-' + schema.icon"
>
<use :xlink:href="'#icon-' + schema.icon"></use>
</svg>
</button>
</template>
</div>
</div>
</template>
<template v-else>
<table-no-data> </table-no-data>
</template>
</div>
</div>
<div class="">
<jahat-pagination
class="border-0 w-100"
v-if="page.total"
:paginationInfo="page"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@sort-changed="sortChanged"
>
</jahat-pagination>
</div>
</template>
<template v-if="viewMode == 'table'">
<div class="row">
<div class="col-12 px-0">
<my-table
:key="reRender"
:height="'calc(-16em + 100vh)'"
:items="items"
:tableColumns="tableColumns"
:tableActions="tableActions"
:paginationInfo="page"
:sortingInfo="sorting"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@show-details="showDetailsHandler"
@copy-link="copyLinkHandler"
@on-linked-title-click="onOnLinkedTitleClick"
@show-text="showTextPage"
@actions="handlerActions"
:showHeaderSortButton="false"
class="my-table px-0 my-content-table"
>
</my-table>
</div>
</div>
</template>
<template v-if="viewMode == 'three-column-card'">
<div class="row">
<div class="col-12 main-content firefox-scrollbar">
<div class="row" v-if="items.length">
<div
class="mb-3 main-content-item p-3 col-4"
v-for="(itemData, i) in items"
:key="i"
>
<div class="d-flex">
<img
class="img-fluid mx-auto w-50"
src="assets/common/img/default.svg"
alt=""
/>
</div>
<template v-if="itemData.inner_hits">
<div
class="row"
v-for="(collapseItem, indexCollapse) in schemaItems
.collapse_items?.items || []"
:key="indexCollapse"
>
<template v-if="collapseItem.array_key">
<div
class="col-3"
v-for="(subItemData, s) in getArrayData(
itemData,
collapseItem
)"
>
<lineContent
:lineSchema="collapseItem"
:itemData="subItemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</div>
</template>
<template v-else>
<lineContent
:lineSchema="collapseItem"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</template>
</div>
</template>
<template v-else>
<div
v-if="schemaItems && schemaItems.items"
class="row"
v-for="(lineSchema, index) in schemaItems?.items || []"
:key="index"
>
<lineContent
:lineSchema="lineSchema"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
@openPrevent="openPrevent"
>
</lineContent>
</div>
</template>
<div class="search-item__actions" v-if="schemaItems.actions">
<span class="tavasi tavasi-more-vert"></span>
<button
:key="'action' + indexIcon"
v-for="(schema, indexIcon) in schemaItems.actions"
v-if="schema.key != 'tbookmark' || isRealUser"
:title="schema.title"
class="btn"
:type="schema.type"
>
<svg
v-if="schema.key == 'tbookmark'"
@click.pevent="AddToFavorites(itemData, schema, i)"
class=""
:class="
itemData._source[schema.key] == 1
? 'icon icon-' + schema.toggle_icons.icon1
: 'icon icon-' + schema.toggle_icons.icon2
"
>
<use
:xlink:href="
itemData._source[schema.key] == 1
? '#icon-' + schema.toggle_icons.icon1
: '#icon-' + schema.toggle_icons.icon2
"
></use>
</svg>
<svg
@click="handlerActionsList(itemData, schema.key, schema)"
v-else
:class="'icon icon-' + schema.icon"
>
<use :xlink:href="'#icon-' + schema.icon"></use>
</svg>
</button>
</div>
</div>
</div>
<template v-else>
<table-no-data> </table-no-data>
</template>
</div>
</div>
<div class="">
<jahat-pagination
class="border-0 w-100"
v-if="page.total"
:paginationInfo="page"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@sort-changed="sortChanged"
>
</jahat-pagination>
</div>
</template>
<template v-if="viewMode == 'two-column-card'">
<div class="row">
<div class="col-6 main-content firefox-scrollbar">
<template v-if="items.length">
<div
class="mb-3 border-bottom main-content-item p-3"
v-for="(itemData, i) in items"
:key="i"
>
<template v-if="itemData.inner_hits">
<div
class="row"
v-for="(collapseItem, indexCollapse) in schemaItems
.collapse_items?.items || []"
:key="indexCollapse"
>
<template v-if="collapseItem.array_key">
<div
class="col-12"
v-for="(subItemData, s) in getArrayData(
itemData,
collapseItem
)"
>
<lineContent
:lineSchema="collapseItem"
:itemData="subItemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</div>
</template>
<template v-else>
<lineContent
:lineSchema="collapseItem"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</template>
</div>
</template>
<template v-else>
<div
v-if="schemaItems && schemaItems.items"
class="row"
v-for="(lineSchema, index) in schemaItems?.items || []"
:key="index"
>
<lineContent
:lineSchema="lineSchema"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
@openPrevent="openPrevent"
>
</lineContent>
</div>
</template>
<div class="search-item__actions" v-if="schemaItems.actions">
<span class="tavasi tavasi-more-vert"></span>
<button
:key="'action' + indexIcon"
v-for="(schema, indexIcon) in schemaItems.actions"
v-if="schema.key != 'tbookmark' || isRealUser"
:title="schema.title"
class="btn"
:type="schema.type"
>
<svg
v-if="schema.key == 'tbookmark'"
@click.pevent="AddToFavorites(itemData, schema, i)"
class=""
:class="
itemData._source[schema.key] == 1
? 'icon icon-' + schema.toggle_icons.icon1
: 'icon icon-' + schema.toggle_icons.icon2
"
>
<use
:xlink:href="
itemData._source[schema.key] == 1
? '#icon-' + schema.toggle_icons.icon1
: '#icon-' + schema.toggle_icons.icon2
"
></use>
</svg>
<svg
@click="handlerActionsList(itemData, schema.key, schema)"
v-else
:class="'icon icon-' + schema.icon"
>
<use :xlink:href="'#icon-' + schema.icon"></use>
</svg>
</button>
</div>
</div>
</template>
<template v-else>
<table-no-data> </table-no-data>
</template>
</div>
</div>
<div class="">
<jahat-pagination
class="border-0 w-100"
v-if="page.total"
:paginationInfo="page"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@sort-changed="sortChanged"
>
</jahat-pagination>
</div>
</template>
</div>
</template>
<script>
// import HttpService from "@services/httpService";
// import tableActions from "@search/json/listTableContextMenu";
import favoriteApi from "~/apis/favoriteApi";
import researchApi from "~/apis/researchApi";
import { mapState, mapActions } from "pinia";
import { useSearchStore } from "~/stores/searchStore";
import { useEntityStore } from "@search/stores/entityStore";
import { useAuthStore } from "~/stores/authStore";
export default {
props: {
schemaItems: {
default() {
return [];
},
},
viewMode: {
default: "table",
},
items: {
default() {
return [];
},
},
pagination: {
default() {
return {};
},
},
tableColumns: {
default() {
return [];
},
},
tableActions: {
default() {
return [];
},
},
textSearch: {
default: "",
},
},
beforeMount() {
// this.httpService = new HttpService(process.env.VUE_APP_REPO_BASE_URL);
if (this.items) {
this.items.forEach((item) => {
if (
!item._source.qanon_etebar ||
item._source.qanon_etebar.trim() == ""
) {
item._source.qanon_etebar = "معتبر";
}
});
}
},
mounted() {
this.page = this.pagination;
this.setTableColumns();
},
watch: {
pagination(newVal) {
this.page = newVal;
},
},
data() {
return {
page: "",
curTableColumns: this.tableColumns,
// tableActions: tableActions,
reRender: 1,
sorting: {
sortby: "created",
sortorder: undefined, // asc | desc | none
},
};
},
computed: {
...mapState(useSearchStore, ["searchActiveTabGetter"]),
...mapState(useAuthStore, ["isRealUser"]),
},
methods: {
...mapActions(useEntityStore, ["SET_ITEM_ENTITY", "SET_LIST_ENTITY"]),
openPrevent(item, isReadonly = true) {
this.$emit("ModalHandler", { item, isReadonly });
},
handlerActions(event) {
let key = event.rowAction.key;
if (key == "summary") this.$emit("changeCurrent", event.item);
else if (key == "copy") {
this.copyToClipboard(
"",
this.urlResolver(
event.item._id,
event.rowAction.link_route,
event.item
)
);
} else if (key == "tbookmark") {
this.AddToFavorites(event.item, event.rowAction, event.index);
}
},
setTableColumns() {
if (this.tableColumns.length) this.curTableColumns = this.tableColumns;
else if (this.domainActiveGetter?.table_columns)
this.curTableColumns = this.domainActiveGetter?.table_columns;
},
async AddToFavorites(item, icon, index) {
let sourceData = item;
icon.api_items.title.split(".").forEach((key) => {
if (sourceData[key]) sourceData = sourceData[key];
});
if (item._source.tbookmark == 0) {
let url = favoriteApi.favorite.add;
url = url.replace("{{data_type}}", icon.api_items.data_type);
url = url.replace("{{ref_key}}", icon.api_items.ref_key);
const formData = {
ref_id: item[icon.api_items.id],
title: sourceData,
};
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: import.meta.env.VITE_REPO_BASE_URL,
body: formData,
method: "post",
});
this.updateListAnswer(index, "tbookmark", 1);
} catch (err) {}
// this.httpService.postRequest(url, formData).then((res) => {
// this.updateListAnswer(index, "tbookmark", 1);
// });
} else {
// let url = favoriteApi.favorite.delete;
let url = favoriteApi.favorite.deleteByRefid;
url = url.replace("{{data_type}}", icon.api_items.data_type);
// url = url.replace("{{id}}", item[icon.api_items.id]);
url = url.replace("{{index_key}}", this.searchActiveTabGetter?.key);
url = url.replace("{{ref_id}}", item[icon.api_items.id]);
[];
const formData = {
ref_id: item[icon.api_items.id],
title: sourceData,
};
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: import.meta.env.VITE_REPO_BASE_URL,
body: formData,
method: "post",
});
this.updateListAnswer(index, "tbookmark", 0);
} catch (err) {}
// this.httpService.postRequest(url, formData).then((res) => {
// this.updateListAnswer(index, "tbookmark", 0);
// });
}
},
updateListAnswer(index, key, value) {
if (index in this.items) {
if (key in this.items[index]["_source"])
this.items[index]["_source"][key] = value;
this.reRender++;
}
},
handlerActionsList(item, key, icon) {
if (key == "summary") this.$emit("changeCurrent", item);
else if (key == "copy") {
let keyid = icon.link_route.id;
let id = "";
id = this.findvalueForKey(item, keyid);
this.copyToClipboard("", this.urlResolver(id, icon.link_route, item));
} else if (key == "SubjectForm") {
this.$emit("SubjectForm", item);
} else if (key == "edit") {
this.openPrevent({ item }, false);
} else if (key == "delete") {
this.deleteResearch(item, false);
}
},
urlResolver(_id, route, item) {
let keyMain = "";
let query_key = "";
let query_value = "";
let keys = "";
let key = "";
let query = { searchtext: this.textSearch ?? undefined };
if (route?.query) {
let querys = route.query;
if (typeof querys === "string") {
keys = route?.query.split("=");
if (keys.length >= 2) {
query_key = keys[0];
query_value = keys[1];
}
if (query_key && query_value) {
query[query_key] = query_value; // کلید پویا و مقدار از قسمت بالایی
}
} else {
let newObject = {};
for (const [key, value] of Object.entries(querys)) {
if (value in item) {
newObject[key] = item[value];
} else {
newObject[key] = item?._source[value];
}
}
Object.assign(query, newObject);
}
}
if (route?.key_item || route.key) {
if (route?.key_item) key = this.getSourceData(item, route.key_item);
else key = route.key;
}
const routeData = this.$router.resolve({
path: "/search/show",
params: {
id: _id,
key: key,
},
query: query,
});
return routeData.href;
},
getSourceData(itemData, key) {
let sourceData = itemData;
key.split(".").forEach((key) => {
if (sourceData[key]) sourceData = sourceData[key];
});
return sourceData;
},
getArrayData(itemData, collapseItem) {
if (!collapseItem.array_key) return [itemData];
let sourceData = this.getSourceData(itemData, collapseItem.array_key);
if (!Array.isArray(sourceData)) return [itemData];
return sourceData;
},
showDetailsHandler(event) {
this.$emit("changeCurrent", this.items[event.index]);
},
copyLinkHandler(event) {
let id = this.items[event]._id;
this.copyToClipboard("", this.urlResolver(id));
},
findvalueForKey(item, keyName) {
let value = "";
if (keyName in item) {
value = item[keyName];
} else {
value = item?._source[keyName];
}
return value;
},
onOnLinkedTitleClick({ rowItem, tableColumn, index }) {
let valueId = this.findvalueForKey(rowItem, tableColumn.link_route.id);
let route = tableColumn.link_route;
// let href = this.urlResolver(valueId, tableColumn.link_route);
let keyMain = "";
let query_key = "";
let query_value = "";
let keys = "";
let key = "";
let query = { searchtext: this.textSearch ?? undefined };
if (route?.query) {
let querys = route.query;
if (typeof querys === "string") {
keys = route?.query.split("=");
if (keys.length >= 2) {
query_key = keys[0];
query_value = keys[1];
}
if (query_key && query_value) {
query[query_key] = query_value; // کلید پویا و مقدار از قسمت بالایی
}
} else {
let newObject = {};
for (const [key, value] of Object.entries(querys)) {
if (value in item) {
newObject[key] = item[value];
} else {
newObject[key] = item?._source[value];
}
}
Object.assign(query, newObject);
}
}
if (route?.key_item || route.key) {
if (route?.key_item) key = this.getSourceData(item, route.key_item);
else key = route.key;
}
this.$router.push({
path: `/search/${key}/${valueId}`,
params: {
id: valueId,
key: key,
name:tableColumn?.link_route?.name
},
query: query?.length ? query : undefined,
});
localStorage.setItem("myList", JSON.stringify(this.items));
localStorage.setItem("myItem", JSON.stringify(rowItem));
this.SET_ITEM_ENTITY(rowItem);
this.SET_LIST_ENTITY(this.items);
// window.open(href, "_blank");
},
showTextPage(event) {},
async deleteResearch(item) {
this.mySwalConfirm({
title: "هشدار!!!",
html: `از حذف <b>${item._source.text_subject}</b> اطمینان دارید؟ `,
icon: "warning",
}).then(async (result) => {
if (result.isConfirmed) {
let url = researchApi.research.deleteItem;
url = url.replace("{{index_key}}", item._source.ref_key);
url = url.replace("{{id}}", item._id);
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: import.meta.env.VITE_REPO_BASE_URL,
method: "post",
});
this.mySwalToast({
html: res.message,
});
setTimeout(() => {
this.$emit("updateForDeleteResearch");
}, 500);
} catch (err) {}
// this.httpService.postRequest(url).then((res) => {
// });
}
});
},
/**
* تغییر محدودیت صفحهبندی و ارسال آن با استفاده از رویداد
* @param {Object} paging - تنظیمات صفحهبندی
*/
pageLimitChanged(paging) {
this.resetPagination();
this.page.limit = paging.limit;
this.$emit("changePage", this.page);
},
/**
* تغییر صفحه فعلی و ارسال آن با استفاده از رویداد
* @param {Object} paging - تنظیمات صفحهبندی
*/
pageChanged(paging) {
let page = paging.pageNumber;
page -= 1;
this.page.offset = page * paging.limit;
this.page.limit = paging.limit;
this.page.page = paging.pageNumber;
this.$emit("changePage", this.page);
},
/**
* تغییر مرتبسازی و ارسال آن با استفاده از رویداد
* @param {Object} sorting - تنظیمات مرتبسازی
*/
sortChanged(sorting) {
this.page.page = this.page.offset = 0;
this.sorting = sorting;
this.$emit("changePage", this.sorting);
},
/**
* بازنشانی تنظیمات صفحهبندی به حالت اولیه
*/
resetPagination() {
this.page = {
pages: 0,
total: 0,
page: 1,
offset: 0,
limit: 10,
};
},
},
components: {
lineContent: defineAsyncComponent(() =>
import("@search/components/search/view/lineContent.vue")
),
},
};
</script>
<style lang="scss" scoped>
.main-content-item {
position: relative;
overflow: hidden;
&:hover,
&.active {
background-color: var(--list-background-color);
.search-item__actions {
// width: 6.5em;
width: auto;
transition: width 0.5s;
background: #fff;
border-radius: 0 0.5em 0.5em 0;
.tavasi-more-vert {
transition: all 0.2s;
display: none;
}
}
}
.search-item__actions {
.btn {
font-size: 0.8rem;
}
}
}
.search-item__actions {
position: absolute;
left: 0;
width: 1.6em;
top: 1em;
// overflow: hidden;
transition: all 0.5s;
display: flex;
align-items: center;
.btn {
display: flex;
align-items: center;
justify-content: center;
padding: 0.175rem 0.35rem;
&:hover {
filter: brightness(0.7);
}
.icon-copy2 {
font-size: 0.8rem;
}
&.favorites {
color: calc(--primary-color);
.icon-bookmark-1,
.icon-bookmark-2 {
height: 1.3em;
}
}
}
}
.main-content {
height: calc(100dvh - 15em);
overflow: auto;
}
@media (max-width: 575.98px) {
.main-content {
height: calc(100dvh - 17em);
}
}
@media only screen and (min-width: 576px) and (max-width: 767.98px) {
}
@media only screen and (min-width: 768px) and (max-width: 900.98px) {
}
@media only screen and (min-width: 901px) and (max-width: 1049.98px) {
}
@media (min-width: 1050px) {
}
</style>

View File

@ -1,900 +0,0 @@
<template>
<div class="my-content">
<template v-if="viewMode == 'list'">
<div class="row">
<div class="col-12 main-content firefox-scrollbar">
<template v-if="items.length">
<div
class="mb-3 border-bottom main-content-item p-3"
v-for="(itemData, i) in items"
:key="i"
>
<template v-if="itemData.inner_hits">
<div
class="row"
v-for="(collapseItem, indexCollapse) in schemaItems
.collapse_items?.items || []"
:key="indexCollapse"
>
<template v-if="collapseItem.array_key">
<div
class="col-12"
v-for="(subItemData, s) in getArrayData(
itemData,
collapseItem
)"
>
<lineContent
:lineSchema="collapseItem"
:itemData="subItemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</div>
</template>
<template v-else>
<lineContent
:lineSchema="collapseItem"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</template>
</div>
</template>
<template v-else>
<div
v-if="schemaItems && schemaItems.items"
class="row"
v-for="(lineSchema, index) in schemaItems?.items || []"
:key="index"
>
<lineContent
:lineSchema="lineSchema"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
@openPrevent="openPrevent"
>
</lineContent>
</div>
</template>
<div
class="search-item__actions"
v-if="schemaItems.actions?.length"
>
<span class="tavasi tavasi-more-vert"></span>
<template v-for="(schema, indexIcon) in schemaItems.actions">
<button
:key="'action' + indexIcon"
v-if="schema.key != 'tbookmark' || isRealUser"
:title="schema.title"
class="btn"
:type="schema.type"
>
<svg
v-if="schema.key == 'tbookmark'"
@click.pevent="AddToFavorites(itemData, schema, i)"
class=""
:class="
itemData._source[schema.key] == 1
? 'icon icon-' + schema.toggle_icons.icon1
: 'icon icon-' + schema.toggle_icons.icon2
"
>
<use
:xlink:href="
itemData._source[schema.key] == 1
? '#icon-' + schema.toggle_icons.icon1
: '#icon-' + schema.toggle_icons.icon2
"
></use>
</svg>
<svg
@click="handlerActionsList(itemData, schema.key, schema)"
v-else
:class="'icon icon-' + schema.icon"
>
<use :xlink:href="'#icon-' + schema.icon"></use>
</svg>
</button>
</template>
</div>
</div>
</template>
<template v-else>
<table-no-data> </table-no-data>
</template>
</div>
</div>
<div class="">
<jahat-pagination
class="border-0 w-100"
v-if="page.total"
:paginationInfo="page"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@sort-changed="sortChanged"
>
</jahat-pagination>
</div>
</template>
<template v-if="viewMode == 'table'">
<div class="row">
<div class="col-12 px-0">
<my-table
:key="reRender"
:height="'calc(-16em + 100vh)'"
:items="items"
:tableColumns="tableColumns"
:tableActions="tableActions"
:paginationInfo="page"
:sortingInfo="sorting"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@show-details="showDetailsHandler"
@copy-link="copyLinkHandler"
@on-linked-title-click="onOnLinkedTitleClick"
@show-text="showTextPage"
@actions="handlerActions"
:showHeaderSortButton="false"
class="my-table px-0 my-content-table"
>
</my-table>
</div>
</div>
</template>
<template v-if="viewMode == 'three-column-card'">
<div class="row">
<div class="col-12 main-content firefox-scrollbar">
<div class="row" v-if="items.length">
<div
class="mb-3 main-content-item p-3 col-4"
v-for="(itemData, i) in items"
:key="i"
>
<div class="d-flex">
<img
class="img-fluid mx-auto w-50"
src="assets/common/img/default.svg"
alt=""
/>
</div>
<template v-if="itemData.inner_hits">
<div
class="row"
v-for="(collapseItem, indexCollapse) in schemaItems
.collapse_items?.items || []"
:key="indexCollapse"
>
<template v-if="collapseItem.array_key">
<div
class="col-3"
v-for="(subItemData, s) in getArrayData(
itemData,
collapseItem
)"
>
<lineContent
:lineSchema="collapseItem"
:itemData="subItemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</div>
</template>
<template v-else>
<lineContent
:lineSchema="collapseItem"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</template>
</div>
</template>
<template v-else>
<div
v-if="schemaItems && schemaItems.items"
class="row"
v-for="(lineSchema, index) in schemaItems?.items || []"
:key="index"
>
<lineContent
:lineSchema="lineSchema"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
@openPrevent="openPrevent"
>
</lineContent>
</div>
</template>
<div class="search-item__actions" v-if="schemaItems.actions">
<span class="tavasi tavasi-more-vert"></span>
<button
:key="'action' + indexIcon"
v-for="(schema, indexIcon) in schemaItems.actions"
v-if="schema.key != 'tbookmark' || isRealUser"
:title="schema.title"
class="btn"
:type="schema.type"
>
<svg
v-if="schema.key == 'tbookmark'"
@click.pevent="AddToFavorites(itemData, schema, i)"
class=""
:class="
itemData._source[schema.key] == 1
? 'icon icon-' + schema.toggle_icons.icon1
: 'icon icon-' + schema.toggle_icons.icon2
"
>
<use
:xlink:href="
itemData._source[schema.key] == 1
? '#icon-' + schema.toggle_icons.icon1
: '#icon-' + schema.toggle_icons.icon2
"
></use>
</svg>
<svg
@click="handlerActionsList(itemData, schema.key, schema)"
v-else
:class="'icon icon-' + schema.icon"
>
<use :xlink:href="'#icon-' + schema.icon"></use>
</svg>
</button>
</div>
</div>
</div>
<template v-else>
<table-no-data> </table-no-data>
</template>
</div>
</div>
<div class="">
<jahat-pagination
class="border-0 w-100"
v-if="page.total"
:paginationInfo="page"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@sort-changed="sortChanged"
>
</jahat-pagination>
</div>
</template>
<template v-if="viewMode == 'two-column-card'">
<div class="row">
<div class="col-6 main-content firefox-scrollbar">
<template v-if="items.length">
<div
class="mb-3 border-bottom main-content-item p-3"
v-for="(itemData, i) in items"
:key="i"
>
<template v-if="itemData.inner_hits">
<div
class="row"
v-for="(collapseItem, indexCollapse) in schemaItems
.collapse_items?.items || []"
:key="indexCollapse"
>
<template v-if="collapseItem.array_key">
<div
class="col-12"
v-for="(subItemData, s) in getArrayData(
itemData,
collapseItem
)"
>
<lineContent
:lineSchema="collapseItem"
:itemData="subItemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</div>
</template>
<template v-else>
<lineContent
:lineSchema="collapseItem"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</template>
</div>
</template>
<template v-else>
<div
v-if="schemaItems && schemaItems.items"
class="row"
v-for="(lineSchema, index) in schemaItems?.items || []"
:key="index"
>
<lineContent
:lineSchema="lineSchema"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
@openPrevent="openPrevent"
>
</lineContent>
</div>
</template>
<div class="search-item__actions" v-if="schemaItems.actions">
<span class="tavasi tavasi-more-vert"></span>
<button
:key="'action' + indexIcon"
v-for="(schema, indexIcon) in schemaItems.actions"
v-if="schema.key != 'tbookmark' || isRealUser"
:title="schema.title"
class="btn"
:type="schema.type"
>
<svg
v-if="schema.key == 'tbookmark'"
@click.pevent="AddToFavorites(itemData, schema, i)"
class=""
:class="
itemData._source[schema.key] == 1
? 'icon icon-' + schema.toggle_icons.icon1
: 'icon icon-' + schema.toggle_icons.icon2
"
>
<use
:xlink:href="
itemData._source[schema.key] == 1
? '#icon-' + schema.toggle_icons.icon1
: '#icon-' + schema.toggle_icons.icon2
"
></use>
</svg>
<svg
@click="handlerActionsList(itemData, schema.key, schema)"
v-else
:class="'icon icon-' + schema.icon"
>
<use :xlink:href="'#icon-' + schema.icon"></use>
</svg>
</button>
</div>
</div>
</template>
<template v-else>
<table-no-data> </table-no-data>
</template>
</div>
</div>
<div class="">
<jahat-pagination
class="border-0 w-100"
v-if="page.total"
:paginationInfo="page"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@sort-changed="sortChanged"
>
</jahat-pagination>
</div>
</template>
</div>
</template>
<script>
// import HttpService from "@services/httpService";
// import tableActions from "@search/json/listTableContextMenu";
import favoriteApi from "~/apis/favoriteApi";
import researchApi from "~/apis/researchApi";
import { mapState, mapActions } from "pinia";
import { useSearchStore } from "~/stores/searchStore";
import { useEntityStore } from "@search/stores/entityStore";
import { useAuthStore } from "~/stores/authStore";
export default {
props: {
schemaItems: {
default() {
return [];
},
},
viewMode: {
default: "table",
},
items: {
default() {
return [];
},
},
pagination: {
default() {
return {};
},
},
tableColumns: {
default() {
return [];
},
},
tableActions: {
default() {
return [];
},
},
textSearch: {
default: "",
},
},
beforeMount() {
// this.httpService = new HttpService(process.env.VUE_APP_REPO_BASE_URL);
if (this.items) {
this.items.forEach((item) => {
if (
!item._source.qanon_etebar ||
item._source.qanon_etebar.trim() == ""
) {
item._source.qanon_etebar = "معتبر";
}
});
}
},
mounted() {
this.page = this.pagination;
this.setTableColumns();
},
watch: {
pagination(newVal) {
this.page = newVal;
},
},
data() {
return {
page: "",
curTableColumns: this.tableColumns,
// tableActions: tableActions,
reRender: 1,
sorting: {
sortby: "created",
sortorder: undefined, // asc | desc | none
},
};
},
computed: {
...mapState(useSearchStore, ["searchActiveTabGetter"]),
...mapState(useAuthStore, ["isRealUser"]),
},
methods: {
...mapActions(useEntityStore, ["SET_ITEM_ENTITY", "SET_LIST_ENTITY"]),
openPrevent(item, isReadonly = true) {
this.$emit("ModalHandler", { item, isReadonly });
},
handlerActions(event) {
let key = event.rowAction.key;
if (key == "summary") this.$emit("changeCurrent", event.item);
else if (key == "copy") {
this.copyToClipboard(
"",
this.urlResolver(
event.item._id,
event.rowAction.link_route,
event.item
)
);
} else if (key == "tbookmark") {
this.AddToFavorites(event.item, event.rowAction, event.index);
}
},
setTableColumns() {
if (this.tableColumns.length) this.curTableColumns = this.tableColumns;
else if (this.domainActiveGetter?.table_columns)
this.curTableColumns = this.domainActiveGetter?.table_columns;
},
async AddToFavorites(item, icon, index) {
let sourceData = item;
icon.api_items.title.split(".").forEach((key) => {
if (sourceData[key]) sourceData = sourceData[key];
});
if (item._source.tbookmark == 0) {
let url = favoriteApi.favorite.add;
url = url.replace("{{data_type}}", icon.api_items.data_type);
url = url.replace("{{ref_key}}", icon.api_items.ref_key);
const formData = {
ref_id: item[icon.api_items.id],
title: sourceData,
};
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: import.meta.env.VITE_REPO_BASE_URL,
body: formData,
method: "post",
});
this.updateListAnswer(index, "tbookmark", 1);
} catch (err) {}
// this.httpService.postRequest(url, formData).then((res) => {
// this.updateListAnswer(index, "tbookmark", 1);
// });
} else {
// let url = favoriteApi.favorite.delete;
let url = favoriteApi.favorite.deleteByRefid;
url = url.replace("{{data_type}}", icon.api_items.data_type);
// url = url.replace("{{id}}", item[icon.api_items.id]);
url = url.replace("{{index_key}}", this.searchActiveTabGetter?.key);
url = url.replace("{{ref_id}}", item[icon.api_items.id]);
[];
const formData = {
ref_id: item[icon.api_items.id],
title: sourceData,
};
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: import.meta.env.VITE_REPO_BASE_URL,
body: formData,
method: "post",
});
this.updateListAnswer(index, "tbookmark", 0);
} catch (err) {}
// this.httpService.postRequest(url, formData).then((res) => {
// this.updateListAnswer(index, "tbookmark", 0);
// });
}
},
updateListAnswer(index, key, value) {
if (index in this.items) {
if (key in this.items[index]["_source"])
this.items[index]["_source"][key] = value;
this.reRender++;
}
},
handlerActionsList(item, key, icon) {
if (key == "summary") this.$emit("changeCurrent", item);
else if (key == "copy") {
let keyid = icon.link_route.id;
let id = "";
id = this.findvalueForKey(item, keyid);
this.copyToClipboard("", this.urlResolver(id, icon.link_route, item));
} else if (key == "SubjectForm") {
this.$emit("SubjectForm", item);
} else if (key == "edit") {
this.openPrevent({ item }, false);
} else if (key == "delete") {
this.deleteResearch(item, false);
}
},
urlResolver(_id, route, item) {
let keyMain = "";
let query_key = "";
let query_value = "";
let keys = "";
let key = "";
let query = { searchtext: this.textSearch ?? undefined };
if (route?.query) {
let querys = route.query;
if (typeof querys === "string") {
keys = route?.query.split("=");
if (keys.length >= 2) {
query_key = keys[0];
query_value = keys[1];
}
if (query_key && query_value) {
query[query_key] = query_value; // کلید پویا و مقدار از قسمت بالایی
}
} else {
let newObject = {};
for (const [key, value] of Object.entries(querys)) {
if (value in item) {
newObject[key] = item[value];
} else {
newObject[key] = item?._source[value];
}
}
Object.assign(query, newObject);
}
}
if (route?.key_item || route.key) {
if (route?.key_item) key = this.getSourceData(item, route.key_item);
else key = route.key;
}
const routeData = this.$router.resolve({
path: "/search/show",
params: {
id: _id,
key: key,
},
query: query,
});
return routeData.href;
},
getSourceData(itemData, key) {
let sourceData = itemData;
key.split(".").forEach((key) => {
if (sourceData[key]) sourceData = sourceData[key];
});
return sourceData;
},
getArrayData(itemData, collapseItem) {
if (!collapseItem.array_key) return [itemData];
let sourceData = this.getSourceData(itemData, collapseItem.array_key);
if (!Array.isArray(sourceData)) return [itemData];
return sourceData;
},
showDetailsHandler(event) {
this.$emit("changeCurrent", this.items[event.index]);
},
copyLinkHandler(event) {
let id = this.items[event]._id;
this.copyToClipboard("", this.urlResolver(id));
},
findvalueForKey(item, keyName) {
let value = "";
if (keyName in item) {
value = item[keyName];
} else {
value = item?._source[keyName];
}
return value;
},
onOnLinkedTitleClick({ rowItem, tableColumn, index }) {
let valueId = this.findvalueForKey(rowItem, tableColumn.link_route.id);
let route = tableColumn.link_route;
// let href = this.urlResolver(valueId, tableColumn.link_route);
let keyMain = "";
let query_key = "";
let query_value = "";
let keys = "";
let key = "";
let query = { searchtext: this.textSearch ?? undefined };
if (route?.query) {
let querys = route.query;
if (typeof querys === "string") {
keys = route?.query.split("=");
if (keys.length >= 2) {
query_key = keys[0];
query_value = keys[1];
}
if (query_key && query_value) {
query[query_key] = query_value; // کلید پویا و مقدار از قسمت بالایی
}
} else {
let newObject = {};
for (const [key, value] of Object.entries(querys)) {
if (value in item) {
newObject[key] = item[value];
} else {
newObject[key] = item?._source[value];
}
}
Object.assign(query, newObject);
}
}
if (route?.key_item || route.key) {
if (route?.key_item) key = this.getSourceData(item, route.key_item);
else key = route.key;
}
this.$router.push({
path: `/search/${key}/${valueId}`,
params: {
id: valueId,
key: key,
name:tableColumn?.link_route?.name
},
query: query?.length ? query : undefined,
});
localStorage.setItem("myList", JSON.stringify(this.items));
localStorage.setItem("myItem", JSON.stringify(rowItem));
this.SET_ITEM_ENTITY(rowItem);
this.SET_LIST_ENTITY(this.items);
// window.open(href, "_blank");
},
showTextPage(event) {},
async deleteResearch(item) {
this.mySwalConfirm({
title: "هشدار!!!",
html: `از حذف <b>${item._source.text_subject}</b> اطمینان دارید؟ `,
icon: "warning",
}).then(async (result) => {
if (result.isConfirmed) {
let url = researchApi.research.deleteItem;
url = url.replace("{{index_key}}", item._source.ref_key);
url = url.replace("{{id}}", item._id);
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: import.meta.env.VITE_REPO_BASE_URL,
method: "post",
});
this.mySwalToast({
html: res.message,
});
setTimeout(() => {
this.$emit("updateForDeleteResearch");
}, 500);
} catch (err) {}
// this.httpService.postRequest(url).then((res) => {
// });
}
});
},
/**
* تغییر محدودیت صفحهبندی و ارسال آن با استفاده از رویداد
* @param {Object} paging - تنظیمات صفحهبندی
*/
pageLimitChanged(paging) {
this.resetPagination();
this.page.limit = paging.limit;
this.$emit("changePage", this.page);
},
/**
* تغییر صفحه فعلی و ارسال آن با استفاده از رویداد
* @param {Object} paging - تنظیمات صفحهبندی
*/
pageChanged(paging) {
let page = paging.pageNumber;
page -= 1;
this.page.offset = page * paging.limit;
this.page.limit = paging.limit;
this.page.page = paging.pageNumber;
this.$emit("changePage", this.page);
},
/**
* تغییر مرتبسازی و ارسال آن با استفاده از رویداد
* @param {Object} sorting - تنظیمات مرتبسازی
*/
sortChanged(sorting) {
this.page.page = this.page.offset = 0;
this.sorting = sorting;
this.$emit("changePage", this.sorting);
},
/**
* بازنشانی تنظیمات صفحهبندی به حالت اولیه
*/
resetPagination() {
this.page = {
pages: 0,
total: 0,
page: 1,
offset: 0,
limit: 10,
};
},
},
components: {
lineContent: defineAsyncComponent(() =>
import("@search/components/search/view/lineContent.vue")
),
},
};
</script>
<style lang="scss" scoped>
.main-content-item {
position: relative;
overflow: hidden;
&:hover,
&.active {
background-color: var(--list-background-color);
.search-item__actions {
// width: 6.5em;
width: auto;
transition: width 0.5s;
background: #fff;
border-radius: 0 0.5em 0.5em 0;
.tavasi-more-vert {
transition: all 0.2s;
display: none;
}
}
}
.search-item__actions {
.btn {
font-size: 0.8rem;
}
}
}
.search-item__actions {
position: absolute;
left: 0;
width: 1.6em;
top: 1em;
// overflow: hidden;
transition: all 0.5s;
display: flex;
align-items: center;
.btn {
display: flex;
align-items: center;
justify-content: center;
padding: 0.175rem 0.35rem;
&:hover {
filter: brightness(0.7);
}
.icon-copy2 {
font-size: 0.8rem;
}
&.favorites {
color: calc(--primary-color);
.icon-bookmark-1,
.icon-bookmark-2 {
height: 1.3em;
}
}
}
}
.main-content {
height: calc(100dvh - 15em);
overflow: auto;
}
@media (max-width: 575.98px) {
.main-content {
height: calc(100dvh - 17em);
}
}
@media only screen and (min-width: 576px) and (max-width: 767.98px) {
}
@media only screen and (min-width: 768px) and (max-width: 900.98px) {
}
@media only screen and (min-width: 901px) and (max-width: 1049.98px) {
}
@media (min-width: 1050px) {
}
</style>

View File

@ -139,9 +139,10 @@ onMounted(() => {
v-else
raw
:to="item.to"
class="w-full h-full flex justify-center items-center"
class="w-full flex justify-center items-center me-3"
active-class="text-(--color-white) bg-(--ui-primary) link-is-active"
>
<UIcon :name="item.icon" class="size-7" />
<UIcon :name="item.icon" class="size-6" />
</ULink>
</template>
</div>
@ -167,6 +168,10 @@ onMounted(() => {
border: 0.3px solid #e0e0e0;
box-shadow: 0px 4px 15px 0px #0000001a;
@media screen and (max-width: 991.99px) {
height: 76px;
}
nav > div {
width: 100%;
display: flex;
@ -221,6 +226,10 @@ onMounted(() => {
color: #fff;
}
}
@media screen and (max-width: 991.99px) {
height: 60px;
}
}
.hide-label {
@ -237,6 +246,30 @@ onMounted(() => {
display: none;
}
}
.link-is-active {
width: 64;
height: 60;
gap: 4px;
border-radius: 12px;
padding-top: 16px;
padding-right: 18px;
padding-bottom: 16px;
padding-left: 18px;
background: linear-gradient(102.02deg, #4be8ae 7.38%, #00a762 91.78%);
box-shadow: 0px 4px 10px 0px #00745933;
// .icon {
// width: 24;
// height: 24;
// }
* {
color: #fff;
}
}
}
}
</style>

View File

@ -1,900 +0,0 @@
<template>
<div class="my-content">
<template v-if="viewMode == 'list'">
<div class="row">
<div class="col-12 main-content firefox-scrollbar">
<template v-if="items.length">
<div
class="mb-3 border-bottom main-content-item p-3"
v-for="(itemData, i) in items"
:key="i"
>
<template v-if="itemData.inner_hits">
<div
class="row"
v-for="(collapseItem, indexCollapse) in schemaItems
.collapse_items?.items || []"
:key="indexCollapse"
>
<template v-if="collapseItem.array_key">
<div
class="col-12"
v-for="(subItemData, s) in getArrayData(
itemData,
collapseItem
)"
>
<lineContent
:lineSchema="collapseItem"
:itemData="subItemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</div>
</template>
<template v-else>
<lineContent
:lineSchema="collapseItem"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</template>
</div>
</template>
<template v-else>
<div
v-if="schemaItems && schemaItems.items"
class="row"
v-for="(lineSchema, index) in schemaItems?.items || []"
:key="index"
>
<lineContent
:lineSchema="lineSchema"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
@openPrevent="openPrevent"
>
</lineContent>
</div>
</template>
<div
class="search-item__actions"
v-if="schemaItems.actions?.length"
>
<span class="tavasi tavasi-more-vert"></span>
<template v-for="(schema, indexIcon) in schemaItems.actions">
<button
:key="'action' + indexIcon"
v-if="schema.key != 'tbookmark' || isRealUser"
:title="schema.title"
class="btn"
:type="schema.type"
>
<svg
v-if="schema.key == 'tbookmark'"
@click.pevent="AddToFavorites(itemData, schema, i)"
class=""
:class="
itemData._source[schema.key] == 1
? 'icon icon-' + schema.toggle_icons.icon1
: 'icon icon-' + schema.toggle_icons.icon2
"
>
<use
:xlink:href="
itemData._source[schema.key] == 1
? '#icon-' + schema.toggle_icons.icon1
: '#icon-' + schema.toggle_icons.icon2
"
></use>
</svg>
<svg
@click="handlerActionsList(itemData, schema.key, schema)"
v-else
:class="'icon icon-' + schema.icon"
>
<use :xlink:href="'#icon-' + schema.icon"></use>
</svg>
</button>
</template>
</div>
</div>
</template>
<template v-else>
<table-no-data> </table-no-data>
</template>
</div>
</div>
<div class="">
<jahat-pagination
class="border-0 w-100"
v-if="page.total"
:paginationInfo="page"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@sort-changed="sortChanged"
>
</jahat-pagination>
</div>
</template>
<template v-if="viewMode == 'table'">
<div class="row">
<div class="col-12 px-0">
<my-table
:key="reRender"
:height="'calc(-16em + 100vh)'"
:items="items"
:tableColumns="tableColumns"
:tableActions="tableActions"
:paginationInfo="page"
:sortingInfo="sorting"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@show-details="showDetailsHandler"
@copy-link="copyLinkHandler"
@on-linked-title-click="onOnLinkedTitleClick"
@show-text="showTextPage"
@actions="handlerActions"
:showHeaderSortButton="false"
class="my-table px-0 my-content-table"
>
</my-table>
</div>
</div>
</template>
<template v-if="viewMode == 'three-column-card'">
<div class="row">
<div class="col-12 main-content firefox-scrollbar">
<div class="row" v-if="items.length">
<div
class="mb-3 main-content-item p-3 col-4"
v-for="(itemData, i) in items"
:key="i"
>
<div class="d-flex">
<img
class="img-fluid mx-auto w-50"
src="assets/common/img/default.svg"
alt=""
/>
</div>
<template v-if="itemData.inner_hits">
<div
class="row"
v-for="(collapseItem, indexCollapse) in schemaItems
.collapse_items?.items || []"
:key="indexCollapse"
>
<template v-if="collapseItem.array_key">
<div
class="col-3"
v-for="(subItemData, s) in getArrayData(
itemData,
collapseItem
)"
>
<lineContent
:lineSchema="collapseItem"
:itemData="subItemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</div>
</template>
<template v-else>
<lineContent
:lineSchema="collapseItem"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</template>
</div>
</template>
<template v-else>
<div
v-if="schemaItems && schemaItems.items"
class="row"
v-for="(lineSchema, index) in schemaItems?.items || []"
:key="index"
>
<lineContent
:lineSchema="lineSchema"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
@openPrevent="openPrevent"
>
</lineContent>
</div>
</template>
<div class="search-item__actions" v-if="schemaItems.actions">
<span class="tavasi tavasi-more-vert"></span>
<button
:key="'action' + indexIcon"
v-for="(schema, indexIcon) in schemaItems.actions"
v-if="schema.key != 'tbookmark' || isRealUser"
:title="schema.title"
class="btn"
:type="schema.type"
>
<svg
v-if="schema.key == 'tbookmark'"
@click.pevent="AddToFavorites(itemData, schema, i)"
class=""
:class="
itemData._source[schema.key] == 1
? 'icon icon-' + schema.toggle_icons.icon1
: 'icon icon-' + schema.toggle_icons.icon2
"
>
<use
:xlink:href="
itemData._source[schema.key] == 1
? '#icon-' + schema.toggle_icons.icon1
: '#icon-' + schema.toggle_icons.icon2
"
></use>
</svg>
<svg
@click="handlerActionsList(itemData, schema.key, schema)"
v-else
:class="'icon icon-' + schema.icon"
>
<use :xlink:href="'#icon-' + schema.icon"></use>
</svg>
</button>
</div>
</div>
</div>
<template v-else>
<table-no-data> </table-no-data>
</template>
</div>
</div>
<div class="">
<jahat-pagination
class="border-0 w-100"
v-if="page.total"
:paginationInfo="page"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@sort-changed="sortChanged"
>
</jahat-pagination>
</div>
</template>
<template v-if="viewMode == 'two-column-card'">
<div class="row">
<div class="col-6 main-content firefox-scrollbar">
<template v-if="items.length">
<div
class="mb-3 border-bottom main-content-item p-3"
v-for="(itemData, i) in items"
:key="i"
>
<template v-if="itemData.inner_hits">
<div
class="row"
v-for="(collapseItem, indexCollapse) in schemaItems
.collapse_items?.items || []"
:key="indexCollapse"
>
<template v-if="collapseItem.array_key">
<div
class="col-12"
v-for="(subItemData, s) in getArrayData(
itemData,
collapseItem
)"
>
<lineContent
:lineSchema="collapseItem"
:itemData="subItemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</div>
</template>
<template v-else>
<lineContent
:lineSchema="collapseItem"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
>
</lineContent>
</template>
</div>
</template>
<template v-else>
<div
v-if="schemaItems && schemaItems.items"
class="row"
v-for="(lineSchema, index) in schemaItems?.items || []"
:key="index"
>
<lineContent
:lineSchema="lineSchema"
:itemData="itemData"
:arrayItemData="items"
:textSearch="textSearch"
@openPrevent="openPrevent"
>
</lineContent>
</div>
</template>
<div class="search-item__actions" v-if="schemaItems.actions">
<span class="tavasi tavasi-more-vert"></span>
<button
:key="'action' + indexIcon"
v-for="(schema, indexIcon) in schemaItems.actions"
v-if="schema.key != 'tbookmark' || isRealUser"
:title="schema.title"
class="btn"
:type="schema.type"
>
<svg
v-if="schema.key == 'tbookmark'"
@click.pevent="AddToFavorites(itemData, schema, i)"
class=""
:class="
itemData._source[schema.key] == 1
? 'icon icon-' + schema.toggle_icons.icon1
: 'icon icon-' + schema.toggle_icons.icon2
"
>
<use
:xlink:href="
itemData._source[schema.key] == 1
? '#icon-' + schema.toggle_icons.icon1
: '#icon-' + schema.toggle_icons.icon2
"
></use>
</svg>
<svg
@click="handlerActionsList(itemData, schema.key, schema)"
v-else
:class="'icon icon-' + schema.icon"
>
<use :xlink:href="'#icon-' + schema.icon"></use>
</svg>
</button>
</div>
</div>
</template>
<template v-else>
<table-no-data> </table-no-data>
</template>
</div>
</div>
<div class="">
<jahat-pagination
class="border-0 w-100"
v-if="page.total"
:paginationInfo="page"
@page-changed="pageChanged"
@page-limit-changed="pageLimitChanged"
@sort-changed="sortChanged"
>
</jahat-pagination>
</div>
</template>
</div>
</template>
<script>
// import HttpService from "@services/httpService";
// import tableActions from "@search/json/listTableContextMenu";
import favoriteApi from "~/apis/favoriteApi";
import researchApi from "~/apis/researchApi";
import { mapState, mapActions } from "pinia";
import { useSearchStore } from "~/stores/searchStore";
import { useEntityStore } from "@search/stores/entityStore";
import { useAuthStore } from "~/stores/authStore";
export default {
props: {
schemaItems: {
default() {
return [];
},
},
viewMode: {
default: "table",
},
items: {
default() {
return [];
},
},
pagination: {
default() {
return {};
},
},
tableColumns: {
default() {
return [];
},
},
tableActions: {
default() {
return [];
},
},
textSearch: {
default: "",
},
},
beforeMount() {
// this.httpService = new HttpService(process.env.VUE_APP_REPO_BASE_URL);
if (this.items) {
this.items.forEach((item) => {
if (
!item._source.qanon_etebar ||
item._source.qanon_etebar.trim() == ""
) {
item._source.qanon_etebar = "معتبر";
}
});
}
},
mounted() {
this.page = this.pagination;
this.setTableColumns();
},
watch: {
pagination(newVal) {
this.page = newVal;
},
},
data() {
return {
page: "",
curTableColumns: this.tableColumns,
// tableActions: tableActions,
reRender: 1,
sorting: {
sortby: "created",
sortorder: undefined, // asc | desc | none
},
};
},
computed: {
...mapState(useSearchStore, ["searchActiveTabGetter"]),
...mapState(useAuthStore, ["isRealUser"]),
},
methods: {
...mapActions(useEntityStore, ["SET_ITEM_ENTITY", "SET_LIST_ENTITY"]),
openPrevent(item, isReadonly = true) {
this.$emit("ModalHandler", { item, isReadonly });
},
handlerActions(event) {
let key = event.rowAction.key;
if (key == "summary") this.$emit("changeCurrent", event.item);
else if (key == "copy") {
this.copyToClipboard(
"",
this.urlResolver(
event.item._id,
event.rowAction.link_route,
event.item
)
);
} else if (key == "tbookmark") {
this.AddToFavorites(event.item, event.rowAction, event.index);
}
},
setTableColumns() {
if (this.tableColumns.length) this.curTableColumns = this.tableColumns;
else if (this.domainActiveGetter?.table_columns)
this.curTableColumns = this.domainActiveGetter?.table_columns;
},
async AddToFavorites(item, icon, index) {
let sourceData = item;
icon.api_items.title.split(".").forEach((key) => {
if (sourceData[key]) sourceData = sourceData[key];
});
if (item._source.tbookmark == 0) {
let url = favoriteApi.favorite.add;
url = url.replace("{{data_type}}", icon.api_items.data_type);
url = url.replace("{{ref_key}}", icon.api_items.ref_key);
const formData = {
ref_id: item[icon.api_items.id],
title: sourceData,
};
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: import.meta.env.VITE_REPO_BASE_URL,
body: formData,
method: "post",
});
this.updateListAnswer(index, "tbookmark", 1);
} catch (err) {}
// this.httpService.postRequest(url, formData).then((res) => {
// this.updateListAnswer(index, "tbookmark", 1);
// });
} else {
// let url = favoriteApi.favorite.delete;
let url = favoriteApi.favorite.deleteByRefid;
url = url.replace("{{data_type}}", icon.api_items.data_type);
// url = url.replace("{{id}}", item[icon.api_items.id]);
url = url.replace("{{index_key}}", this.searchActiveTabGetter?.key);
url = url.replace("{{ref_id}}", item[icon.api_items.id]);
[];
const formData = {
ref_id: item[icon.api_items.id],
title: sourceData,
};
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: import.meta.env.VITE_REPO_BASE_URL,
body: formData,
method: "post",
});
this.updateListAnswer(index, "tbookmark", 0);
} catch (err) {}
// this.httpService.postRequest(url, formData).then((res) => {
// this.updateListAnswer(index, "tbookmark", 0);
// });
}
},
updateListAnswer(index, key, value) {
if (index in this.items) {
if (key in this.items[index]["_source"])
this.items[index]["_source"][key] = value;
this.reRender++;
}
},
handlerActionsList(item, key, icon) {
if (key == "summary") this.$emit("changeCurrent", item);
else if (key == "copy") {
let keyid = icon.link_route.id;
let id = "";
id = this.findvalueForKey(item, keyid);
this.copyToClipboard("", this.urlResolver(id, icon.link_route, item));
} else if (key == "SubjectForm") {
this.$emit("SubjectForm", item);
} else if (key == "edit") {
this.openPrevent({ item }, false);
} else if (key == "delete") {
this.deleteResearch(item, false);
}
},
urlResolver(_id, route, item) {
let keyMain = "";
let query_key = "";
let query_value = "";
let keys = "";
let key = "";
let query = { searchtext: this.textSearch ?? undefined };
if (route?.query) {
let querys = route.query;
if (typeof querys === "string") {
keys = route?.query.split("=");
if (keys.length >= 2) {
query_key = keys[0];
query_value = keys[1];
}
if (query_key && query_value) {
query[query_key] = query_value; // کلید پویا و مقدار از قسمت بالایی
}
} else {
let newObject = {};
for (const [key, value] of Object.entries(querys)) {
if (value in item) {
newObject[key] = item[value];
} else {
newObject[key] = item?._source[value];
}
}
Object.assign(query, newObject);
}
}
if (route?.key_item || route.key) {
if (route?.key_item) key = this.getSourceData(item, route.key_item);
else key = route.key;
}
const routeData = this.$router.resolve({
path: "/search/show",
params: {
id: _id,
key: key,
},
query: query,
});
return routeData.href;
},
getSourceData(itemData, key) {
let sourceData = itemData;
key.split(".").forEach((key) => {
if (sourceData[key]) sourceData = sourceData[key];
});
return sourceData;
},
getArrayData(itemData, collapseItem) {
if (!collapseItem.array_key) return [itemData];
let sourceData = this.getSourceData(itemData, collapseItem.array_key);
if (!Array.isArray(sourceData)) return [itemData];
return sourceData;
},
showDetailsHandler(event) {
this.$emit("changeCurrent", this.items[event.index]);
},
copyLinkHandler(event) {
let id = this.items[event]._id;
this.copyToClipboard("", this.urlResolver(id));
},
findvalueForKey(item, keyName) {
let value = "";
if (keyName in item) {
value = item[keyName];
} else {
value = item?._source[keyName];
}
return value;
},
onOnLinkedTitleClick({ rowItem, tableColumn, index }) {
let valueId = this.findvalueForKey(rowItem, tableColumn.link_route.id);
let route = tableColumn.link_route;
// let href = this.urlResolver(valueId, tableColumn.link_route);
let keyMain = "";
let query_key = "";
let query_value = "";
let keys = "";
let key = "";
let query = { searchtext: this.textSearch ?? undefined };
if (route?.query) {
let querys = route.query;
if (typeof querys === "string") {
keys = route?.query.split("=");
if (keys.length >= 2) {
query_key = keys[0];
query_value = keys[1];
}
if (query_key && query_value) {
query[query_key] = query_value; // کلید پویا و مقدار از قسمت بالایی
}
} else {
let newObject = {};
for (const [key, value] of Object.entries(querys)) {
if (value in item) {
newObject[key] = item[value];
} else {
newObject[key] = item?._source[value];
}
}
Object.assign(query, newObject);
}
}
if (route?.key_item || route.key) {
if (route?.key_item) key = this.getSourceData(item, route.key_item);
else key = route.key;
}
this.$router.push({
path: `/search/${key}/${valueId}`,
params: {
id: valueId,
key: key,
name:tableColumn?.link_route?.name
},
query: query?.length ? query : undefined,
});
localStorage.setItem("myList", JSON.stringify(this.items));
localStorage.setItem("myItem", JSON.stringify(rowItem));
this.SET_ITEM_ENTITY(rowItem);
this.SET_LIST_ENTITY(this.items);
// window.open(href, "_blank");
},
showTextPage(event) {},
async deleteResearch(item) {
this.mySwalConfirm({
title: "هشدار!!!",
html: `از حذف <b>${item._source.text_subject}</b> اطمینان دارید؟ `,
icon: "warning",
}).then(async (result) => {
if (result.isConfirmed) {
let url = researchApi.research.deleteItem;
url = url.replace("{{index_key}}", item._source.ref_key);
url = url.replace("{{id}}", item._id);
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: import.meta.env.VITE_REPO_BASE_URL,
method: "post",
});
this.mySwalToast({
html: res.message,
});
setTimeout(() => {
this.$emit("updateForDeleteResearch");
}, 500);
} catch (err) {}
// this.httpService.postRequest(url).then((res) => {
// });
}
});
},
/**
* تغییر محدودیت صفحهبندی و ارسال آن با استفاده از رویداد
* @param {Object} paging - تنظیمات صفحهبندی
*/
pageLimitChanged(paging) {
this.resetPagination();
this.page.limit = paging.limit;
this.$emit("changePage", this.page);
},
/**
* تغییر صفحه فعلی و ارسال آن با استفاده از رویداد
* @param {Object} paging - تنظیمات صفحهبندی
*/
pageChanged(paging) {
let page = paging.pageNumber;
page -= 1;
this.page.offset = page * paging.limit;
this.page.limit = paging.limit;
this.page.page = paging.pageNumber;
this.$emit("changePage", this.page);
},
/**
* تغییر مرتبسازی و ارسال آن با استفاده از رویداد
* @param {Object} sorting - تنظیمات مرتبسازی
*/
sortChanged(sorting) {
this.page.page = this.page.offset = 0;
this.sorting = sorting;
this.$emit("changePage", this.sorting);
},
/**
* بازنشانی تنظیمات صفحهبندی به حالت اولیه
*/
resetPagination() {
this.page = {
pages: 0,
total: 0,
page: 1,
offset: 0,
limit: 10,
};
},
},
components: {
lineContent: defineAsyncComponent(() =>
import("@search/components/search/view/lineContent.vue")
),
},
};
</script>
<style lang="scss" scoped>
.main-content-item {
position: relative;
overflow: hidden;
&:hover,
&.active {
background-color: var(--list-background-color);
.search-item__actions {
// width: 6.5em;
width: auto;
transition: width 0.5s;
background: #fff;
border-radius: 0 0.5em 0.5em 0;
.tavasi-more-vert {
transition: all 0.2s;
display: none;
}
}
}
.search-item__actions {
.btn {
font-size: 0.8rem;
}
}
}
.search-item__actions {
position: absolute;
left: 0;
width: 1.6em;
top: 1em;
// overflow: hidden;
transition: all 0.5s;
display: flex;
align-items: center;
.btn {
display: flex;
align-items: center;
justify-content: center;
padding: 0.175rem 0.35rem;
&:hover {
filter: brightness(0.7);
}
.icon-copy2 {
font-size: 0.8rem;
}
&.favorites {
color: calc(--primary-color);
.icon-bookmark-1,
.icon-bookmark-2 {
height: 1.3em;
}
}
}
}
.main-content {
height: calc(100dvh - 15em);
overflow: auto;
}
@media (max-width: 575.98px) {
.main-content {
height: calc(100dvh - 17em);
}
}
@media only screen and (min-width: 576px) and (max-width: 767.98px) {
}
@media only screen and (min-width: 768px) and (max-width: 900.98px) {
}
@media only screen and (min-width: 901px) and (max-width: 1049.98px) {
}
@media (min-width: 1050px) {
}
</style>

View File

@ -1,9 +1,9 @@
<template>
<section class="section-one flex flex-col justify-center">
<div class="bg-container h-full" :style="backgroundImageStyle">
<div class="background-image h-full" :style="backgroundImageStyle">
<navigation-menu></navigation-menu>
<div class="text-logo flex justify-center flex-col items-center">
<div class="logo-container flex justify-center flex-col items-center">
<NuxtImg fit="auto" quality="80" placeholder src="/img/logo.png" />
<div class="title">
کاوش با
@ -49,16 +49,16 @@ export default {
</script>
<style scoped>
.section-one {
.bg-container {
.background-image {
height: 521px;
background-size: 100% auto;
background-repeat: no-repeat;
/* background-attachment: fixed; */
background-attachment: fixed;
/* background-image: url("/img/background.svg"),
linear-gradient(199.05deg, #ffffff 9.99%, #e4fff7 42.07%, #ffffff 97.12%); */
}
.text-logo {
.logo-container {
padding-top: 10em;
position: relative;
@ -69,7 +69,7 @@ export default {
line-height: 21px;
letter-spacing: 0%;
text-align: center;
color: #1b2132;
color: var(--ui-color-two);
}
.badge-style {
width: 100;

View File

@ -68,9 +68,7 @@
</div>
</section>
</template>
<script>
export default {};
</script>
<script></script>
<style scoped>
.section-two {
font-weight: 200;
@ -93,7 +91,7 @@ export default {};
font-size: 24px;
line-height: 36px;
letter-spacing: 0%;
color: #1b2132;
color: var(--ui-color-two);
text-align: right;
}

View File

@ -0,0 +1,183 @@
<script setup>
const props = defineProps({
list: {
default() {
return [];
},
},
noDataText: {
default: "نتیجه‌ای یافت نشد!",
},
noDataIcon: {
default: "/img/no-data.png",
},
});
const items = [
{
label: "Parent 1",
content: "This is the content of Parent 1",
children: [
{
label: "Child 1.1",
content: "This is the content of Child 1.1",
},
{
label: "Child 1.2",
content: "This is the content of Child 1.2",
},
],
},
{
label: "Parent 2",
content: "This is the content of Parent 2",
children: [
{
label: "Child 2.1",
content: "This is the content of Child 2.1",
},
{
label: "Child 2.2",
content: "This is the content of Child 2.2",
},
],
},
];
function toggleAccordion(id) {
const allHiddenClasses = querySelectorAll(".hidden");
console.info(element);
allHiddenClasses.forEach((element) => {
console.info(element);
// element.classList.remove('hidden')
});
const content = document.getElementById(`content-${id}`);
const icon = document.getElementById(`icon-${id}`);
// Toggle visibility
content.classList.toggle("hidden");
// Rotate icon
icon.classList.toggle("rotate-180");
}
</script>
<template>
<div class="accordion-menu max-w-xl mx-auto p-4">
<!-- Parent Accordion Item 1 -->
<div class="mb-2">
<button
class="w-full flex justify-between items-center p-4 bg-gray-100 rounded-lg hover:bg-gray-200 transition-all delay-500 duration-300 ease-in-out"
@click.prevent="toggleAccordion('parent1')"
>
<span>Parent 1</span>
<svg
id="icon-parent1"
class="w-5 h-5 transform transition-transform"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7"
/>
</svg>
</button>
<div
id="content-parent1"
class="mt-2 pl-4 hidden transition delay-500 duration-300 ease-in-out"
>
<!-- Child Accordion Item 1 -->
<div class="mb-2 transition delay-500 duration-300 ease-in-out">
<button
class="w-full flex justify-between items-center p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition-all"
@click.prevent="toggleAccordion('child1')"
>
<span>Child 1.1</span>
<svg
id="icon-child1"
class="w-5 h-5 transform transition-transform"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7"
/>
</svg>
</button>
<div id="content-child1" class="mt-2 pl-4 hidden">
<p class="p-3 bg-gray-50 rounded-lg">
This is the content of Child 1.1.
</p>
</div>
</div>
<!-- Child Accordion Item 2 -->
<div class="mb-2 transition delay-500 duration-300 ease-in-out">
<button
class="w-full flex justify-between items-center p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition-all"
@click.prevent="toggleAccordion('child2')"
>
<span>Child 1.2</span>
<svg
id="icon-child2"
class="w-5 h-5 transform transition-transform"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7"
/>
</svg>
</button>
<div id="content-child2" class="mt-2 pl-4 hidden">
<p class="p-3 bg-gray-50 rounded-lg">
This is the content of Child 1.2.
</p>
</div>
</div>
</div>
</div>
<!-- Parent Accordion Item 2 -->
<div class="mb-2">
<button
class="w-full flex justify-between items-center p-4 bg-gray-100 rounded-lg hover:bg-gray-200 transition-all"
@click.prevent="toggleAccordion('parent2')"
>
<span>Parent 2</span>
<svg
id="icon-parent2"
class="w-5 h-5 transform transition-transform"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 9l-7 7-7-7"
/>
</svg>
</button>
<div id="content-parent2" class="mt-2 pl-4 hidden">
<p class="p-3 bg-gray-50 rounded-lg">
This is the content of Parent 2.
</p>
</div>
</div>
</div>
</template>
<style scoped></style>

View File

@ -5,11 +5,14 @@ const props = defineProps({
return [];
},
},
noDataText: {
default: "نتیجه‌ای یافت نشد!",
},
noDataIcon: {
default: "/img/no-data.png",
},
});
const SearchShow = defineAsyncComponent(() =>
import("@hadith/components/hadith/search-page/SearchShow.vue")
);
const route = useRoute();
const modal = useModal();
const isModalOpen = ref(false);
@ -27,6 +30,11 @@ function resetModal() {
function updateModalTitle() {
modal.patch({ title: "Updated Title" });
}
// components declaration
const SearchShow = defineAsyncComponent(() =>
import("@hadith/components/hadith/search-page/SearchShow.vue")
);
</script>
<template>
@ -36,8 +44,9 @@ function updateModalTitle() {
نتیجه
</div>
<div class="search-list">
<div class="search-list" :class="route.name">
<div
v-if="props.list.length"
class="search-list-item"
v-for="(item, index) in props.list"
:key="index"
@ -55,6 +64,14 @@ function updateModalTitle() {
<p class="reference">الکافی، جلد ۱، صفحه ۱۰۳</p>
</div>
</div>
<no-data
class="h-full w-full flex flex-col justify-center items-center"
v-else
>
<NuxtImg fit="auto" quality="80" placeholder :src="props.noDataIcon" />
<p class="no-data-text">{{ props.noDataText }}</p>
</no-data>
</div>
<UModal
@ -104,6 +121,10 @@ function updateModalTitle() {
height: calc(100dvh - 15.2em);
overflow-y: auto;
&.hadithFavorites {
height: calc(100dvh - 8em);
}
&:not(:last-child) {
border-bottom: 0.3px solid #d9d9d9;
}
@ -133,7 +154,7 @@ function updateModalTitle() {
line-height: 32px;
letter-spacing: 0%;
text-align: right;
color: #1b2132;
color: var(--ui-color-two);
margin-bottom: 0.5em;
&:hover,
@ -181,6 +202,14 @@ function updateModalTitle() {
}
}
}
.no-data-text {
font-family: IRANSansX;
font-weight: 300;
font-size: 16px;
line-height: 24px;
letter-spacing: 0%;
text-align: center;
}
}
</style>
@ -189,14 +218,14 @@ function updateModalTitle() {
border: 0.3px solid #e0e0e0;
box-shadow: 0px 8px 20px 0px #0000001a;
background: #ffffff;
width: 100%;
max-width: 720px;
border-radius: 16px;
gap: 8px;
border-width: 0.3px;
.modal-body {
border-radius: 16px;
width: 100%;
max-width: 720px;
height: 800px;
position: relative;

View File

@ -84,7 +84,8 @@ const closeModal = () => {
<span class="section-title"> ترجمه </span>
<UButton variant="ghost" class="copy-btn" label="کپی" />
</div>
<p class="font-bold">امام جعفر صادق علیهالسلام:</p>
<p class="from">امام جعفر صادق علیهالسلام:</p>
<p class="persian-text">
انسان دانش میآموزد تا بداند، و میداند تا عمل کند، و عمل
میکند تا به سبب آن شناخته شود، و شناخته میشود تا (عمل او)
@ -100,13 +101,13 @@ const closeModal = () => {
<span class="section-title"> شرح </span>
<UButton variant="ghost" class="copy-btn" label="کپی" />
</div>
<p>
<p class="description-item">
این حدیث به سلسله مراتب علم و عمل اشاره دارد و تأکید میکند که
علم باید به عمل منتهی شود و عمل نیز باید با نیت خالص و برای
رضای خداوند باشد تا مورد قبول واقع شود و انسان را به سعادت
ابدی برساند.
</p>
<p>
<p class="description-item">
این حدیث به سلسله مراتب علم و عمل اشاره دارد و تأکید میکند که
علم باید به عمل منتهی شود و عمل نیز باید با نیت خالص و برای
رضای خداوند باشد تا مورد قبول واقع شود و انسان را به سعادت
@ -157,6 +158,7 @@ const closeModal = () => {
</div>
</template>
<!-- because of the buttons, using without scoped. -->
<style>
.search-show-modal {
.body-header {
@ -165,7 +167,8 @@ const closeModal = () => {
margin-bottom: 2.5em;
.close-btn {
color: #1b2132;
color: var(--ui-color-two);
/* width: 24px; */
/* height: 24px; */
padding: 0.2em;
@ -244,11 +247,7 @@ const closeModal = () => {
.section-header {
display: flex;
justify-content: space-between;
font-family: IRANSansX;
font-weight: 300;
font-size: 12px;
line-height: 18px;
letter-spacing: 0%;
text-align: right;
margin-bottom: 0.5em;
@ -314,7 +313,8 @@ const closeModal = () => {
line-height: 32px;
letter-spacing: 0%;
text-align: right;
color: #1b2132;
color: var(--ui-color-two);
margin-bottom: 0.5em;
}
}
@ -322,7 +322,20 @@ const closeModal = () => {
.text-persian-section {
padding: 2em 0;
.section-header {
}
.from,
.persian-text {
font-family: Takrim;
font-weight: 400;
font-size: 18px;
line-height: 30px;
letter-spacing: 0%;
text-align: right;
color: var(--ui-color-two);
}
/* .persian-text {
font-family: Takrim;
font-weight: 400;
font-size: 16px;
@ -331,14 +344,21 @@ const closeModal = () => {
text-align: right;
color: #626b84;
margin-bottom: 0.5em;
}
} */
}
.text-description-section {
padding: 2em 0;
.reference {
padding: 2em 0;
.description-item {
font-family: Takrim;
font-weight: 400;
font-size: 18px;
line-height: 30px;
letter-spacing: 0%;
text-align: right;
color: var(--ui-color-two);
/*
height: 24px;
gap: 4px;
padding-top: 4px;
@ -355,7 +375,7 @@ const closeModal = () => {
line-height: 15px;
letter-spacing: 0%;
text-align: right;
color: #8a92a8;
color: #8a92a8; */
}
}
@ -406,7 +426,7 @@ const closeModal = () => {
line-height: 22.5px;
letter-spacing: 0%;
text-align: right;
color: #1b2132;
color: var(--ui-color-two);
}
.explore-btn {
width: 118;
@ -450,7 +470,7 @@ const closeModal = () => {
line-height: 20px;
letter-spacing: 0%;
text-align: right;
color: #1b2132;
color: var(--ui-color-two);
}
.next-hadith {
font-family: IRANSansX;
@ -459,7 +479,7 @@ const closeModal = () => {
line-height: 20px;
letter-spacing: 0%;
text-align: right;
color: #1b2132;
color: var(--ui-color-two);
}
}
}

View File

@ -1,5 +1,8 @@
<script setup>
import { clearBodyClass } from "@manuals/utilities";
definePageMeta({
layout: false,
});
onMounted(() => {
clearBodyClass();
@ -14,4 +17,4 @@ onUnmounted(() => {
<slot name="named-slot"></slot>
<slot></slot>
</main>
</template>
</template>

View File

@ -1,512 +0,0 @@
<template>
<div class="d-flex flex-column" style="min-height: calc(100dvh - 4em)">
<div class="container-fluid flex-grow-1 d-flex flex-column">
<div class="row">
<div class="col-12 py-3 border-bottom mb-3">
<div class="row">
<div class="col-auto">
<div class="d-flex align-items-center">
<router-link
class="btn btn-primary"
:to="{
name: 'lawDraftList',
}"
>
<svg class="icon icon-forward-2">
<use xlink:href="#icon-forward-2"></use>
</svg>
بازگشت
</router-link>
<div class="d-flex flex-column align-items-start me-2">
<h4 class="m-0">
{{ "ثبت " + draftActiveSchemaGetter?.label }}
</h4>
<p
v-if="draftActiveSchemaGetter?.tabs?.length"
class="text__light text__13 d-none d-md-block mb-0"
>
شما در مرحله ({{
draftActiveSchemaGetter?.tabs[currentStep].title
}})هستید.
</p>
</div>
</div>
</div>
<div class="col" v-if="Boolean(entity?.islock)">
<div class="d-flex">
<div class="alert alert-warning mb-0 py-1" role="alert">
داده جاری به دلیل ثبت نهایی قفل شده است و قابل تغییر نمی باشد.
<button
@click.prevent="unlockLawModal"
class="btn btn-primary me-3"
>
بازکردن کردن قفل
</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 steps-and-prev-next-box">
<div class="row align-items-center">
<div class="col-auto">
<button
@click.prevent="prevStep"
type="button"
class="btn btn-primary"
>
<svg class="icon icon-Component-71--1">
<use xlink:href="#icon-Component-71--1"></use>
</svg>
قبلی
</button>
</div>
<div class="col">
<wizard
:currentStepProp="currentStep"
:steps="draftActiveSchemaGetter?.tabs"
@step-changed="onStepChanged"
></wizard>
<p
v-if="draftActiveSchemaGetter?.tabs?.length"
class="text__light text__13 d-block d-md-none d-flex justify-content-center mt-2"
>
شما در مرحله ({{
draftActiveSchemaGetter?.tabs[currentStep].title
}})هستید.
</p>
</div>
<div class="col-auto">
<button
@click.prevent="nextStep"
type="button"
class="btn btn-primary"
>
<svg class="icon icon-Component-71--1" style="transform: rotate(180deg);">
<use xlink:href="#icon-Component-71--1"></use>
</svg>
بعدی
</button>
</div>
</div>
</div>
</div>
<div class="row flex-grow-1 overflow-auto mt-md-5">
<div class="col">
<component
:key="renderComponent"
:formElements="formElements"
:entity="entity"
:entityProp="entity"
:is="activeComponent"
@saveProperty="saveProperty"
@lock-component="lockComponent"
ref="formRef"
></component>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-12 d-flex justify-content-between border-top mt-2">
<div class="col-auto align-self-end mt-3">
<button
@click.prevent="prevStep"
type="button"
class="btn btn-primary"
>
<svg class="icon icon-Component-71--1">
<use xlink:href="#icon-Component-71--1"></use>
</svg>
قبلی
</button>
</div>
<div class="col-auto align-self-end mt-3">
<button
@click.prevent="nextStep"
type="button"
class="btn btn-primary"
>
<svg class="icon icon-Component-71--2">
<use xlink:href="#icon-Component-71--2"></use>
</svg>
بعدی
</button>
</div>
</div>
</div> -->
</div>
</template>
<script>
import { mapState, mapActions } from "pinia";
import entityApi from "~/apis/entityApi";
import repoApi from "~/apis/repoApi";
export default {
props: {
},
beforeMount() {
this.httpService = new HttpService(import.meta.env.VITE_BASE_URL);
},
mounted() {
let schemaExist = typeof this.draftSchemaGetter == "object";
if (!schemaExist) {
this.getSchemas().then(() => {
this.initData();
});
} else {
this.initData();
}
if (window.outerWidth < 992) {
this.$store.commit("TOGGLE_SIDEBAR_MENU");
}
// setDocumentTitle();
},
data() {
return {
currentStep: 0,
httpService: undefined,
activeComponent: "",
entity: {},
data_changed: {},
renderComponent: 1,
};
},
computed: {
...mapState([
"organNameGetter",
]),
...mapState("entity", [
"draftSchemaGetter",
"draftActiveSchemaGetter",
"draftActiveStepGetter",
]),
...mapState(["isSidebarCollapsed", "currentUser"]),
sidbarMenu() {
if (isMajlesBuild()) return this.sidbarMenuMajles;
else return this.sidbarMenuDefault;
},
formElements() {
if (
this.draftActiveSchemaGetter &&
this.draftActiveSchemaGetter.tabs &&
this.draftActiveSchemaGetter.tabs.length
)
return this.draftActiveSchemaGetter?.tabs[this.currentStep].items;
return [];
},
},
methods: {
...mapActions("entity", [
"SET_ITEM_ENTITY",
"draftSchemaSetter",
"draftActiveSchemaSetter",
"draftActiveStepSetter",
]),
...mapActions(["TOGGLE_PANEL"]),
lockComponent(islock = 1){
this.entity["islock"]=islock;
// console.log(islock)
// console.log(this.entity)
// islock
this.renderComponent++;
},
unlockLawModal() {
const html =
"با این عملیات، شما تمامی داده های مرتبط با این قانون و آثار تنقیحی آن را از مخزن اصلی حذف کرده و به مرحله قبل ثبت نهایی می رسانید. آیا مطئن به حذف داده های مذکور از مخزن اصلی هستید ؟!";
this.mySwalConfirm({
title: "هشدار!!!",
html: html,
icon: "error",
}).then((result) => {
if (result.isConfirmed) {
this.unlockLaw();
}
});
},
async unlockLaw() {
let to_key = this.draftActiveStepGetter?.to_index_key;
let url = "";
url = repoUrl() + repoApi.entity.draftUnlock;
url = url.replace("{{appname}}", buildName());
url = url.replace("{{index_key}}", this.draftActiveStepGetter.key);
url = url.replace("{{entity_id}}", this.entity?._id);
url = url.replace("{{to_index_key}}", to_key);
return await this.httpService
.postRequest(url, {})
.then((res) => {
this.entity = res._source;
this.entity["_id"] = res._id;
this.entity["id"] = res._id;
this.renderComponent++;
this.mySwalToast({
html: res?.message ?? "با موفقیت عملیات انجام شد .",
});
})
.catch((err) => {
this.fetchingData = false;
return err;
});
},
initData() {
let ativeSchema = this.draftSchemaGetter.find(
(item) => item.key == "new"
);
this.draftActiveSchemaSetter(ativeSchema);
this.draftActiveStepSetter(ativeSchema.tabs[this.currentStep]);
this.getEntityInfo();
},
// /**
// * دریافت اطلاعات موجودیت بر اساس نوع و شناسه آن.
// * @param {String} _entityType - نوع موجودیت.
// * @param {String} _entityId - شناسه موجودیت.
// */
getEntityInfo() {
if (this.fetchingData) return;
this.fetchingData = true;
let id = this.$route.params?.id;
if (!id) {
this.entity = {};
this.currentStep = 0;
this.fetchingData = false;
this.onStepChanged(
this.draftActiveSchemaGetter?.tabs[this.currentStep]
);
this.renderComponent++;
return;
}
// let key = this.$route.params.key;
let key = this.draftActiveSchemaGetter?.index_key;
let url = repoUrl() + repoApi.public.get;
url = url.replace("{{index_key}}", key);
url = url.replace("{{entity_id}}", id);
this.httpService.getRequest(url).then((res) => {
this.entity = res._source;
this.entity["_id"] = res._id;
this.entity["id"] = res._id;
this.currentStep = this.entity.step;
this.fetchingData = false;
this.onStepChanged(
this.draftActiveSchemaGetter?.tabs[this.currentStep]
);
this.renderComponent++;
});
},
async saveProperty() {
if (this.fetchingData) return;
this.fetchingData = true;
let dataChanged = {};
if (!this.$refs.formRef?.isChanged())
dataChanged["step"] = this.currentStep;
else {
dataChanged = this.$refs.formRef.formData;
dataChanged["step"] = this.currentStep;
}
// اگر تغییری نداشته باشیم، meta به صورت "{}" خواهد بود.
if (!dataChanged && !JSON.stringify(dataChanged).length > 2) return;
let id = this.$route.params.id ?? this.entity._id;
// if (this.$route.params.id) {
// id = this.$route.params.id ?? undefined;
// } else id = this.entity._id ?? undefined;
let url = "";
if (id) {
url = repoUrl() + repoApi.public.updateEntity;
url = url.replace("{{id}}", id);
} else {
url = repoUrl() + repoApi.public.addEntity;
// let r = Math.random() * (99);
// id = "df" + new Date().toLocaleDateString("fa-IR") + r
}
let key = this.draftActiveSchemaGetter?.index_key;
url = url.replace("{{index_key}}", key);
let formData = dataChanged;
return await this.httpService
.postRequest(url, formData)
.then((res) => {
this.entity = res._source;
this.entity["_id"] = res._id;
this.entity["id"] = res._id;
this.mySwalToast({
html: res?.message ?? "با موفقیت ثبت شد.",
});
this.fetchingData = false;
return true;
})
.catch((err) => {
this.fetchingData = false;
return err;
});
},
nextStep() {
let step = this.currentStep + 1;
if (step >= this.draftActiveSchemaGetter?.tabs.length) return;
if (!this.draftActiveSchemaGetter?.tabs[step]) return;
if (this.currentStep == 1) {
this.$refs.formRef?.setLastChangedData();
}
if (
this.$refs.formRef?.isChanged() &&
this.currentStep != 2 &&
this.currentStep < this.entity.step
) {
this.mySwalConfirm({
title: "هشدار!!!",
html: `با تغییراتی که در اطلاعات این مرحله دادید، چنانچه در مراحل بعدی قبلا تغییر داشتید ، ممکن است از دست برود `,
icon: "warning",
}).then((result) => {
if (result.isConfirmed) {
this.currentStep = step;
this.saveProperty().then(() => {
this.onStepChanged(this.draftActiveSchemaGetter?.tabs[step]);
});
}
});
} else {
this.currentStep = step;
this.saveProperty().then(() => {
this.onStepChanged(this.draftActiveSchemaGetter?.tabs[step]);
});
}
},
prevStep() {
let step = this.currentStep - 1;
if (step < 0) return;
if (this.draftActiveSchemaGetter?.tabs[step])
this.onStepChanged(this.draftActiveSchemaGetter?.tabs[step]);
},
onStepChanged(stepItem) {
console.log(stepItem)
if (!stepItem) return;
this.activeComponent = stepItem.componentName;
this.currentStep = stepItem.step;
this.draftActiveStepSetter(stepItem);
},
/**
* دریافت اطلاعات schema.
*/
async getSchemas() {
let url = repoUrl() + entityApi.schema.list;
return await this.httpService
.postRequest(url, {
organ: this.organNameGetter,
system: "edit",
})
.then((response) => {
// console.log(response.data.edit);
this.draftSchemaSetter(response.data.edit);
let sch = response.data.edit.find((item) => item.key == "new");
if (sch) this.draftActiveSchemaSetter(sch);
// this.draftActiveSchemaSetter(response.data.edit[0]);
})
},
/**
* تغییر وضعیت نمایش منوی سایدبار.
*/
toggleSidebarMenu() {
this.$store.commit("TOGGLE_SIDEBAR_MENU");
},
},
};
</script>
<style scoped lang="scss">
.nav-tabs-container {
display: flex;
justify-content: center;
}
.filter-list-container {
// padding-top: 0.5em;
// // position: fixed;
// z-index: 9;
// width: 20em;
height: 100dvh;
.main-filter {
display: none;
}
.mobile-mode {
display: flex;
justify-content: flex-end;
.btn {
border-radius: 50%;
// font-size: 0.7rem;
width: 2.5em;
height: 2.5em;
box-shadow: 0px 0px 7px 1px #eee;
display: flex;
justify-content: center;
align-items: center;
transform: translateX(1.5em);
background-color: #eee;
&:hover {
filter: brightness(0.8);
}
}
}
&.expanded {
top: 0;
bottom: 0;
background: #fff;
justify-content: center;
box-shadow: -1px 0px 7px 1px #eee;
width: 20em;
.main-filter {
display: block;
}
}
}
.main-filter {
padding: 0 1em;
overflow: auto;
}
.component_page {
height: calc(100dvh - 11em);
overflow: auto;
padding-left: 1em;
overflow-x: hidden;
}
.steps-and-prev-next-box {
padding: 1em 1em 2.5em 1em;
box-shadow: 0px 5px 8px 4px #eee;
border-radius: 1em;
}
</style>

View File

@ -1,327 +0,0 @@
<template>
<div class="row">
<div class="col-12 py-3">
<div class="d-flex align-items-center">
<div class="col">
<h3 class="m-0">
{{ activeSchemaGetter?.label }}
</h3>
</div>
<div class="col-auto">
<router-link
class="btn btn-primary"
:to="{
name: 'addDraft',
key: activeSchemaGetter?.index_key,
}"
>
<svg class="icon icon-Component-133--1">
<use xlink:href="#icon-Component-133--1"></use>
</svg>
جدید
</router-link>
</div>
</div>
</div>
<div class="col-12">
<my-table
:hasSearch="false"
:fetchingData="fetchingData"
:items="listDrafts"
:tableActions="tableActions"
:tableColumns="activeSchemaGetter?.table_columns"
:paginationInfo="pagination"
:sortingInfo="sorting"
@edit-table-item="onEditTableItem"
@delete-table-item="onDeleteTableItem"
@on-linked-title-click="onLinkedTitleClick"
/>
</div>
</div>
</template>
<script>
import sidbarMenuDefault from "~/json/entity/json/entityMenu.json";
import sidbarMenuMajles from "~/json/entity/json/entityMenuMajles.json";
import { mapState, mapActions } from "pinia";
// import entityViewMixin from "~/entity/mixins/entityViewMixin.js";
import entityApi from "~/apis/entityApi";
import repoApi from "~/apis/repoApi";
import searchApi from "~/apis/searchApi";
/**
* @vue-data {String} [readingMode="false"] - حالت مطالعه
*/
export default {
beforeMount() {
this.httpService = new HttpService(import.meta.env.VITE_BASE_URL);
},
mounted() {
let schemaExist = typeof this.draftSchemaGetter == "object";
if (!schemaExist) {
this.getSchemas().then(() => {
this.initData();
});
} else {
this.initData();
}
if (window.outerWidth < 992) {
this.$store.commit("TOGGLE_SIDEBAR_MENU");
}
// setDocumentTitle();
},
data() {
return {
tableActions: [
{
showOutside: true,
show: true,
icon: "tavasi tavasi-Component-242--1",
title: "ویرایش",
to: {
name: "undefined",
},
selected: false,
disabled: false,
howToOpen: "",
href: "",
class: "edit-btn",
action: "edit-table-item",
// can: "subject-",
},
{
showOutside: true,
show: true,
icon: "tavasi tavasi-Component-295--1",
title: "حذف",
to: {
name: "undefined",
},
selected: false,
disabled: false,
howToOpen: "",
href: "",
class: "delete-btn",
action: "delete-table-item",
},
],
pagination: {
pages: 0,
total: 0,
page: 1,
offset: 0,
limit: 10,
},
sorting: {
sortby: "created",
sortorder: undefined, // asc | desc | none
},
listDrafts: [],
currentDraft: {},
activeSchemaGetter: [],
httpService: undefined,
fetchingData: false,
sidbarMenuDefault: sidbarMenuDefault,
sidbarMenuMajles: sidbarMenuMajles,
};
},
computed: {
...mapState("entity", ["draftSchemaGetter"]),
...mapState(["isSidebarCollapsed", "currentUser"]),
sidbarMenu() {
if (isMajlesBuild()) return this.sidbarMenuMajles;
else return this.sidbarMenuDefault;
},
},
methods: {
...mapActions("entity", [
"SET_ITEM_ENTITY",
"draftSchemaSetter",
"draftActiveSchemaSetter",
"draftActiveStepSetter",
]),
...mapActions(["TOGGLE_PANEL"]),
initData() {
this.setActiveSchema();
this.getDrafts();
},
setActiveSchema() {
this.activeSchemaGetter = [];
this.activeSchemaGetter = this.draftSchemaGetter.find(
(item) => item.key == "list"
);
},
async getSchemas() {
let url = repoUrl() + entityApi.schema.list;
return await this.httpService
.postRequest(url, {
organ: "majles",
system: "edit",
})
.then((response) => {
// console.log(response.data.edit);
this.draftSchemaSetter(response.data.edit);
let sch = response.data.edit.find((item) => item.key == "list");
if (sch) this.draftActiveSchemaSetter(sch);
})
},
getDrafts() {
if (this.fetchingData) return;
this.fetchingData = true;
let url = repoUrl() + repoApi.entity.draftList;
let key = this.activeSchemaGetter?.index_key ?? "dfqanon";
url = url.replace("{{appname}}", buildName());
url = url.replace("{{index_key}}", key);
url = url.replace("{{sortKey}}", "lasttitle");
url = url.replace("/{{filter}}", "");
url = url.replace("{{offset}}", this.pagination.offset);
url = url.replace("{{limit}}", this.pagination.limit);
this.httpService.getRequest(url).then((res) => {
this.listDrafts = res.hits.hits ?? [];
const total = res.hits.total.value;
const pages = Math.ceil(total / this.pagination.limit);
const pagination = {
total: total,
pages: pages == 0 ? 1 : pages,
};
this.pagination = { ...this.pagination, ...pagination };
this.fetchingData = false;
});
},
deleteEntity(index) {
if (index < 0 || index >= this.listDrafts.length) return;
this.currentDraft = this.listDrafts[index];
if (!this.currentDraft || !this.currentDraft._id) return;
let key = this.activeSchemaGetter?.index_key ?? "dfqanon";
let url = repoUrl() + repoApi.entity.delete;
url = url.replace("{{index_key}}", key);
url = url.replace("{{entity_id}}", this.currentDraft._id);
this.httpService
.postRequest(url)
.then((res) => {
this.listDrafts = this.listDrafts.slice(index, 1);
this.mySwalToast({
html: res.data.message,
icon: "success",
});
// this.getListSpecial(this.entity_type, this.listType);
// this.updateListSpecial()
})
.catch((err) => {
// this.mySwalToast({
// title: "خطا!!!",
// html: err.message,
// icon: "error",
// });
});
},
onLinkedTitleClick(data) {
this.activeRowItem = data.rowItem;
// let index = data.index;
// let item = this.listDrafts[index];
this.$router.push({
name: "editDraft",
params: {
id: this.activeRowItem._id,
key: this.activeSchemaGetter?.index_key,
},
});
},
onEditTableItem(index) {
if (index < 0 || index >= this.listDrafts.length) return;
this.currentDraft = this.listDrafts[index];
this.$router.push({
name: "editDraft",
params: {
id: this.currentDraft._id,
key: this.activeSchemaGetter?.index_key,
},
});
},
onDeleteTableItem(index) {
if (index < 0 || index >= this.listDrafts.length) return;
this.currentDraft = this.listDrafts[index];
if (this.currentDraft?._source?.islock) {
this.mySwalToast({
title: "ممنوع!!!",
html: "این مورد بخاطر ثبت نهایی قفل شده است و امکان حذف ندارد",
icon: "error",
});
return;
}
this.mySwalConfirm({
title: "هشدار!!!",
html: `از حذف اطلاعات جاری اطمینان دارید؟ `,
icon: "warning",
}).then((result) => {
if (result.isConfirmed) {
this.deleteEntity(index);
}
});
},
/**
* تغییر وضعیت نمایش منوی سایدبار.
*/
toggleSidebarMenu() {
this.$store.commit("TOGGLE_SIDEBAR_MENU");
},
resetPagination() {
this.pagination = {
pages: 0,
total: 0,
page: 0,
offset: 0,
limit: 10,
};
},
pageLimitChanged(paging) {
this.resetPagination();
this.pagination.limit = paging.limit;
},
pageChanged(paging) {
let page = paging.pageNumber;
page -= 1;
this.pagination.offset = this.pagination.page * paging.limit;
this.pagination.limit = paging.limit;
this.pagination.page = paging.pageNumber;
},
sortChanged(sorting) {
this.resetPagination();
this.sorting = sorting;
},
},
};
</script>
<style scoped lang="scss"></style>

View File

@ -1,393 +0,0 @@
<template>
<div class="wrapper">
<the-sidebar
:showUserAvatar="!isMajlesBuild"
:menu="sidbarMenu"
class="hiddens"
></the-sidebar>
<main>
<header>
<div class="logo-and-dropdown">
<img :src="logoPhoto()" alt="" class="logo" />
</div>
<div class="avatar">
<user-avatar-dropdown class="nav-item rounded-circle">
<router-link :to="{ name: 'searchAbout' }" class="dropdown-item"
>درباره ما</router-link
>
<router-link :to="{ name: 'searchConnect' }" class="dropdown-item"
>تماس با ما</router-link
>
</user-avatar-dropdown>
</div>
</header>
<div class="dropdown mb-3 mt-2">
<div class="dropdown me-auto text__13 sortlist" ref="dropdownSortlist">
<button
class="btn dropdown-toggle"
type="button"
data-bs-toggle="dropdown"
aria-expanded="false"
>
<span style="color: #adbec4"> افزودن مورد جدید:&nbsp;&nbsp; </span>
<span> {{ titleSelected }}</span>
</button>
<div class="dropdown-menu">
<button
class="dropdown-item text__13"
v-for="(item, index) in schemasGetter"
@click.prevent="setItemDropdown(item, item.label)"
:key="index"
>
{{ item.label }}
</button>
</div>
</div>
</div>
<section class="mt-3">
<div>
<div class="accordion" id="accordionExample">
<div
class="card rounded-0"
v-for="(innerGroupItem, j) in activeSchemaGetter?.property"
:key="j"
>
<div class="card-header" :id="'heading' + j" style="height: 4em">
<div class="d-flex justify-content-between">
<p style="font-size: 12px; color: black">
{{ innerGroupItem.title }}
</p>
<button
class="btn btn-link btn-block text-end collapsed button-meno"
type="button"
data-bs-toggle="collapse"
:data-bs-target="'#collapse' + j"
aria-expanded="false"
:aria-controls="'collapse' + j"
>
<span class="tavasi tavasi-Component-358--1"></span>
</button>
</div>
</div>
<div
:id="'collapse' + j"
class="collapse"
:class="{ show: 'collapse' + j == 'collapse0' }"
:aria-labelledby="'heading' + j"
data-parent="#accordionExample"
>
<div class="card-body">
<form>
<component
v-for="(formElement, index) in innerGroupItem.items"
:key="index"
:formElement="formElement"
:inputClass="handlerInputClass(formElement)"
:labelClass="'col-md-3'"
:rows="formElement.rows"
:is="
returnComponentName(innerGroupItem, formElement.type)
"
@take-value="saveComponentValue($event, formElement)"
@keydown="saveKeydown($event)"
class="component"
></component>
<div
class=""
style="
position: relative;
display: flex;
justify-content: flex-end;
"
>
<button
type="submit"
class="btn btn-primary"
style="font-size: 11px"
v-can="innerGroupItem.key + '_edit'"
@click.prevent="addNewEntity(activeSchemaGetter)"
>
ثبت
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
</div>
</template>
<script>
import { mapState, mapActions } from "pinia";
import sidbarMenu from "~/pages/search/json/menu.json";
import newEntityBuilder from "~/pages/search/json/newEntityBuilder.json";
import searchApi from "~/apis/searchApi";
import { useStorage } from "@vueuse/core";
export default {
mounted() {
this.titleSelected = this.activeSchemaGetter.label;
},
watch: {
$route: {
handler: function (to, from) {
console.log("to", to);
console.log("from", from);
},
},
},
data() {
return {
sidbarMenu: sidbarMenu,
newEntityBuilder: newEntityBuilder,
listUpdatedText: {},
titleSelected: "",
newEntityId: undefined,
};
},
computed: {
...mapState({
organNameGetter: "organNameGetter",
schemasGetter: "schemasGetter",
activeSchemaGetter: "activeSchemaGetter",
}),
},
methods: {
...mapActions(["schemasSetter", "activeSchemaSetter"]),
returnComponentName(innerGroupItem, type) {
if (type == "textarea") return "TextareaComponent";
else if (type == "select") return "SelectComponent";
else if (type == "date") return "DateComponent";
else return "InputComponent";
},
saveComponentValue(value, formElement) {
// console.log("🚀 ~ saveComponentValue ~ formElement:", formElement);
// console.log("🚀 ~ saveComponentValue ~ value:", value);
//در صورت تغییر نگهداری می شود تا وقتی کلید ثبت زد، ذخیره شود
// if (this.activeSchemaGetter[formElement.key] != value) {
// this.listUpdatedText[formElement.key] = value;
// }
if (value !== "") {
this.listUpdatedText[formElement.key] = value;
}
},
async getSchemas() {
try {
const { $api } = useNuxtApp();
const res = await $api(searchApi.schema.list, {
baseURL: repoUrl(),
method: "POST",
body: {
organ: this.organNameGetter,
system: "entityCreate",
build_state: buildState(),
},
});
let newEntitySchema = useStorage("newEntitySchema", undefined);
newEntitySchema.value = response.data.entityCreate;
this.schemasSetter(response.data.entityCreate);
let activeSchema = response.data.entityCreate[0];
this.activeSchemaSetter(activeSchema);
let activeNewEntitySchema = useStorage("activeNewEntitySchema", undefined);
activeNewEntitySchema.value = activeSchema;
} catch (err) {
this.fetchingData = false;
}
},
setItemDropdown(item, title) {
this.titleSelected = title;
this.activeSchemaSetter(item);
console.log("item", item);
},
handlerInputClass(item) {
if (item.type == "textarea") {
return "col-md-12";
} else if (item.type == "date" || item.type == "select") {
return "col-md-3";
} else {
return "col-md-8";
}
// console.log(item);
},
async addNewEntity(item) {
if (this.newEntityId !== undefined) {
this.updateNewEntity(item);
} else {
let url = searchApi.newEntity.add;
url = url.replace("{{index_key}}", item.key);
const formData = {
meta: JSON.stringify(this.listUpdatedText),
};
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: repoUrl(),
method: "POST",
body: formData,
});
this.newEntityId = res._id;
} catch (err) {
this.fetchingData = false;
}
}
},
async updateNewEntity(item) {
let url = searchApi.newEntity.update;
url = url.replace("{{index_key}}", item.key);
url = url.replace("{{id}}", this.newEntityId);
const formData = {
meta: JSON.stringify(this.listUpdatedText),
};
try {
const { $api } = useNuxtApp();
const res = await $api(url, {
baseURL: repoUrl(),
method: "POST",
body: formData,
});
} catch (err) {
this.fetchingData = false;
}
},
},
};
</script>
<style lang="scss">
main {
// background-color: red;
margin-right: 6em;
height: 100dvh;
header {
height: 6em;
// background-color: green;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #a7a098;
.logo-and-dropdown {
display: flex;
align-items: center;
justify-content: flex-start;
.dropdown {
margin-right: 2em;
}
.logo {
width: 40%;
}
}
}
section {
height: calc(100dvh - 10em);
overflow: auto;
// background-color: aqua;
}
}
.button-meno {
font-size: 12px;
transform: rotate(90deg);
width: 10px;
height: 10px;
margin-top: 15px;
text-decoration: none;
span:hover {
color: #00b6e3;
}
}
// .select-text {
// text-align: right;
// background-color: #fff;
// font-size: 14px;
// border-radius: 8px;
// border-color: #f1f1f1;
// padding: 6px;
// &:hover {
// border-color: #afbac6;
// }
// }
.component {
input {
border-radius: 0.5rem;
border-color: var(--primary-color);
font-size: 14px;
// color: #afbac6;
&:focus {
border-color: var(--primary-color);
}
}
label {
font-size: 15px;
&:focus {
border-color: var(--primary-color);
}
}
select {
border-radius: 0.5rem;
border-color: var(--primary-color);
font-size: 14px;
// color: #afbac6;
&:focus {
border-color: var(--primary-color);
}
}
textarea {
border-radius: 0.5rem;
border-color: var(--primary-color);
padding: 1em;
&:focus {
border-color: var(--primary-color);
}
}
}
.accordion {
margin: 0 4em;
}
@media (max-width: 575.98px) {
main {
margin-right: 0;
header {
.logo-and-dropdown {
.logo {
display: none;
}
}
}
}
}
@media only screen and (min-width: 576px) and (max-width: 767.98px) {
main {
margin-right: 0;
header {
.logo-and-dropdown {
.logo {
display: none;
}
}
}
}
}
@media only screen and (min-width: 768px) and (max-width: 991.98px) {
main {
margin-right: 5em;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199.98px) {
main {
margin-right: 5em;
}
}
@media (min-width: 1200px) {
}
</style>

View File

@ -1,389 +0,0 @@
<!-- برای نمایش یک جزء از قانون استفاده می شود -->
<!-- don't change the class: problem-section__content,
otherwise the remove link will not work. -->
<template>
<main class="main" id="top">
<the-sidebar
:showUserAvatar="!isMajlesBuild"
:menu="sidbarMenu"
></the-sidebar>
<section
class="main-page__content"
:class="{ expanded: !isSidebarCollapsed }"
>
<div class="container-fluid">
<div
:class="buildName + '-header-color'"
class="row align-items-center"
>
<div class="col col-lg-auto order-1">
<div class="d-flex align-items-center">
<button
name="button"
type="button"
class="toggle-mobile-nav dropdown-hamburger d-md-none"
@click.prevent="toggleSidebarMenu()"
>
<span class="sr-only">باز کردن منوی کنار</span>
<svg class="s18" data-testid="sidebar-icon">
<use href="assets/common/img/icons.svg#sidebar"></use>
</svg>
</button>
<router-link
:to="{
name: 'defaultRoute',
}"
classes="btn me-3"
>
<img
:src="logoPhoto()"
:alt="appLongTitle"
class="img-fluid logo"
style="max-width: 2.5em"
/>
</router-link>
</div>
<!-- <div
class="d-flex align-items-center"
v-if="navigateChartSchemaGetter?.length"
>
<label for="repositories-desktop" class="ms-2 no-wrap">
بانک داده
</label>
<multiselect
:allow-empty="false"
:searchable="true"
:close-on-select="true"
:show-labels="false"
label="label"
track-by="key"
placeholder="انتخاب فهرست"
:value="selectedNavigation"
:options="navigateChartSchemaGetter"
@select="onSelectNavigation"
:hide-selected="false"
:max-height="200"
id="repositories-desktop"
>
</multiselect>
</div> -->
</div>
<div class="col-12 col-lg order-3 order-lg-2">
<div class="nav-tabs-container nav-tabs">
<ul v-if="navList" class="nav">
<li
class="nav-item desktop"
v-for="(navItem, index) in navList"
:key="index"
>
<button
:title="navItem.title"
type="button"
class="btn nav-link"
@click.prevent="setActiveTab(navItem)"
:class="{
active: activeTabGetter?.key == navItem.key,
}"
>
{{ navItem.title }}
</button>
</li>
<li
class="nav-item mobile tabs-more-btn d-lg-none"
v-if="navList?.length > 2"
>
<div class="dropdown">
<button
class="btn"
type="button"
id="dropdownMenuButton"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<svg class="icon icon-Component-81--1">
<use xlink:href="#icon-Component-81--1"></use>
</svg>
</button>
<div
class="dropdown-menu"
aria-labelledby="dropdownMenuButton"
>
<!-- v-if="canSee(navItem.key + '_view') && index > 2" -->
<a
class="dropdown-item"
href="#"
v-for="(navItem, index) in navList"
:key="index"
@click.prevent="setActiveTab(navItem)"
:class="{
active: activeTabGetter?.key == navItem.key,
}"
v-if="index > 2"
>{{ navItem.title }}</a
>
</div>
</div>
</li>
</ul>
</div>
<!-- <div
class="d-flex pt-2"
v-if="activeNavigateChartSchemaGetter?.info?.items"
>
<div class="ms-2">
<multiselect
:searchable="true"
:close-on-select="true"
:show-labels="false"
label="title"
track-by="name"
placeholder="انتخاب فیلتر"
v-model="
schemaFilters[activeNavigateChartSchemaGetter?.key]
"
:options="activeNavigateChartSchemaGetter?.info?.items"
@select="onComboChanged()"
@remove="onComboChanged()"
:hide-selected="false"
:max-height="200"
openDirection="rtl"
>
<span slot="noResult">موردی پیدا نشد.</span>
</multiselect>
</div>
</div> -->
</div>
<div
v-if="!isMajlesBuild"
class="col-auto col-lg-auto order-2 order-lg-3"
>
<user-avatar-dropdown
style="position: static"
class="user-avatar-component"
></user-avatar-dropdown>
</div>
</div>
<div class="row mx-2">
<div class="col-12">
<component
v-if="mainComponentName"
:key="renderId"
:propText="mainComponentName"
:is="mainComponentName"
:slug="slug"
:schemaItems="tabSchemaItems"
:routeEntityid="myEntityid"
@changeEntityid="changeEntityid"
></component>
</div>
</div>
</div>
</section>
</main>
</template>
<script>
import sidbarMenuDefault from "~/json/entity/json/detailMenu.json";
import sidbarMenuMajles from "~/json/entity/json/detailMenuMajles.json";
import { mapActions, mapState } from "pinia";
import entityApi from "~/apis/entityApi";
import { useStorage } from "@vueuse/core";
export default {
name:'detail',
props: {
slug: {
default: "mqsection",
},
},
beforeMount() {
this.httpService = new HttpService(import.meta.env.VITE_REPO_BASE_URL);
},
mounted() {
this.getSchemas();
if (this.activeEntityViewSchemaGetter?.tabs) this.setActiveTab();
this.myEntityid =
this.myEntityid == "" ? this.$route.params?.id : this.myEntityid;
},
data() {
return {
sidbarMenuDefault: sidbarMenuDefault,
sidbarMenuMajles: sidbarMenuMajles,
myEntityid: "",
renderId: 1,
mainComponentName: null,
tabSchemaItems: undefined,
};
},
computed: {
...mapState("entity", [
"selectedItemEntityGetter",
"entityViewSchemaGetter",
"activeEntityViewSchemaGetter",
"activeTabGetter",
]),
...mapState(["organNameGetter"]),
...mapState(["isSidebarCollapsed"]),
sidbarMenu() {
if (isMajlesBuild()) return this.sidbarMenuMajles;
else return this.sidbarMenuDefault;
},
navList() {
if (!isMajlesBuild()) return this.activeEntityViewSchemaGetter?.tabs;
if (this.activeEntityViewSchemaGetter?.tabs)
return this.activeEntityViewSchemaGetter?.tabs.slice(
0,
this.activeEntityViewSchemaGetter.tabs.length - 1
);
else return [];
},
},
methods: {
...mapActions("entity", [
"activeEntityViewSchemaSetter",
"entityViewSchemaSetter",
"activeTabSetter",
]),
...mapActions(["checkPermissions"]),
changeEntityid(newEntityid) {
this.myEntityid = newEntityid;
// this.renderId++;
},
getSchemas() {
let localStoageSchema = useStorage("qaSchema", undefined).value;
if (localStoageSchema) {
let schema = JSON.parse(localStoageSchema);
this.activeEntityViewSchemaSetter(schema);
this.setActiveTab();
return;
}
this.httpService
.postRequest(entityApi.schema.list, {
organ: this.organNameGetter,
system: "entityView",
build_state: buildState(),
})
.then((response) => {
// console.log(response);
const routeParamsKey = this.$route.params.key;
let schemaBasedOnRouteKeyIndex = response.data.entityView.findIndex(
(item) => item.key == routeParamsKey
);
schemaBasedOnRouteKeyIndex =
schemaBasedOnRouteKeyIndex == -1 ? 0 : schemaBasedOnRouteKeyIndex;
this.entityViewSchemaSetter(response.data.entityView);
this.activeEntityViewSchemaSetter(
response.data.entityView[schemaBasedOnRouteKeyIndex]
);
this.setActiveTab();
// this.activeTabSetter(
// response.data.entityView[schemaBasedOnRouteKeyIndex].tabs[0]
// );
// this.updateMainContent();
});
},
setActiveTab(tab = undefined) {
if (!tab) {
if (this.$route?.hash) {
let hash = this.$route?.hash.replace("#", "");
console.log(hash);
let index = this.activeEntityViewSchemaGetter?.tabs.findIndex(
(item) => item.key == hash
);
if (index != -1) tab = this.activeEntityViewSchemaGetter?.tabs[index];
} else tab = this.activeEntityViewSchemaGetter?.tabs[0];
}
if (!tab) return;
this.renderId++;
this.activeTabSetter(tab);
this.tabSchemaItems = undefined;
this.mainComponentName = "EntityQSection";
this.tabSchemaItems = tab.items
? tab.items
: this.activeEntityViewSchemaGetter.items;
if (tab.componentName) {
this.mainComponentName = tab.componentName;
}
// if (tab?.key == "content") {
// this.mainComponentName = "EntityQSection";
// this.tabSchemaItems = tab.items
// ? tab.items
// : this.activeEntityViewSchemaGetter.items;
// }
// if (tab?.key == "qmodel") {
// this.mainComponentName = "EntityQModel";
// this.tabSchemaItems = tab.items
// ? tab.items
// : this.activeEntityViewSchemaGetter.items;
// }
// if (tab?.key == "graph") {
// this.mainComponentName = "ChartGraph";
// }
},
},
};
</script>
<style scoped lang="scss">
.show-reports-button {
opacity: 0.6;
color: #92a2b2;
}
.problem-detail {
width: 98% !important;
margin: 0 !important;
}
.text-title-QSection1 {
color: #00abff !important;
&:hover {
// color: blue !important;
text-decoration: underline !important;
}
}
.text-title-nextItem {
color: #00abff !important;
&:hover {
color: #0575ad !important;
}
}
.text-title-prevItem {
color: #00abff !important;
&:hover {
color: #0575ad !important;
}
}
.text-title-QSection2 {
color: #00abff !important;
&:hover {
// color: blue !important;
text-decoration: underline !important;
}
}
.nav-tabs-container {
display: flex;
justify-content: center;
}
</style>

View File

@ -1,354 +0,0 @@
<!-- برای نمایش یک جزء از قانون استفاده می شود -->
<!-- don't change the class: problem-section__content,
otherwise the remove link will not work. -->
<template>
<main class="main" id="top">
<the-sidebar
:showUserAvatar="!isMajlesBuild"
:menu="sidbarMenu"
></the-sidebar>
<section
class="main-page__content"
:class="{ expanded: !isSidebarCollapsed }"
>
<div class="container-fluid">
<div
:class="buildName + '-header-color'"
class="row align-items-center"
>
<div class="col col-lg-auto order-1">
<div class="d-flex align-items-center">
<button
name="button"
type="button"
class="toggle-mobile-nav dropdown-hamburger d-md-none"
@click.prevent="toggleSidebarMenu()"
>
<span class="sr-only">باز کردن منوی کنار</span>
<svg class="s18" data-testid="sidebar-icon">
<use href="assets/common/img/icons.svg#sidebar"></use>
</svg>
</button>
<router-link
:to="{
name: 'defaultRoute',
}"
classes="btn me-3"
>
<img
:src="logoPhoto()"
:alt="appLongTitle"
class="img-fluid logo"
style="max-width: 2.5em"
/>
</router-link>
</div>
<!-- <div
class="d-flex align-items-center"
v-if="navigateChartSchemaGetter?.length"
>
<label for="repositories-desktop" class="ms-2 no-wrap">
بانک داده
</label>
<multiselect
:allow-empty="false"
:searchable="true"
:close-on-select="true"
:show-labels="false"
label="label"
track-by="key"
placeholder="انتخاب فهرست"
:value="selectedNavigation"
:options="navigateChartSchemaGetter"
@select="onSelectNavigation"
:hide-selected="false"
:max-height="200"
id="repositories-desktop"
>
</multiselect>
</div> -->
</div>
<div class="col-12 col-lg order-3 order-lg-2">
<div class="nav-tabs-container nav-tabs">
<ul v-if="navList" class="nav">
<li
class="nav-item desktop"
v-for="(navItem, index) in navList"
:key="index"
>
<button
:title="navItem.title"
type="button"
class="btn nav-link"
@click.prevent="setActiveTab(navItem)"
:class="{
active: qruleActiveTabGetter?.key == navItem.key,
}"
>
{{ navItem.title }}
</button>
</li>
<li
class="nav-item mobile tabs-more-btn d-lg-none"
v-if="navList?.length > 2"
>
<div class="dropdown">
<button
class="btn"
type="button"
id="dropdownMenuButton"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<svg class="icon icon-Component-81--1">
<use xlink:href="#icon-Component-81--1"></use>
</svg>
</button>
<div
class="dropdown-menu"
aria-labelledby="dropdownMenuButton"
>
<!-- v-if="canSee(navItem.key + '_view') && index > 2" -->
<a
class="dropdown-item"
href="#"
v-for="(navItem, index) in navList"
:key="index"
@click.prevent="setActiveTab(navItem)"
:class="{
active: qruleActiveTabGetter?.key == navItem.key,
}"
v-if="index > 2"
>{{ navItem.title }}</a
>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="row mx-2">
<div class="col-12">
<component
v-if="mainComponentName"
:key="renderId"
:propText="mainComponentName"
:is="mainComponentName"
:slug="slug"
:schemaItems="tabSchemaItems"
:routeEntityid="myEntityid"
@changeEntityid="changeEntityid"
@set-active-tab="setActiveTab"
></component>
</div>
</div>
</div>
</section>
</main>
</template>
<script>
import sidbarMenuDefault from "~/json/entity/json/detailMenu.json";
import sidbarMenuMajles from "~/json/entity/json/detailMenuMajles.json";
import { mapActions, mapState } from "pinia";
import entityApi from "~/apis/entityApi";
import { useStorage } from "@vueuse/core";
export default {
name:'qrule',
props: {
slug: {
default: "qmodel",
},
},
beforeMount() {
this.httpService = new HttpService(import.meta.env.VITE_REPO_BASE_URL);
},
mounted() {
this.getSchemas();
if (this.qruleActiveSchemaGetter?.tabs)
this.setActiveTab(this.qruleActiveSchemaGetter?.tabs[0]);
// if (this.qruleSchemaGetter) {
// let qModelRuleIndex = this.qruleSchemaGetter.findIndex(
// (item) => item.key == "qmodelrule"
// );
// this.setActiveTab(this.qruleSchemaGetter[qModelRuleIndex]?.tabs[0]);
// }
this.myEntityid =
this.myEntityid == "" ? this.$route.params?.id : this.myEntityid;
},
data() {
return {
sidbarMenuDefault: sidbarMenuDefault,
sidbarMenuMajles: sidbarMenuMajles,
myEntityid: "",
renderId: 1,
mainComponentName: null,
tabSchemaItems: undefined,
};
},
computed: {
...mapState("entity", [
"selectedItemEntityGetter",
"qruleSchemaGetter",
"qruleActiveSchemaGetter",
"qruleActiveTabGetter",
"breadCrumbGetter",
]),
...mapState(["organNameGetter"]),
...mapState(["isSidebarCollapsed"]),
sidbarMenu() {
if (isMajlesBuild()) return this.sidbarMenuMajles;
else return this.sidbarMenuDefault;
},
navList() {
if (!isMajlesBuild()) return this.qruleActiveSchemaGetter?.tabs;
if (this.qruleActiveSchemaGetter?.tabs)
return this.qruleActiveSchemaGetter?.tabs.slice(
0,
this.qruleActiveSchemaGetter.tabs.length - 1
);
else return [];
},
},
methods: {
...mapActions("entity", [
"qruleActiveSchemaSetter",
"qruleSchemaSetter",
"qruleActiveTabSetter",
"breadCrumbSetter",
]),
...mapActions(["checkPermissions"]),
changeEntityid(newEntityid) {
this.myEntityid = newEntityid;
// this.renderId++;
},
getSchemas() {
let localStoageSchema = useStorage("qaSchema",undefined).value;
if (localStoageSchema) {
let schema = JSON.parse(localStoageSchema);
this.qruleActiveSchemaSetter(schema);
this.setActiveTab(this.qruleActiveSchemaGetter?.tabs[0]);
return;
}
this.httpService
.postRequest(entityApi.schema.list, {
organ: this.organNameGetter,
system: "entityView",
build_state: buildState(),
})
.then((response) => {
// console.log(response);
const routeParamsKey = this.$route.name;
let schemaBasedOnRouteKeyIndex = response.data.entityView.findIndex(
(item) => item.key == routeParamsKey
);
schemaBasedOnRouteKeyIndex =
schemaBasedOnRouteKeyIndex == -1 ? 0 : schemaBasedOnRouteKeyIndex;
this.qruleSchemaSetter(response.data.entityView);
this.qruleActiveSchemaSetter(
response.data.entityView[schemaBasedOnRouteKeyIndex]
);
this.setActiveTab(this.qruleActiveSchemaGetter?.tabs[0]);
// this.qruleActiveTabSetter(
// response.data.entityView[schemaBasedOnRouteKeyIndex].tabs[0]
// );
// this.updateMainContent();
})
},
setActiveTab(tab) {
this.renderId++;
this.qruleActiveTabSetter(tab);
this.tabSchemaItems = undefined;
this.mainComponentName = "EntityQModelRule";
this.tabSchemaItems = tab.items
? tab.items
: this.qruleActiveSchemaGetter.items;
if (tab.componentName) {
this.mainComponentName = tab.componentName;
}
this.resetBreadcrumb();
},
resetBreadcrumb() {
if (this.qruleActiveTabGetter.key == "rulelist") {
this.breadCrumbSetter();
} else if (this.qruleActiveTabGetter.key == "rulelogic") {
let bread = this.breadCrumbGetter;
bread.pop();
this.breadCrumbSetter(bread.length ?? undefined );
}
// else if(this.qruleActiveTabGetter.key == 'ruletriple')
},
},
};
</script>
<style scoped lang="scss">
.show-reports-button {
opacity: 0.6;
color: #92a2b2;
}
.problem-detail {
width: 98% !important;
margin: 0 !important;
}
.text-title-QSection1 {
color: #00abff !important;
&:hover {
// color: blue !important;
text-decoration: underline !important;
}
}
.text-title-nextItem {
color: #00abff !important;
&:hover {
color: #0575ad !important;
}
}
.text-title-prevItem {
color: #00abff !important;
&:hover {
color: #0575ad !important;
}
}
.text-title-QSection2 {
color: #00abff !important;
&:hover {
// color: blue !important;
text-decoration: underline !important;
}
}
.nav-tabs-container {
display: flex;
justify-content: center;
}
</style>

File diff suppressed because it is too large Load Diff

30
pages/hadith/chat-bot.vue Normal file
View File

@ -0,0 +1,30 @@
<template>
<HadithLayout> </HadithLayout>
</template>
<script>
export default {
name: "hadithChatBot",
setup() {
useHead({
title: `${import.meta.env.VITE_HADITH_PAGE_TITLE} | چت بات `,
meta: [
{ name: "description", content: "کاوش با هوش مصنوعی در احادیث اسلامی" },
],
bodyAttrs: {
class: import.meta.env.VITE_HADITH_SYSTEM,
},
});
definePageMeta({
layout: false,
name: "hadithChatBot",
});
},
components: {
// SectionOne: defineAsyncComponent(() =>
// import("@hadith/components/hadith/hero-page/SectionOne.vue")
// ),
},
};
</script>
<style scoped></style>

View File

@ -1,247 +0,0 @@
<template>
<div class="wrapper detail-page">
<TopHeader
ref="topheader"
@searchStart="searchStart"
@showfilter="showfilter"
@searchType="searchTyping"
@="searchCoding"
></TopHeader>
<Content
:pagination="pagination"
@changeCurrent="changeCurrent"
@changePage="changePaging"
ref="content"
></Content>
<filter-list-search @filterUpdate="filterUpdate" ref="filterlist"></filter-list-search>
<Summary
ref="summary"
:meets="meets"
@hideSummary="hideSummary"
v-show="showSummary"
>
</Summary>
<!-- <ChartTree>
</ChartTree> -->
</div>
</template>
<script>
// import axios from "axios";
import TopHeader from "~/search/view/layout/Top.vue";
import FilterListSearch from "~/search/view/layout/FilterListSearch.vue";
import Content from "~/search/view/pages/TermContent.vue";
import Summary from "~/search/view/layout/TermSummary.vue";
import LogService from "~/services/log.service";
import {mapState} from "pinia";
//
// const API = axios.create({
// //baseURL: 'http://2.182.155.188',
// baseURL: import.meta.env.VITE_API_SEARCH,
// })
export default {
props: ["q"],
name: "Term",
data() {
return {
meets: [],
tq: this.q,
filterUrl: "",
loading: false,
showSummary: false,
countInPage: 10,
currentItem: [],
searchType: "",
searchCode: "all",
ismultword: false,
iscode: false,
page: 0,
pagination: {
page: 1,
pages: 0,
total: 0,
offset: 0, // page * per_page
limit: 10, //per_page
},
};
},
computed:{
...mapState(["currentUser"])
},
mounted() {
this.$refs.topheader.modetab = 3;
this.$refs.topheader.state = 2;
if (this.tq != "") {
var item = this.tq;
this.checkMultiword(item);
this.$refs.topheader.setSearchLine(this.tq);
this.$refs.content.setTextSearch(this.tq, this.countInPage);
this.getQuery();
}
},
methods: {
searchTyping(type) {
this.searchType = type;
},
searchCoding(code) {
this.searchCode = code;
},
resetOptions() {
this.page = 0;
this.filterUrl = "";
this.$refs.filterlist.resetFilter();
},
showfilter: function() {
this.$refs.filterlist.showfilter();
},
checkMultiword(item) {
this.ismultword = false;
if (item == null || item == "") return;
var ww = item.split(" ");
this.iscode = /^\d+$/.test(item);
if (this.iscode == false) this.ismultword = item.split(" ").length > 1;
this.$refs.topheader.setOptions(this.ismultword, this.iscode);
},
searchStart: function(item) {
if (item != null) {
item = item.trim();
this.tq = item;
this.checkMultiword(item);
this.$refs.content.setTextSearch(item, this.countInPage);
}
this.resetOptions();
this.getQuery();
},
changePaging: function(item) {
this.pagination = item;
this.getQuery(true);
},
hideSummary: function() {
this.showSummary = false;
},
changeCurrent(item) {
if (item == this.currentItem) this.showSummary = !this.showSummary;
else this.showSummary = true;
this.currentItem = item;
var vm = this;
this.loading = true;
var suburl = "/monir/search/term/items/";
ApiService.getRequest(
suburl +
this.page +
"/" +
item.doc_count +
"/q=" +
item.key +
this.filterUrl
)
.then((response) => {
vm.loading = false;
// if (title == this.currentItem) this.showSummary = !this.showSummary;
// else this.showSummary = true;
// this.showSummary = true;
this.meets = response.data.hits.hits;
// this.$refs.summary.setInfo(response.data.hits.hits);
})
.catch((error) => {
vm.loading = false;
vm.$alert(error);
});
},
filterUpdate: function(filter) {
this.filterUrl = filter;
// history.pushState(null, '', '/list' + '/q='+ this.tq+ filter);
this.$router.push({
name: "TermResult",
query: { q: this.tq + filter },
});
this.page = 0;
this.getQuery(false, true);
},
// typeNormal : جستجوی عادی
// typeAnd : جستجوی عطفی
// typePhrase : جستجوی عبارتی
getQuery: function(pageOnly = false, filteronly = false) {
var vm = this;
this.loading = true;
var suburl = "/monir/search/term/";
if (this.ismultword) {
if (this.searchType == "typeAnd") suburl = "/monir/search/term/and/";
else if (this.searchType == "typePhrase")
suburl = "/monir/search/term/phrase/";
}
ApiService.getRequest(
suburl +
this.pagination.offset +
"/" +
this.pagination.limit +
"/q=" +
this.tq +
this.filterUrl
)
.then((response) => {
vm.loading = false;
if (pageOnly) {
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets
);
} else if (filteronly) {
this.$refs.topheader.setCount(
response.data.hits.total.value,
response.data.hits.total.relation
);
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets,
response.data.hits.total.value,
response.data.hits.total.relation
);
} else {
this.$refs.topheader.setCount(
response.data.hits.total.value,
response.data.hits.total.relation
);
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets,
response.data.hits.total.value,
response.data.hits.total.relation
);
response.data.aggregations.branch.buckets = [];
this.$refs.filterlist.setAnswer(response.data.aggregations);
}
const total = response.data.hits.total.value;
const pages = Math.ceil(total / this.pagination.limit);
const pagination = {
total: total,
pages: pages == 0 ? 1 : pages
}
this.pagination = { ...this.pagination, ...pagination };
LogService.index(this.currentUser,vm.tq, vm.page, vm.filterUrl, response.data.took);
})
.catch((error) => {
vm.loading = false;
vm.$alert(error);
});
},
},
};
</script>

View File

@ -1,257 +1,11 @@
<template>
<div class="wrapper detail-page">
<div class="detail-page__header" style="padding-top: 10px !important">
<div class="detail-page__nav container-fluid">
<ul class="list-unstyled">
</ul>
</div>
</div>
<div ref="filterdiv" class="detail-page__filters div-meno" style="top: 80px">
<button
id="m1"
style="border-radius: 50%;"
class="btn buttonshow"
@click.prevent="showfilter"
>
<span class="tavasi tavasi-Component-356--1"></span>
</button>
<button
id="m2"
class="btn buttonclose rounded-circle "
@click.prevent="hidefilter"
>
<span class="tavasi tavasi-Component-21--1"></span>
</button>
<div>
<div class="scrollbar"
v-if="showAitem">
<p v-for="(item, i) in listindexs" :key="i">
<span v-html="item"></span>
</p>
<!-- <button type="bu" @click.prevent="hidefilter" class="text__15 btn btn-default popUp-tab__clear button_giveup">
<svg
data-v-46e9fe5b=""
data-testid="chevron-double-lg-left-icon"
class="s12 icon-chevron-double-lg-left "
>
<use
data-v-46e9fe5b=""
href="/assets/img/icons.d6ff8c17.svg#chevron-double-lg-left"
></use>
</svg>
&nbsp; بستن
</button> -->
</div>
</div>
</div>
<div>
<div class="detail-page__content" style="padding-top: 80px">
<div class="detail-page__tab-content">
<div class="search-items">
<div class="search-items__item">
<h1 class="text__14 text__dark-blue">{{ title }}</h1>
<br />
<div v-if="paragraphs.length > 0">
<p
v-for="(paragraph, i) in paragraphs"
:key="i"
style="line-height: 30px"
>
<span v-html="paragraph"></span>
</p>
</div>
<h3 v-else class="text__14 text__dark-gray">
این جلسه متن ندارد
</h3>
</div>
</div>
</div>
</div>
</div>
</div>
<h1>favorite show page</h1>
</template>
<script>
export default {
name: "ShowText",
props: ["index", "textSearch"],
data() {
return {
datainput: [],
initdata: false,
indexitem: this.index,
searchText: this.textSearch,
text: "",
text2: "",
showAitem: true,
showStatus: 1,
};
},
created: function () {
let data = JSON.parse(localStorage.getItem("answer"));
this.datainput = data[this.indexitem]._source;
},
computed: {
paragraphs() {
this.text = this.datainput.content;
if (this.text.length > 0) {
this.text2 = this.getHighlight(this.text);
return this.text2.split("\n");
}
return [];
},
listindexs() {
var list = this.getHighlight(this.datainput.mindex);
return list.split("\n");
},
title() {
if (this.datainput.title)
return `${this.datainput.title} (کد جلسه: ${this.datainput.meet_code})`;
else
return `${this.datainput.subtitle} (کد جلسه: ${this.datainput.meet_code})`;
},
},
mounted() {
//////this.setsummary();
//this.$refs.summarytext.setInfo(this.datainput);
this.initdata = true;
},
methods: {
showfilter: function () {
// this.$refs.filterdiv.classList.add("show");
this.showAitem = true;
this.showStatus = 1;
document.getElementById("m1").style.display = "none";
document.getElementById("m2").style.display = "inline-block";
},
hidefilter: function () {
// this.$refs.filterdiv.classList.remove("show");
this.showAitem = false;
this.showStatus = 2;
document.getElementById("m1").style.display = "inline-block";
document.getElementById("m2").style.display = "none";
// if(showAitem=false){
// this.showfilter=!this.showfilter;
// }
},
getHighlight(text) {
var words = this.searchText.split(" ");
var index = 1;
words.forEach((w) => {
if (w == "" || w == " ") {
return;
}
let classname = `searchHilight${index}`;
text = text.replaceAll(
w,
"<span class='" + classname + "'>" + w + "</span>"
);
var w1 = this.normalize(w);
if (w1 != w) {
text = text.replaceAll(
w1,
"<span class='" + classname + "'>" + w1 + "</span>"
);
}
index = index + 1;
if (index > 5) index = 1;
});
return text;
},
normalize(item) {
item = item.replaceAll("،", "");
item = item.replaceAll(":", "");
item = item.replaceAll(".", "");
item = item.replaceAll("ک", "ك");
item = item.replaceAll("ی", "ي");
item = item.replaceAll("إ", "ا");
item = item.replaceAll("أ", "ا");
item = item.replaceAll("آ", "ا");
item = item.replaceAll("ة", "ت");
return item;
},
},
name: "hadithFavoritesShow",
};
</script>
<style lang="scss" scoped>
.search-system {
.detail-page__content {
top: 0;
}
}
@media screen and (min-width: 992px) {
.detail-page .detail-page__content .detail-page__tab-content .search-items {
height: calc(100vh - 8em) !important;
overflow: auto;
}
}
.buttonclose {
position: relative;
right: 5px;
width: 50px;
height: 50px;
z-index: 99999;
}
.buttonclose span{
font-size: 35px;
color: black;
}
.buttonshow span{
color: black;
}
.buttonshow {
position: relative;
color:inherit;
right: 5px;
width: 50px;
height: 50px;
z-index: 99999;
}
.div-meno{
background-color: #f9f9f9 !important;
}
#m1{
display: none;
}
</style>
<style lang="scss" scoped></style>

View File

@ -1,257 +1,75 @@
<script setup>
definePageMeta({
layout: false,
name: "hadithFavorites",
});
useHead({
name: "hadithFavorites",
title: `${import.meta.env.VITE_HADITH_PAGE_TITLE} | ذخیره ها`,
meta: [
{ name: "description", content: "کاوش با هوش مصنوعی در احادیث اسلامی" },
],
bodyAttrs: {
class: import.meta.env.VITE_HADITH_SYSTEM,
},
});
const HadithLayout = defineAsyncComponent(() =>
import("@hadith/layouts/HadithLayout.vue")
);
const NavigationMenu = defineAsyncComponent(() =>
import("@hadith/components/hadith/NavigationMenu.vue")
);
const SearchList = defineAsyncComponent(() =>
import("@hadith/components/hadith/search-page/SearchList.vue")
);
const state = reactive({
searchList: new Array(5).fill(0),
});
</script>
<template>
<div class="wrapper detail-page">
<div class="detail-page__header" style="padding-top: 10px !important">
<div class="detail-page__nav container-fluid">
<ul class="list-unstyled">
</ul>
</div>
</div>
<HadithLayout>
<div class="h-full flex flex-col justify-center">
<div class="bg-container h-full">
<navigation-menu></navigation-menu>
<div ref="filterdiv" class="detail-page__filters div-meno" style="top: 80px">
<button
id="m1"
style="border-radius: 50%;"
class="btn buttonshow"
@click.prevent="showfilter"
>
<span class="tavasi tavasi-Component-356--1"></span>
</button>
<button
id="m2"
class="btn buttonclose rounded-circle "
@click.prevent="hidefilter"
>
<span class="tavasi tavasi-Component-21--1"></span>
</button>
<div>
<div class="scrollbar"
v-if="showAitem">
<p v-for="(item, i) in listindexs" :key="i">
<span v-html="item"></span>
</p>
<!-- <button type="bu" @click.prevent="hidefilter" class="text__15 btn btn-default popUp-tab__clear button_giveup">
<svg
data-v-46e9fe5b=""
data-testid="chevron-double-lg-left-icon"
class="s12 icon-chevron-double-lg-left "
>
<use
data-v-46e9fe5b=""
href="/assets/img/icons.d6ff8c17.svg#chevron-double-lg-left"
></use>
</svg>
&nbsp; بستن
</button> -->
</div>
</div>
</div>
<div>
<div class="detail-page__content" style="padding-top: 80px">
<div class="detail-page__tab-content">
<div class="search-items">
<div class="search-items__item">
<h1 class="text__14 text__dark-blue">{{ title }}</h1>
<br />
<div v-if="paragraphs.length > 0">
<p
v-for="(paragraph, i) in paragraphs"
:key="i"
style="line-height: 30px"
>
<span v-html="paragraph"></span>
</p>
</div>
<h3 v-else class="text__14 text__dark-gray">
این جلسه متن ندارد
</h3>
</div>
<div class="text-logo">
<div class="search-box-container pb-0 flex justify-center">
<search-list
no-data-text="هنوز چیزی ذخیره نکرده‌اید!"
no-data-icon="/img/save.png"
:list="state.searchList"
></search-list>
</div>
</div>
</div>
</div>
</div>
</HadithLayout>
</template>
<script>
export default {
name: "ShowText",
props: ["index", "textSearch"],
data() {
return {
datainput: [],
initdata: false,
indexitem: this.index,
searchText: this.textSearch,
text: "",
text2: "",
showAitem: true,
showStatus: 1,
};
},
created: function () {
let data = JSON.parse(localStorage.getItem("answer"));
this.datainput = data[this.indexitem]._source;
},
computed: {
paragraphs() {
this.text = this.datainput.content;
if (this.text.length > 0) {
this.text2 = this.getHighlight(this.text);
return this.text2.split("\n");
}
return [];
},
listindexs() {
var list = this.getHighlight(this.datainput.mindex);
return list.split("\n");
},
title() {
if (this.datainput.title)
return `${this.datainput.title} (کد جلسه: ${this.datainput.meet_code})`;
else
return `${this.datainput.subtitle} (کد جلسه: ${this.datainput.meet_code})`;
},
},
mounted() {
//////this.setsummary();
//this.$refs.summarytext.setInfo(this.datainput);
this.initdata = true;
},
methods: {
showfilter: function () {
// this.$refs.filterdiv.classList.add("show");
this.showAitem = true;
this.showStatus = 1;
document.getElementById("m1").style.display = "none";
document.getElementById("m2").style.display = "inline-block";
},
hidefilter: function () {
// this.$refs.filterdiv.classList.remove("show");
this.showAitem = false;
this.showStatus = 2;
document.getElementById("m1").style.display = "inline-block";
document.getElementById("m2").style.display = "none";
// if(showAitem=false){
// this.showfilter=!this.showfilter;
// }
},
getHighlight(text) {
var words = this.searchText.split(" ");
var index = 1;
words.forEach((w) => {
if (w == "" || w == " ") {
return;
}
let classname = `searchHilight${index}`;
text = text.replaceAll(
w,
"<span class='" + classname + "'>" + w + "</span>"
);
var w1 = this.normalize(w);
if (w1 != w) {
text = text.replaceAll(
w1,
"<span class='" + classname + "'>" + w1 + "</span>"
);
}
index = index + 1;
if (index > 5) index = 1;
});
return text;
},
normalize(item) {
item = item.replaceAll("،", "");
item = item.replaceAll(":", "");
item = item.replaceAll(".", "");
item = item.replaceAll("ک", "ك");
item = item.replaceAll("ی", "ي");
item = item.replaceAll("إ", "ا");
item = item.replaceAll("أ", "ا");
item = item.replaceAll("آ", "ا");
item = item.replaceAll("ة", "ت");
return item;
},
},
};
</script>
<style lang="scss" scoped>
.search-system {
.detail-page__content {
top: 0;
}
<style scoped>
.bg-container {
min-height: 100%;
/* height: 100dvh; */
background-size: cover;
background-repeat: no-repeat;
background: #f7fffd;
}
@media screen and (min-width: 992px) {
.detail-page .detail-page__content .detail-page__tab-content .search-items {
height: calc(100vh - 8em) !important;
overflow: auto;
}
}
.buttonclose {
.text-logo {
padding-top: 4.5em;
position: relative;
right: 5px;
width: 50px;
height: 50px;
z-index: 99999;
}
.buttonclose span{
font-size: 35px;
color: black;
.search-box-container {
padding-top: 0.7em;
padding-bottom: 4em; /*64px */
}
.buttonshow span{
color: black;
&.pb-0 {
padding-bottom: 0 !important;
}
.buttonshow {
position: relative;
color:inherit;
right: 5px;
width: 50px;
height: 50px;
z-index: 99999;
}
.div-meno{
background-color: #f9f9f9 !important;
}
#m1{
display: none;
}
</style>

View File

@ -5,7 +5,6 @@
</HadithLayout>
</template>
<script>
export default {
name: "hadith",
setup() {
@ -37,96 +36,4 @@ export default {
},
};
</script>
<style scoped>
.section-one {
.bg-container {
height: 521px;
background-size: 100% auto;
background-repeat: no-repeat;
/* background-attachment: fixed; */
/* background-image: url("/img/background.svg"),
linear-gradient(199.05deg, #ffffff 9.99%, #e4fff7 42.07%, #ffffff 97.12%); */
}
.text-logo {
padding-top: 10em;
position: relative;
.title {
margin-top: 3.5em;
font-family: IRANSansX;
font-size: 14px;
line-height: 21px;
letter-spacing: 0%;
text-align: center;
color: #1b2132;
}
.badge-style {
width: 100;
height: 23;
border-radius: 40px;
padding-right: 8px;
padding-bottom: 2px;
padding-left: 8px;
gap: 10px;
color: #fff;
background: linear-gradient(270.29deg, #d284ff 8.12%, #4d00ff 109.58%);
}
}
.search-box-container {
padding-top: 1em;
padding-bottom: 4em; /*64px */
}
}
.section-two {
font-weight: 200;
font-size: 20px;
line-height: 30px;
letter-spacing: 0%;
text-align: center;
.my-card {
background-repeat: no-repeat;
background-size: auto;
height: 660px;
.inner-container {
max-width: 21.25em;
margin: auto;
}
.title {
font-weight: 500;
font-size: 24px;
line-height: 36px;
letter-spacing: 0%;
color: #1b2132;
text-align: right;
}
.description {
font-weight: 300;
font-size: 20px;
line-height: 30px;
letter-spacing: 0%;
text-align: right;
color: #626b84;
}
&.card-one {
background-image: url("/img/card-one-bgi.png"),
linear-gradient(134.17deg, #ffffff -9.81%, #e5e0ff 87.62%);
}
&.card-two {
background-image: url("/img/card-two-bgi.png"),
linear-gradient(329.16deg, #b9fde0 13.45%, #eefff8 63.57%);
}
&.card-three {
background-image: url("/img/card-three-bgi.png"),
linear-gradient(134.17deg, #ffffff -9.81%, #e5e0ff 87.62%);
}
}
}
</style>
<style scoped></style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -246,12 +246,12 @@
<script>
import { mapState, mapActions } from "pinia";
import searchApis from "@search/apis/searchApi";
import chartType from "@search/json/search/json/chart.json";
import chartType from "@search/json/search/chart.json";
import sidbarMenuDefault from "@search/json/search/json/menu.json";
import sidbarMenuMin from "@search/json/search/json/sidbarMenuMin.json";
import sidbarMenuDefault from "@search/json/search/menu.json";
import sidbarMenuMin from "@search/json/search/sidbarMenuMin.json";
import tableActions from "@search/json/search/json/listTableContextMenu";
import tableActions from "@search/json/search/listTableContextMenu";
import { useSearchStore } from "@search/stores/searchStore";
export default {

View File

@ -1,247 +1,113 @@
<script setup>
definePageMeta({
layout: false,
name: "hadithAbout",
});
useHead({
name: "hadithAbout",
title: `${import.meta.env.VITE_HADITH_PAGE_TITLE} | در باره حدیثا`,
meta: [
{ name: "description", content: "کاوش با هوش مصنوعی در احادیث اسلامی" },
],
bodyAttrs: {
class: import.meta.env.VITE_HADITH_SYSTEM,
},
});
// components declaration
const HadithLayout = defineAsyncComponent(() =>
import("@hadith/layouts/HadithLayout.vue")
);
const NavigationMenu = defineAsyncComponent(() =>
import("@hadith/components/hadith/NavigationMenu.vue")
);
</script>
<template>
<div class="wrapper detail-page">
<TopHeader
ref="topheader"
@searchStart="searchStart"
@showfilter="showfilter"
@searchType="searchTyping"
@="searchCoding"
></TopHeader>
<HadithLayout>
<div class="page-container h-full">
<!-- max-w-[var(--ui-container-two)] -->
<UContainer class="page-inner-container sm:px-6 lg:px-4">
<navigation-menu></navigation-menu>
<Content
:pagination="pagination"
@changeCurrent="changeCurrent"
@changePage="changePaging"
ref="content"
></Content>
<div class="page-header pt-38 pb-4 flex justify-between items-center">
<div class="flex items-center">
<h1 class="m-0 title">درباره</h1>
<NuxtImg
fit="auto"
quality="80"
placeholder
src="/img/haditha-title.svg"
/>
</div>
</div>
<filter-list-search @filterUpdate="filterUpdate" ref="filterlist"></filter-list-search>
<Summary
ref="summary"
:meets="meets"
@hideSummary="hideSummary"
v-show="showSummary"
>
</Summary>
<!-- <ChartTree>
</ChartTree> -->
</div>
<div class="page-content p-6">
<p>
حدیثا، یک موتور جستجوی پیشرفته و تخصصی در حوزه احادیث اسلامی است که
با هدف دسترسی آسان و سریع به منابع معتبر حدیثی طراحی شده است. این
پلتفرم، بستری است برای پژوهشگران، علاقهمندان به معارف اسلامی، و
تمامی افرادی که به دنبال دسترسی به گنجینه ارزشمند احادیث نبوی و
اهلبیت (علیهمالسلام) هستند.
</p>
<p>
ما در حدیثا تلاش میکنیم تا با بهرهگیری از فناوریهای نوین و منابع
اصیل اسلامی، بهترین تجربه جستجو را به کاربران ارائه دهیم. تمامی
محتوای این موتور جستجو از کتب معتبر حدیثی و منابع شناختهشده استخراج
شده و با دقت علمی بالا ساماندهی شده است.
</p>
<p>اهداف ما شامل موارد زیر است:</p>
<ul class="list-disc list-inside">
<li>ارائه محتوای معتبر و دستهبندیشده از احادیث اسلامی.</li>
<li>تسهیل دسترسی به معارف اسلامی برای پژوهشگران و عموم مردم.</li>
<li>کمک به ترویج فرهنگ و اخلاق اسلامی از طریق انتشار احادیث.</li>
</ul>
<p>
ما به حریم خصوصی کاربران خود احترام میگذاریم و متعهد به ارائه
خدماتی با کیفیت و دقیق هستیم. حدیثا پلی است میان شما و کلام گهربار
اهلبیت و پیامبر اسلام (صلیاللهعلیهوآله).
</p>
<p>به خانواده حدیثا بپیوندید و در مسیر دانش و معرفت گام بردارید.</p>
</div>
</UContainer>
</div>
</HadithLayout>
</template>
<script>
// import axios from "axios";
import TopHeader from "~/search/view/layout/Top.vue";
import FilterListSearch from "~/search/view/layout/FilterListSearch.vue";
import Content from "~/search/view/pages/TermContent.vue";
import Summary from "~/search/view/layout/TermSummary.vue";
import LogService from "~/services/log.service";
import {mapState} from "pinia";
<style scoped>
.page-container {
background: #f7fffd;
//
// const API = axios.create({
// //baseURL: 'http://2.182.155.188',
// baseURL: import.meta.env.VITE_API_SEARCH,
// })
.page-inner-container {
.page-header {
color: var(--ui-color-two);
export default {
props: ["q"],
name: "Term",
data() {
return {
meets: [],
tq: this.q,
filterUrl: "",
loading: false,
showSummary: false,
countInPage: 10,
currentItem: [],
searchType: "",
searchCode: "all",
ismultword: false,
iscode: false,
page: 0,
pagination: {
page: 1,
pages: 0,
total: 0,
offset: 0, // page * per_page
limit: 10, //per_page
},
};
},
computed:{
...mapState(["currentUser"])
},
mounted() {
this.$refs.topheader.modetab = 3;
this.$refs.topheader.state = 2;
if (this.tq != "") {
var item = this.tq;
this.checkMultiword(item);
this.$refs.topheader.setSearchLine(this.tq);
this.$refs.content.setTextSearch(this.tq, this.countInPage);
this.getQuery();
.title {
font-family: IRANSansX;
font-weight: 300;
font-size: 24px;
line-height: 36px;
letter-spacing: 0%;
text-align: center;
}
}
},
methods: {
searchTyping(type) {
this.searchType = type;
},
searchCoding(code) {
this.searchCode = code;
},
resetOptions() {
this.page = 0;
this.filterUrl = "";
this.$refs.filterlist.resetFilter();
},
showfilter: function() {
this.$refs.filterlist.showfilter();
},
checkMultiword(item) {
this.ismultword = false;
if (item == null || item == "") return;
var ww = item.split(" ");
this.iscode = /^\d+$/.test(item);
if (this.iscode == false) this.ismultword = item.split(" ").length > 1;
this.$refs.topheader.setOptions(this.ismultword, this.iscode);
},
searchStart: function(item) {
if (item != null) {
item = item.trim();
this.tq = item;
.page-content {
color: var(--ui-color-two);
this.checkMultiword(item);
this.$refs.content.setTextSearch(item, this.countInPage);
}
this.resetOptions();
this.getQuery();
},
changePaging: function(item) {
this.pagination = item;
this.getQuery(true);
},
hideSummary: function() {
this.showSummary = false;
},
changeCurrent(item) {
if (item == this.currentItem) this.showSummary = !this.showSummary;
else this.showSummary = true;
this.currentItem = item;
var vm = this;
this.loading = true;
var suburl = "/monir/search/term/items/";
ApiService.getRequest(
suburl +
this.page +
"/" +
item.doc_count +
"/q=" +
item.key +
this.filterUrl
)
.then((response) => {
vm.loading = false;
// if (title == this.currentItem) this.showSummary = !this.showSummary;
// else this.showSummary = true;
// this.showSummary = true;
this.meets = response.data.hits.hits;
// this.$refs.summary.setInfo(response.data.hits.hits);
})
.catch((error) => {
vm.loading = false;
vm.$alert(error);
});
},
filterUpdate: function(filter) {
this.filterUrl = filter;
// history.pushState(null, '', '/list' + '/q='+ this.tq+ filter);
this.$router.push({
name: "TermResult",
query: { q: this.tq + filter },
});
this.page = 0;
this.getQuery(false, true);
},
// typeNormal : جستجوی عادی
// typeAnd : جستجوی عطفی
// typePhrase : جستجوی عبارتی
getQuery: function(pageOnly = false, filteronly = false) {
var vm = this;
this.loading = true;
var suburl = "/monir/search/term/";
if (this.ismultword) {
if (this.searchType == "typeAnd") suburl = "/monir/search/term/and/";
else if (this.searchType == "typePhrase")
suburl = "/monir/search/term/phrase/";
}
ApiService.getRequest(
suburl +
this.pagination.offset +
"/" +
this.pagination.limit +
"/q=" +
this.tq +
this.filterUrl
)
.then((response) => {
vm.loading = false;
if (pageOnly) {
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets
);
} else if (filteronly) {
this.$refs.topheader.setCount(
response.data.hits.total.value,
response.data.hits.total.relation
);
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets,
response.data.hits.total.value,
response.data.hits.total.relation
);
} else {
this.$refs.topheader.setCount(
response.data.hits.total.value,
response.data.hits.total.relation
);
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets,
response.data.hits.total.value,
response.data.hits.total.relation
);
response.data.aggregations.branch.buckets = [];
this.$refs.filterlist.setAnswer(response.data.aggregations);
}
const total = response.data.hits.total.value;
const pages = Math.ceil(total / this.pagination.limit);
const pagination = {
total: total,
pages: pages == 0 ? 1 : pages
}
this.pagination = { ...this.pagination, ...pagination };
LogService.index(this.currentUser,vm.tq, vm.page, vm.filterUrl, response.data.took);
})
.catch((error) => {
vm.loading = false;
vm.$alert(error);
});
},
},
};
</script>
p {
font-family: IRANSansX;
font-weight: 300;
font-size: 14px;
line-height: 21px;
letter-spacing: 0%;
text-align: right;
}
}
}
}
</style>

View File

@ -1,247 +0,0 @@
<template>
<div class="wrapper detail-page">
<TopHeader
ref="topheader"
@searchStart="searchStart"
@showfilter="showfilter"
@searchType="searchTyping"
@="searchCoding"
></TopHeader>
<Content
:pagination="pagination"
@changeCurrent="changeCurrent"
@changePage="changePaging"
ref="content"
></Content>
<filter-list-search @filterUpdate="filterUpdate" ref="filterlist"></filter-list-search>
<Summary
ref="summary"
:meets="meets"
@hideSummary="hideSummary"
v-show="showSummary"
>
</Summary>
<!-- <ChartTree>
</ChartTree> -->
</div>
</template>
<script>
// import axios from "axios";
import TopHeader from "~/search/view/layout/Top.vue";
import FilterListSearch from "~/search/view/layout/FilterListSearch.vue";
import Content from "~/search/view/pages/TermContent.vue";
import Summary from "~/search/view/layout/TermSummary.vue";
import LogService from "~/services/log.service";
import {mapState} from "pinia";
//
// const API = axios.create({
// //baseURL: 'http://2.182.155.188',
// baseURL: import.meta.env.VITE_API_SEARCH,
// })
export default {
props: ["q"],
name: "Term",
data() {
return {
meets: [],
tq: this.q,
filterUrl: "",
loading: false,
showSummary: false,
countInPage: 10,
currentItem: [],
searchType: "",
searchCode: "all",
ismultword: false,
iscode: false,
page: 0,
pagination: {
page: 1,
pages: 0,
total: 0,
offset: 0, // page * per_page
limit: 10, //per_page
},
};
},
computed:{
...mapState(["currentUser"])
},
mounted() {
this.$refs.topheader.modetab = 3;
this.$refs.topheader.state = 2;
if (this.tq != "") {
var item = this.tq;
this.checkMultiword(item);
this.$refs.topheader.setSearchLine(this.tq);
this.$refs.content.setTextSearch(this.tq, this.countInPage);
this.getQuery();
}
},
methods: {
searchTyping(type) {
this.searchType = type;
},
searchCoding(code) {
this.searchCode = code;
},
resetOptions() {
this.page = 0;
this.filterUrl = "";
this.$refs.filterlist.resetFilter();
},
showfilter: function() {
this.$refs.filterlist.showfilter();
},
checkMultiword(item) {
this.ismultword = false;
if (item == null || item == "") return;
var ww = item.split(" ");
this.iscode = /^\d+$/.test(item);
if (this.iscode == false) this.ismultword = item.split(" ").length > 1;
this.$refs.topheader.setOptions(this.ismultword, this.iscode);
},
searchStart: function(item) {
if (item != null) {
item = item.trim();
this.tq = item;
this.checkMultiword(item);
this.$refs.content.setTextSearch(item, this.countInPage);
}
this.resetOptions();
this.getQuery();
},
changePaging: function(item) {
this.pagination = item;
this.getQuery(true);
},
hideSummary: function() {
this.showSummary = false;
},
changeCurrent(item) {
if (item == this.currentItem) this.showSummary = !this.showSummary;
else this.showSummary = true;
this.currentItem = item;
var vm = this;
this.loading = true;
var suburl = "/monir/search/term/items/";
ApiService.getRequest(
suburl +
this.page +
"/" +
item.doc_count +
"/q=" +
item.key +
this.filterUrl
)
.then((response) => {
vm.loading = false;
// if (title == this.currentItem) this.showSummary = !this.showSummary;
// else this.showSummary = true;
// this.showSummary = true;
this.meets = response.data.hits.hits;
// this.$refs.summary.setInfo(response.data.hits.hits);
})
.catch((error) => {
vm.loading = false;
vm.$alert(error);
});
},
filterUpdate: function(filter) {
this.filterUrl = filter;
// history.pushState(null, '', '/list' + '/q='+ this.tq+ filter);
this.$router.push({
name: "TermResult",
query: { q: this.tq + filter },
});
this.page = 0;
this.getQuery(false, true);
},
// typeNormal : جستجوی عادی
// typeAnd : جستجوی عطفی
// typePhrase : جستجوی عبارتی
getQuery: function(pageOnly = false, filteronly = false) {
var vm = this;
this.loading = true;
var suburl = "/monir/search/term/";
if (this.ismultword) {
if (this.searchType == "typeAnd") suburl = "/monir/search/term/and/";
else if (this.searchType == "typePhrase")
suburl = "/monir/search/term/phrase/";
}
ApiService.getRequest(
suburl +
this.pagination.offset +
"/" +
this.pagination.limit +
"/q=" +
this.tq +
this.filterUrl
)
.then((response) => {
vm.loading = false;
if (pageOnly) {
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets
);
} else if (filteronly) {
this.$refs.topheader.setCount(
response.data.hits.total.value,
response.data.hits.total.relation
);
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets,
response.data.hits.total.value,
response.data.hits.total.relation
);
} else {
this.$refs.topheader.setCount(
response.data.hits.total.value,
response.data.hits.total.relation
);
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets,
response.data.hits.total.value,
response.data.hits.total.relation
);
response.data.aggregations.branch.buckets = [];
this.$refs.filterlist.setAnswer(response.data.aggregations);
}
const total = response.data.hits.total.value;
const pages = Math.ceil(total / this.pagination.limit);
const pagination = {
total: total,
pages: pages == 0 ? 1 : pages
}
this.pagination = { ...this.pagination, ...pagination };
LogService.index(this.currentUser,vm.tq, vm.page, vm.filterUrl, response.data.took);
})
.catch((error) => {
vm.loading = false;
vm.$alert(error);
});
},
},
};
</script>

View File

@ -0,0 +1,189 @@
<script setup>
definePageMeta({
layout: false,
name: "hadithContact",
});
useHead({
name: "hadithContact",
title: `${import.meta.env.VITE_HADITH_PAGE_TITLE} | تماس با ما`,
meta: [
{ name: "description", content: "کاوش با هوش مصنوعی در احادیث اسلامی" },
],
bodyAttrs: {
class: import.meta.env.VITE_HADITH_SYSTEM,
},
});
// components declaration
const HadithLayout = defineAsyncComponent(() =>
import("@hadith/layouts/HadithLayout.vue")
);
const NavigationMenu = defineAsyncComponent(() =>
import("@hadith/components/hadith/NavigationMenu.vue")
);
</script>
<template>
<HadithLayout>
<div class="page-container h-full">
<!-- max-w-[var(--ui-container-two)] -->
<UContainer class="page-inner-container sm:px-6 lg:px-4">
<span class="top-left-bgi z-0"></span>
<navigation-menu></navigation-menu>
<div class="page-header pt-38 pb-4 flex justify-between items-center">
<div class="flex items-center">
<h1 class="m-0 title">تماس با ما</h1>
</div>
</div>
<div class="page-content p-6">
<div class="mb-4">
<span class="label">تلفن ثابت</span>
<span class="value"> ۰۲۵۳۲۹۰۶۴۵۲</span>
</div>
<div class="mb-4">
<span class="label">تلفن همراه </span>
<span class="value">۰۹۱۲۷۵۰۵۰۵۰ </span>
</div>
<div class="mb-4">
<span class="label">پشتیبان ایتا </span>
<span class="value"> ۰۹۱۲۷۵۰۵۰۵۰</span>
</div>
<div class="mb-4">
<span class="label">کدپستی </span>
<span class="value">۱۲۳۴۵۶۷۸ </span>
</div>
<div class="mb-4">
<span class="label"> آدرس</span>
<span class="value">
دفتر مرکزی: قم، خیابان معلم، کوچه ۱۰، فرعی ۳ پلاک ۵۵ ساختمان
اشراق، واحد ۳۰۵</span
>
</div>
<div class="location">
<NuxtImg
fit="auto"
quality="80"
placeholder
src="/img/location.png"
/>
</div>
</div>
</UContainer>
</div>
</HadithLayout>
</template>
<style scoped>
.page-container {
background: #f7fffd;
position: relative;
z-index: 1;
.top-left-bgi {
position: absolute;
top: 0;
left: 0;
background-image: url("../../../assets/hadith/images/modal-top-bgi.png");
backdrop-filter: blur(54px);
width: 447px;
height: 447px;
top: 0;
left: 0;
background-repeat: no-repeat;
background-size: auto;
z-index: -1;
}
&::before {
content: "";
position: absolute;
right: 0;
bottom: 0;
background-image: url("../../../assets/hadith/images/modal-bttom-right-bgi.png");
backdrop-filter: blur(54px);
width: 438px;
height: 238px;
mix-blend-mode: Multiply;
background-repeat: no-repeat;
background-size: cover;
z-index: -1;
}
&::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 458px;
height: 239px;
mix-blend-mode: Multiply;
background-image: url("../../../assets/hadith/images/modal-bottom-left-bgi.png");
background-repeat: no-repeat;
background-size: cover;
backdrop-filter: blur(54px);
z-index: -1;
}
.page-inner-container {
.page-header {
color: var(--ui-color-two);
.title {
font-family: IRANSansX;
font-weight: 300;
font-size: 24px;
line-height: 36px;
letter-spacing: 0%;
text-align: center;
}
}
.page-content {
color: var(--ui-color-two);
.label {
display: inline-block;
margin-inline-end: 1em;
font-family: IRANSansX;
font-weight: 300;
font-size: 14px;
line-height: 21px;
letter-spacing: 0%;
text-align: right;
color: #626b84;
width: 77px;
height: 21;
}
.value {
font-family: IRANSansX;
font-weight: 300;
font-size: 14px;
line-height: 21px;
letter-spacing: 0%;
text-align: right;
color: #1b2132;
}
.location {
width: 672;
height: 348;
border-width: 1px;
border-radius: 16px;
border: 1px solid;
border-image-source: linear-gradient(
102.02deg,
#4be8ae 7.38%,
#00a762 91.78%
);
}
}
}
}
</style>

View File

@ -0,0 +1,106 @@
<script setup>
const route = useRoute();
definePageMeta({
layout: false,
name: "hadithPublicPage",
});
useHead({
name: "hadithPublicPage",
title: `${import.meta.env.VITE_HADITH_PAGE_TITLE} | در باره حدیثا`,
meta: [
{ name: "description", content: "کاوش با هوش مصنوعی در احادیث اسلامی" },
],
bodyAttrs: {
class: import.meta.env.VITE_HADITH_SYSTEM,
},
});
const componentName = ref("");
// components declaration
const HadithLayout = defineAsyncComponent(() =>
import("@hadith/layouts/HadithLayout.vue")
);
const NavigationMenu = defineAsyncComponent(() =>
import("@hadith/components/hadith/NavigationMenu.vue")
);
const AboutUs = defineAsyncComponent(() =>
import("@hadith/pages/hadith/public-pages/about-us.vue")
);
const ContactUs = defineAsyncComponent(() =>
import("@hadith/pages/hadith/public-pages/contactus.vue")
);
const Rules = defineAsyncComponent(() =>
import("@hadith/pages/hadith/public-pages/rules.vue")
);
onMounted(() => {
console.info(route.path);
// if (route.path == "/hadith/about-us") componentName.value = "AboutUs";
// if (route.path == "/hadith/contact-us") componentName.value = "ContactUs";
// if (route.path == "/hadith/rules") componentName.value = "Rules";
});
</script>
<template>
<HadithLayout>
<div class="page-container h-full">
<!-- max-w-[var(--ui-container-two)] -->
<UContainer class="page-inner-container sm:px-6 lg:px-4">
<navigation-menu></navigation-menu>
<div class="page-header pt-38 pb-4 flex justify-between items-center">
<div class="flex items-center">
<h1 class="m-0 title">درباره</h1>
<NuxtImg
fit="auto"
quality="80"
placeholder
src="/img/haditha-title.svg"
/>
</div>
</div>
<div class="page-content p-6">
<ContactUs v-if="route.path == '/hadith/contact-us'"></ContactUs>
<AboutUs v-if="route.path == '/hadith/about-us'"></AboutUs>
<Rules v-else-if="route.path == '/hadith/rules'"></Rules>
</div>
</UContainer>
</div>
</HadithLayout>
</template>
<style scoped>
.page-container {
background: #f7fffd;
.page-inner-container {
.page-header {
color: var(--ui-color-two);
.title {
font-family: IRANSansX;
font-weight: 300;
font-size: 24px;
line-height: 36px;
letter-spacing: 0%;
text-align: center;
}
}
.page-content {
color: var(--ui-color-two);
p {
font-family: IRANSansX;
font-weight: 300;
font-size: 14px;
line-height: 21px;
letter-spacing: 0%;
text-align: right;
}
}
}
}
</style>

View File

@ -1,247 +1,126 @@
<script setup>
definePageMeta({
layout: false,
name: "hadithRules",
});
useHead({
name: "hadithRules",
title: `${import.meta.env.VITE_HADITH_PAGE_TITLE} | قوانین و مقررات حدیثا`,
meta: [
{ name: "description", content: "کاوش با هوش مصنوعی در احادیث اسلامی" },
],
bodyAttrs: {
class: import.meta.env.VITE_HADITH_SYSTEM,
},
});
// components declaration
const HadithLayout = defineAsyncComponent(() =>
import("@hadith/layouts/HadithLayout.vue")
);
const NavigationMenu = defineAsyncComponent(() =>
import("@hadith/components/hadith/NavigationMenu.vue")
);
</script>
<template>
<div class="wrapper detail-page">
<TopHeader
ref="topheader"
@searchStart="searchStart"
@showfilter="showfilter"
@searchType="searchTyping"
@="searchCoding"
></TopHeader>
<HadithLayout>
<div class="page-container h-full">
<!-- max-w-[var(--ui-container-two)] -->
<UContainer class="page-inner-container sm:px-6 lg:px-4">
<navigation-menu></navigation-menu>
<Content
:pagination="pagination"
@changeCurrent="changeCurrent"
@changePage="changePaging"
ref="content"
></Content>
<div class="page-header pt-38 pb-4 flex justify-between items-center">
<div class="flex items-center">
<h1 class="m-0 title">قوانین و مقررات</h1>
<NuxtImg
fit="auto"
quality="80"
placeholder
src="/img/haditha-title.svg"
/>
</div>
</div>
<filter-list-search @filterUpdate="filterUpdate" ref="filterlist"></filter-list-search>
<Summary
ref="summary"
:meets="meets"
@hideSummary="hideSummary"
v-show="showSummary"
>
</Summary>
<!-- <ChartTree>
</ChartTree> -->
</div>
<div class="page-content p-6">
<ul class="list-decimal list-inside">
<li>
احترام به حقوق معنوی: تمامی محتواهای ارائهشده در این سایت متعلق
به منابع معتبر بوده و هرگونه استفاده بدون ذکر منبع ممنوع است.
</li>
<li>
منابع معتبر: احادیث منتشرشده از منابع معتبر اسلامی استخراج شدهاند
و هرگونه ادعای مغایرت باید با دلایل علمی و معتبر باشد.
</li>
<li>
استفاده شخصی و غیرتجاری: کاربران مجاز به استفاده از محتوای سایت
تنها برای مقاصد شخصی و غیرتجاری هستند.
</li>
<li>
مسئولیت صحت برداشت: مسئولیت هرگونه برداشت اشتباه از محتوای سایت بر
عهده کاربر است و سایت مسئولیتی در قبال آن ندارد.
</li>
<li>
حریم خصوصی: اطلاعات کاربران به صورت کاملاً محرمانه نگهداری میشود
و هیچگونه اطلاعاتی بدون رضایت کاربر به اشتراک گذاشته نخواهد شد.
</li>
<li>
عدم انتشار محتوا: کاربران مجاز به انتشار مجدد احادیث یا مطالب سایت
در دیگر پلتفرمها بدون اجازه کتبی نیستند.
</li>
<li>
پاسخگویی به نظرات: نظرات و پیشنهادات کاربران با احترام بررسی
میشود، اما سایت الزامی برای پاسخ به همه موارد ندارد.
</li>
<li>
تغییر در محتوا و قوانین: سایت حق دارد هرگونه تغییر در محتوا یا
قوانین را بدون اطلاع قبلی انجام دهد.
</li>
<li>
تبعیت از قوانین اسلامی: تمامی فعالیتها و محتوای سایت بر اساس اصول
و قوانین اسلامی طراحی شدهاند.
</li>
<li>
محدودیت دسترسی: در صورت استفاده نامناسب یا تخطی از قوانین، سایت
میتواند دسترسی کاربر را محدود یا مسدود کند.
</li>
</ul>
</div>
</UContainer>
</div>
</HadithLayout>
</template>
<script>
// import axios from "axios";
import TopHeader from "~/search/view/layout/Top.vue";
import FilterListSearch from "~/search/view/layout/FilterListSearch.vue";
import Content from "~/search/view/pages/TermContent.vue";
import Summary from "~/search/view/layout/TermSummary.vue";
import LogService from "~/services/log.service";
import {mapState} from "pinia";
<style scoped>
.page-container {
background: #f7fffd;
//
// const API = axios.create({
// //baseURL: 'http://2.182.155.188',
// baseURL: import.meta.env.VITE_API_SEARCH,
// })
.page-inner-container {
.page-header {
color: var(--ui-color-two);
export default {
props: ["q"],
name: "Term",
data() {
return {
meets: [],
tq: this.q,
filterUrl: "",
loading: false,
showSummary: false,
countInPage: 10,
currentItem: [],
searchType: "",
searchCode: "all",
ismultword: false,
iscode: false,
page: 0,
pagination: {
page: 1,
pages: 0,
total: 0,
offset: 0, // page * per_page
limit: 10, //per_page
},
};
},
computed:{
...mapState(["currentUser"])
},
mounted() {
this.$refs.topheader.modetab = 3;
this.$refs.topheader.state = 2;
if (this.tq != "") {
var item = this.tq;
this.checkMultiword(item);
this.$refs.topheader.setSearchLine(this.tq);
this.$refs.content.setTextSearch(this.tq, this.countInPage);
this.getQuery();
.title {
font-family: IRANSansX;
font-weight: 300;
font-size: 24px;
line-height: 36px;
letter-spacing: 0%;
text-align: center;
}
}
},
methods: {
searchTyping(type) {
this.searchType = type;
},
searchCoding(code) {
this.searchCode = code;
},
resetOptions() {
this.page = 0;
this.filterUrl = "";
this.$refs.filterlist.resetFilter();
},
showfilter: function() {
this.$refs.filterlist.showfilter();
},
checkMultiword(item) {
this.ismultword = false;
if (item == null || item == "") return;
var ww = item.split(" ");
this.iscode = /^\d+$/.test(item);
if (this.iscode == false) this.ismultword = item.split(" ").length > 1;
this.$refs.topheader.setOptions(this.ismultword, this.iscode);
},
searchStart: function(item) {
if (item != null) {
item = item.trim();
this.tq = item;
.page-content {
color: var(--ui-color-two);
this.checkMultiword(item);
this.$refs.content.setTextSearch(item, this.countInPage);
ul li {
font-family: IRANSansX;
font-weight: 300;
font-size: 14px;
line-height: 21px;
letter-spacing: 0%;
text-align: right;
}
this.resetOptions();
this.getQuery();
},
changePaging: function(item) {
this.pagination = item;
this.getQuery(true);
},
hideSummary: function() {
this.showSummary = false;
},
changeCurrent(item) {
if (item == this.currentItem) this.showSummary = !this.showSummary;
else this.showSummary = true;
this.currentItem = item;
var vm = this;
this.loading = true;
var suburl = "/monir/search/term/items/";
ApiService.getRequest(
suburl +
this.page +
"/" +
item.doc_count +
"/q=" +
item.key +
this.filterUrl
)
.then((response) => {
vm.loading = false;
// if (title == this.currentItem) this.showSummary = !this.showSummary;
// else this.showSummary = true;
// this.showSummary = true;
this.meets = response.data.hits.hits;
// this.$refs.summary.setInfo(response.data.hits.hits);
})
.catch((error) => {
vm.loading = false;
vm.$alert(error);
});
},
filterUpdate: function(filter) {
this.filterUrl = filter;
// history.pushState(null, '', '/list' + '/q='+ this.tq+ filter);
this.$router.push({
name: "TermResult",
query: { q: this.tq + filter },
});
this.page = 0;
this.getQuery(false, true);
},
// typeNormal : جستجوی عادی
// typeAnd : جستجوی عطفی
// typePhrase : جستجوی عبارتی
getQuery: function(pageOnly = false, filteronly = false) {
var vm = this;
this.loading = true;
var suburl = "/monir/search/term/";
if (this.ismultword) {
if (this.searchType == "typeAnd") suburl = "/monir/search/term/and/";
else if (this.searchType == "typePhrase")
suburl = "/monir/search/term/phrase/";
}
ApiService.getRequest(
suburl +
this.pagination.offset +
"/" +
this.pagination.limit +
"/q=" +
this.tq +
this.filterUrl
)
.then((response) => {
vm.loading = false;
if (pageOnly) {
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets
);
} else if (filteronly) {
this.$refs.topheader.setCount(
response.data.hits.total.value,
response.data.hits.total.relation
);
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets,
response.data.hits.total.value,
response.data.hits.total.relation
);
} else {
this.$refs.topheader.setCount(
response.data.hits.total.value,
response.data.hits.total.relation
);
this.$refs.content.setAnswer(
response.data.aggregations.branch.buckets,
response.data.hits.total.value,
response.data.hits.total.relation
);
response.data.aggregations.branch.buckets = [];
this.$refs.filterlist.setAnswer(response.data.aggregations);
}
const total = response.data.hits.total.value;
const pages = Math.ceil(total / this.pagination.limit);
const pagination = {
total: total,
pages: pages == 0 ? 1 : pages
}
this.pagination = { ...this.pagination, ...pagination };
LogService.index(this.currentUser,vm.tq, vm.page, vm.filterUrl, response.data.took);
})
.catch((error) => {
vm.loading = false;
vm.$alert(error);
});
},
},
};
</script>
}
}
}
</style>

View File

@ -16,19 +16,6 @@ useHead({
const img = useImage();
const HadithLayout = defineAsyncComponent(() =>
import("@hadith/layouts/HadithLayout.vue")
);
const NavigationMenu = defineAsyncComponent(() =>
import("@hadith/components/hadith/NavigationMenu.vue")
);
const AutoComplation = defineAsyncComponent(() =>
import("@hadith/components/hadith/AutoComplation.vue")
);
const SearchList = defineAsyncComponent(() =>
import("@hadith/components/hadith/search-page/SearchList.vue")
);
const searchQuery = ref("");
const state = reactive({
searchList: [],
@ -62,16 +49,28 @@ const renderContent = (payload) => {
searchQuery.value = payload.searchQuery;
};
// components declaration
const HadithLayout = defineAsyncComponent(() =>
import("@hadith/layouts/HadithLayout.vue")
);
const NavigationMenu = defineAsyncComponent(() =>
import("@hadith/components/hadith/NavigationMenu.vue")
);
const AutoComplation = defineAsyncComponent(() =>
import("@hadith/components/hadith/AutoComplation.vue")
);
const SearchList = defineAsyncComponent(() =>
import("@hadith/components/hadith/search-page/SearchList.vue")
);
</script>
<template>
<HadithLayout>
<div class="h-full flex flex-col justify-center">
<div class="bg-container h-full" :style="backgroundImageStyle">
<div class="background-image h-full" :style="backgroundImageStyle">
<navigation-menu></navigation-menu>
<div class="text-logo">
<div class="logo-container">
<div
class="search-box-container flex justify-center"
:class="{ 'pb-0': state.searchList.length }"
@ -94,7 +93,7 @@ const renderContent = (payload) => {
</div>
</div>
<no-data
<!-- <no-data
class="h-full"
v-if="searchQuery?.length && state.searchList?.length == 0"
>
@ -105,12 +104,16 @@ const renderContent = (payload) => {
src="/img/no-data.png"
/>
<p class="no-data-text">نتیجهای یافت نشد!</p>
</no-data>
</no-data> -->
<div
v-if="searchQuery?.length && state.searchList?.length"
class="search-box-container pb-0 bg-white flex justify-center"
>
<search-list :list="state.searchList"></search-list>
<search-list
no-data-text="نتیجه‌ای یافت نشد!"
no-data-icon="/img/no-data.png"
:list="state.searchList"
></search-list>
</div>
</div>
</div>
@ -119,14 +122,14 @@ const renderContent = (payload) => {
</template>
<style scoped>
.bg-container {
.background-image {
min-height: 100%;
/* height: 100dvh; */
background-size: cover;
background-size: auto;
background-repeat: no-repeat;
}
.text-logo {
.logo-container {
padding-top: 4.5em;
position: relative;
@ -137,7 +140,7 @@ const renderContent = (payload) => {
line-height: 21px;
letter-spacing: 0%;
text-align: center;
color: #1b2132;
color: var(--ui-color-two);
}
.badge-style {
width: 100;
@ -161,13 +164,4 @@ const renderContent = (payload) => {
padding-bottom: 0 !important;
}
}
.no-data-text {
font-family: IRANSansX;
font-weight: 300;
font-size: 16px;
line-height: 24px;
letter-spacing: 0%;
text-align: center;
}
</style>