first commit
This commit is contained in:
commit
82aca89d0e
73
apis/hadithApi.js
Normal file
73
apis/hadithApi.js
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
export default {
|
||||||
|
items: {
|
||||||
|
get: "monir/search/get/byid/",
|
||||||
|
},
|
||||||
|
Farhanghestan: {
|
||||||
|
search_normal: "monir/search/0/10",
|
||||||
|
search_And: "monir/search/and/0/10",
|
||||||
|
search_Phrase: "monir/search/phrase/0/10",
|
||||||
|
search_Code: "monir/search/code/all/0/10",
|
||||||
|
},
|
||||||
|
subject: {
|
||||||
|
add: "sanad/subject/add",
|
||||||
|
// edit: "sanad/subject/edit",
|
||||||
|
delete: "sanad/subject/delete",
|
||||||
|
order: "monir/sanad/subject/order",
|
||||||
|
},
|
||||||
|
index: {
|
||||||
|
Index_one: "safheh212/one",
|
||||||
|
index_multi: "safheh212/multi",
|
||||||
|
},
|
||||||
|
nesha: {
|
||||||
|
search_normal: "monir/search/nesha/0/10",
|
||||||
|
},
|
||||||
|
wordSWeight: {
|
||||||
|
list: "ngrams/elastic/{{index_key}}/1to3",
|
||||||
|
},
|
||||||
|
rezome: {
|
||||||
|
add: "rezumeh",
|
||||||
|
get: "rezumeh/get",
|
||||||
|
},
|
||||||
|
navigation: {
|
||||||
|
list: "navigate/list/@entity",
|
||||||
|
report:
|
||||||
|
"navigate/report/{{index_key}}/{{offset}}/{{limit}}/{{aggs}}/{{filter}}",
|
||||||
|
reportItem: "navigate/report/items",
|
||||||
|
reportSubjectItem: "navigate/report/subject={{subject_title}}/items",
|
||||||
|
},
|
||||||
|
bnavigation: {
|
||||||
|
list: "repo/navigate/list",
|
||||||
|
report: "repo/navigate/report",
|
||||||
|
reportItem: "repo/navigate/report/items",
|
||||||
|
reportSubjectItem: "repo/navigate/report/subject={{subject_title}}/items",
|
||||||
|
},
|
||||||
|
schema: {
|
||||||
|
list: "schema",
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
autoComplate:
|
||||||
|
"{{appname}}/complation/{{index_key}}/{{filter}}",
|
||||||
|
logAutoComplate:
|
||||||
|
"searchlog/complation/{{filter}}",
|
||||||
|
default:
|
||||||
|
"{{appname}}/data/{{index_key}}/{{sortKey}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
queryNormal:
|
||||||
|
"{{appname}}/search/{{index_key}}/{{search_type}}/{{sortKey}}/{{field_collapse}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
textSearch:
|
||||||
|
"{{appname}}/search/text/{{index_key}}/{{field}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
},
|
||||||
|
chart: {
|
||||||
|
timeline: "{{appname}}/data/timeline/{{index_key}}",
|
||||||
|
xy: "{{appname}}/data/xy/{{index_key}}/{{field_key}}",
|
||||||
|
items:
|
||||||
|
"navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
chartTreeMap: "list/project/treemap/{{chart_key}}/{{filter}}",
|
||||||
|
treeItems:"navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
tree: "list/subject/list",
|
||||||
|
graph:"repo/majles/{{to_key}}/relation"
|
||||||
|
},
|
||||||
|
synonym:{
|
||||||
|
getSynonyms:"synonym/get/words",
|
||||||
|
synonymSearch:"search/qasection/synonym/@listkey/@offset/@limit/@q",
|
||||||
|
}
|
||||||
|
};
|
486
assets/hadith/scss/components/_modal-search.scss
Normal file
486
assets/hadith/scss/components/_modal-search.scss
Normal file
|
@ -0,0 +1,486 @@
|
||||||
|
.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 ;
|
||||||
|
}
|
||||||
|
|
71
assets/hadith/scss/components/search-line.scss
Normal file
71
assets/hadith/scss/components/search-line.scss
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
841
assets/hadith/scss/components/search_navigation.scss
Normal file
841
assets/hadith/scss/components/search_navigation.scss
Normal file
|
@ -0,0 +1,841 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
589
assets/hadith/scss/components/top-header.scss
Normal file
589
assets/hadith/scss/components/top-header.scss
Normal file
|
@ -0,0 +1,589 @@
|
||||||
|
// .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;
|
||||||
|
// }
|
||||||
|
// // }
|
||||||
|
// }
|
307
assets/hadith/scss/hadith.scss
Normal file
307
assets/hadith/scss/hadith.scss
Normal file
|
@ -0,0 +1,307 @@
|
||||||
|
.search-system {
|
||||||
|
// @import "./components/_modal-search";
|
||||||
|
@import "./components/search_navigation.scss";
|
||||||
|
|
||||||
|
.main-page__content {
|
||||||
|
margin-right: var(--sidebar-collapsed-width);
|
||||||
|
|
||||||
|
&.expanded {
|
||||||
|
margin-right: var(--sidebar-width);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container {
|
||||||
|
.input-group {
|
||||||
|
/* justify-content: space-between; */
|
||||||
|
border-radius: 50px;
|
||||||
|
.form-control {
|
||||||
|
border: 0;
|
||||||
|
// border-left: 1px solid #eee;
|
||||||
|
height: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-append {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
right: -1px;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
border-right: 1px solid #ddd;
|
||||||
|
height: 60%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
border-radius: 50px 0 0 50px;
|
||||||
|
// background-color: #fff;
|
||||||
|
// color:#6f6f6f;
|
||||||
|
// min-width: 5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-logic {
|
||||||
|
.float-label {
|
||||||
|
position: absolute;
|
||||||
|
top: -1.5em;
|
||||||
|
right: 0;
|
||||||
|
background-color: #e6e7e8;
|
||||||
|
padding: 0 1em;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: #111;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// .search-icon {
|
||||||
|
// background-color: #00baba;
|
||||||
|
// }
|
||||||
|
// .search-icon:hover {
|
||||||
|
// background-color: #088585;
|
||||||
|
// }
|
||||||
|
|
||||||
|
.search-items {
|
||||||
|
overflow-y: auto;
|
||||||
|
height: calc(100vh - 10.5em);
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle--button {
|
||||||
|
position: absolute;
|
||||||
|
border: 1px solid;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 2em;
|
||||||
|
z-index: 150;
|
||||||
|
height: 2em;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
// right: 48px;
|
||||||
|
}
|
||||||
|
svg {
|
||||||
|
width: 25px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// .main-tree {
|
||||||
|
// &.category_list {
|
||||||
|
// padding: 2em 1em;
|
||||||
|
// width: 22em;
|
||||||
|
// max-width: 100%;
|
||||||
|
// background-color: #fff;
|
||||||
|
// border-left: 1px solid #f2f2e6;
|
||||||
|
// height: calc(100dvh - 13em);
|
||||||
|
// overflow-y: auto;
|
||||||
|
// transition: width 0.2s;
|
||||||
|
|
||||||
|
// &.custome-mode {
|
||||||
|
// height: calc(100dvh - 8em);
|
||||||
|
// // : 'calc(100dvh - 6em)',
|
||||||
|
// }
|
||||||
|
|
||||||
|
// .filter-list {
|
||||||
|
// .filter-list {
|
||||||
|
// white-space: nowrap;
|
||||||
|
// overflow-x: auto;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
.main-tree-select {
|
||||||
|
.form-control {
|
||||||
|
border-radius: 0.35rem !important;
|
||||||
|
width: 92% !important;
|
||||||
|
margin: 15px auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.advanced-search {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 1em;
|
||||||
|
|
||||||
|
width: 20em;
|
||||||
|
// height: calc(100dvh - 10em);
|
||||||
|
overflow-y: auto;
|
||||||
|
background: #fff;
|
||||||
|
z-index: 99;
|
||||||
|
// 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);
|
||||||
|
// border-radius: 0.25em;
|
||||||
|
|
||||||
|
border-radius: 0 0.75rem 0 0.75rem;
|
||||||
|
background-color: rgb(255, 255, 255);
|
||||||
|
padding: 1rem;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
|
||||||
|
|
||||||
|
.multiselect__tags {
|
||||||
|
border: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-close-form {
|
||||||
|
&:hover {
|
||||||
|
color: #6acfef;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.bottom-close-form {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 7em !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// .search-page__search.in-search {
|
||||||
|
// input {
|
||||||
|
// padding-right: 5em !important;
|
||||||
|
// border: 1px solid transparent;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
.form-group {
|
||||||
|
&.inside-advanced-search {
|
||||||
|
.form-control {
|
||||||
|
// border-radius: 0.5em;
|
||||||
|
border: 1px solid #ced4da;
|
||||||
|
// padding: 1.2em;
|
||||||
|
// width: 14em;
|
||||||
|
&:focus {
|
||||||
|
border: 1px solid #61bb9e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.date-picker {
|
||||||
|
.vpd-input-group {
|
||||||
|
direction: ltr;
|
||||||
|
.vpd-icon-btn {
|
||||||
|
margin-bottom: 0;
|
||||||
|
// position: absolute;
|
||||||
|
// right: 15.6em;
|
||||||
|
// height: 3em;
|
||||||
|
border-radius: 0.5em 0em 0em 0.5em;
|
||||||
|
}
|
||||||
|
.form-control {
|
||||||
|
border-radius: 0 0.5em 0.5em 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.select.in-advanced-search {
|
||||||
|
// padding: 0.3em !important;
|
||||||
|
// border-radius: 0.5em;
|
||||||
|
font-size: 1rem;
|
||||||
|
// height: 3em;
|
||||||
|
// width: 15em !important;
|
||||||
|
border: 1px solid #ced4da !important;
|
||||||
|
&:focus {
|
||||||
|
border: 1px solid rgb(127, 170, 170) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// .tribute.in-advanced-search {
|
||||||
|
// width: 18em !important;
|
||||||
|
// }
|
||||||
|
// .form-control {
|
||||||
|
// height: 2.2em;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
// background-color: var(--primary-color);
|
||||||
|
// background-color: var(--majles-bg-primary);
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
// color: #fff;
|
||||||
|
padding: 0.35em 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.multiselect {
|
||||||
|
min-height: 30px;
|
||||||
|
|
||||||
|
.multiselect__select {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.multiselect__tags {
|
||||||
|
min-height: 30px;
|
||||||
|
padding: 0px 8px 0 40px;
|
||||||
|
border: 2px solid rgb(127, 170, 170);
|
||||||
|
.multiselect__input,
|
||||||
|
.multiselect__single {
|
||||||
|
min-height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-group-prepend {
|
||||||
|
button {
|
||||||
|
&:hover {
|
||||||
|
color: var(--text-primary-highlight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.majles-header-color {
|
||||||
|
// background: linear-gradient(to top, #fcfcfc 0%, #eee 90%);
|
||||||
|
background: rgb(230, 231, 232);
|
||||||
|
.input-group-prepend {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 0 50px 50px 0;
|
||||||
|
}
|
||||||
|
.dropdown-toggle-color {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.nav-tabs .float-label {
|
||||||
|
background-color: #e6e7e8;
|
||||||
|
top: -1.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.monir-header-color {
|
||||||
|
// background: linear-gradient(to bottom, #fcfcfc 0%, #eee 90%);
|
||||||
|
background: rgb(230, 231, 232);
|
||||||
|
|
||||||
|
.input-group-prepend {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 0 50px 50px 0;
|
||||||
|
}
|
||||||
|
.dropdown-toggle-color {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.nav-tabs .float-label {
|
||||||
|
background-color: #e6e7e8;
|
||||||
|
top: -1.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.searchResult {
|
||||||
|
.my-table {
|
||||||
|
.table-responsive {
|
||||||
|
table {
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
// .text-center {
|
||||||
|
color: #000;
|
||||||
|
// font-family: sahel-semi-bold;
|
||||||
|
// font-size: 1em;
|
||||||
|
// }
|
||||||
|
// .text-right {
|
||||||
|
// a {
|
||||||
|
// color: #000000 !important;
|
||||||
|
// font-family: sahel-semi-bold;
|
||||||
|
// font-size: 1em;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@import "./responsive/responsive";
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
.comment-list .comments .comment-container.replayer .comment {
|
||||||
|
max-width: 20em;
|
||||||
|
}
|
130
assets/hadith/scss/responsive/max_width/991/_group.scss
Normal file
130
assets/hadith/scss/responsive/max_width/991/_group.scss
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
40
assets/hadith/scss/responsive/max_width/991/_replays.scss
Normal file
40
assets/hadith/scss/responsive/max_width/991/_replays.scss
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
#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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
78
assets/hadith/scss/responsive/max_width/991/_the-footer.scss
Normal file
78
assets/hadith/scss/responsive/max_width/991/_the-footer.scss
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
.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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
126
assets/hadith/scss/responsive/max_width/991/chat-list.scss
Normal file
126
assets/hadith/scss/responsive/max_width/991/chat-list.scss
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
157
assets/hadith/scss/responsive/max_width/max_width.scss
Normal file
157
assets/hadith/scss/responsive/max_width/max_width.scss
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
// 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";
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
@media only screen and (min-width: 576px) and (max-width: 767.98px){
|
||||||
|
.majles-search-table {
|
||||||
|
.table-responsive {
|
||||||
|
height: calc(-17em + 100vh);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
78
assets/hadith/scss/responsive/min_width/400/_group.scss
Normal file
78
assets/hadith/scss/responsive/min_width/400/_group.scss
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
80
assets/hadith/scss/responsive/min_width/576/_group.scss
Normal file
80
assets/hadith/scss/responsive/min_width/576/_group.scss
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
81
assets/hadith/scss/responsive/min_width/768/_group.scss
Normal file
81
assets/hadith/scss/responsive/min_width/768/_group.scss
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
81
assets/hadith/scss/responsive/min_width/992/_group.scss
Normal file
81
assets/hadith/scss/responsive/min_width/992/_group.scss
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
.mobile-footer {
|
||||||
|
display: none;
|
||||||
|
}
|
63
assets/hadith/scss/responsive/min_width/min-width.scss
Normal file
63
assets/hadith/scss/responsive/min_width/min-width.scss
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
// 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) {}
|
12
assets/hadith/scss/responsive/responsive.scss
Normal file
12
assets/hadith/scss/responsive/responsive.scss
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
// 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";
|
557
components/hadith/AutoComplation.vue
Normal file
557
components/hadith/AutoComplation.vue
Normal file
|
@ -0,0 +1,557 @@
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="input-group"
|
||||||
|
@keyup="keyupdiv"
|
||||||
|
:style="{
|
||||||
|
showAppend: { 'box-shadow': '0 1px 3px rgba(23, 23, 23, 0.24)' },
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<button
|
||||||
|
v-if="showPrepend"
|
||||||
|
dir="rtl"
|
||||||
|
class="btn d-flex align-items-center"
|
||||||
|
type="button"
|
||||||
|
id="button-addon2"
|
||||||
|
@click="searchNavigateList()"
|
||||||
|
>
|
||||||
|
جستجو
|
||||||
|
<span class="tavasi tavasi-Component-198--1"></span>
|
||||||
|
</button>
|
||||||
|
<span v-else style="opacity: 0">xxx</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
v-model="localTextSearch"
|
||||||
|
@click="showHisory()"
|
||||||
|
@keyup.enter="prevSearchStart"
|
||||||
|
@keyup="toggleAutocomplete"
|
||||||
|
@keydown="onKeyDown()"
|
||||||
|
class="form-control"
|
||||||
|
id="search"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
autocomplete="off"
|
||||||
|
ref="searchinput"
|
||||||
|
@focus="setInputFocus()"
|
||||||
|
@blur="inputfocused = false"
|
||||||
|
v-focus
|
||||||
|
/>
|
||||||
|
<div :class="[showAppend ? 'input-group-text' : 'input-group-append']">
|
||||||
|
<client-only>
|
||||||
|
<template v-if="showAppend">
|
||||||
|
<button
|
||||||
|
v-tooltip="'جستجو در خاصیت(فیلد) ویژه'"
|
||||||
|
class="btn dropdown-toggle dropdown-toggle-color rounded-0"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="dropdown"
|
||||||
|
aria-haspopup="true"
|
||||||
|
aria-expanded="false"
|
||||||
|
id="dropdownMenuButton12"
|
||||||
|
>
|
||||||
|
<span class="navItemlabel">
|
||||||
|
{{ domainActiveGetter?.label }}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton12">
|
||||||
|
<button
|
||||||
|
v-for="(navItem, index) in searchDomain"
|
||||||
|
:key="index"
|
||||||
|
type="button"
|
||||||
|
class="dropdown-item"
|
||||||
|
@click.prevent="setDomainField(navItem)"
|
||||||
|
>
|
||||||
|
{{ navItem.label }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</client-only>
|
||||||
|
|
||||||
|
<button
|
||||||
|
v-if="showAppendSearchButton"
|
||||||
|
v-tooltip="'جستجو در خاصیت(فیلد) ویژه'"
|
||||||
|
@click.prevent="prevSearchStart()"
|
||||||
|
class="btn btn-primary search-icon"
|
||||||
|
>
|
||||||
|
<svg class="icon icon-Component-198--1">
|
||||||
|
<use xlink:href="#icon-Component-198--1"></use>
|
||||||
|
</svg>
|
||||||
|
<!-- <NuxtImg src="@assets/common/img/searchmajles.svg" alt="" /> -->
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="inputPopupState == 3 && localListAutocomplate.length"
|
||||||
|
class="search-page__result firefox-scrollbar"
|
||||||
|
:class="{
|
||||||
|
show: localListAutocomplate.length,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<!-- v-click-outside="onClickOutside" -->
|
||||||
|
<client-only>
|
||||||
|
<ul ref="auto_complate_ul">
|
||||||
|
<li v-for="(item, i) in localListAutocomplate" :key="i" :value="i">
|
||||||
|
<a @click.prevent="selectAutocomplate2(item)">
|
||||||
|
<span
|
||||||
|
class="text__14"
|
||||||
|
v-html="getHighlightAutocomplate(item)"
|
||||||
|
></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</client-only>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="inputPopupState == 1" class="search-page__result show">
|
||||||
|
<!-- v-click-outside="onClickOutside" -->
|
||||||
|
<client-only>
|
||||||
|
<template v-if="historySearch.length">
|
||||||
|
<div>
|
||||||
|
<div class="scrollbar">
|
||||||
|
<ul ref="his_ul">
|
||||||
|
<li v-for="(item, i) in historySearch" :key="i" :data-key="i">
|
||||||
|
<a @click.prevent="selectHistorySearch(item)">
|
||||||
|
<NuxtImg
|
||||||
|
src="assets/common/img/Component 359 – 2.svg"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<span class="text__14">{{ item }}</span>
|
||||||
|
</a>
|
||||||
|
<a @click="removeHistorySearch(i)" class="close">
|
||||||
|
<svg class="icon icon-Component-294--1">
|
||||||
|
<use xlink:href="#icon-Component-294--1"></use>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="scrollbar">
|
||||||
|
<ul ref="">
|
||||||
|
<li>
|
||||||
|
<p class="m-0 text__light">
|
||||||
|
<NuxtImg
|
||||||
|
src="assets/common/img/Component 359 – 2.svg"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<span class="text__14"> تاریخچه جستجو خالی می باشد </span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</client-only>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "pinia";
|
||||||
|
import searchApi from "../../apis/searchApi.js";
|
||||||
|
import { useSearchStore } from "../../stores/searchStore";
|
||||||
|
|
||||||
|
// Vue.directive("click-outside", {
|
||||||
|
// bind(el, binding, vnode) {
|
||||||
|
// el.clickOutsideEvent = (event) => {
|
||||||
|
// if (!(el === event.target || el.contains(event.target))) {
|
||||||
|
// vnode.context[binding.expression](event);
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// document.body.addEventListener("click", el.clickOutsideEvent);
|
||||||
|
// },
|
||||||
|
// unbind(el) {
|
||||||
|
// document.body.removeEventListener("click", el.clickOutsideEvent);
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
placeholder: {
|
||||||
|
default: "جستجو در هزاران محتوای قوانین و مقرارت",
|
||||||
|
},
|
||||||
|
contentKey: {
|
||||||
|
default: "qasection",
|
||||||
|
},
|
||||||
|
entityTheme: {
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
showAppendSearchButton: {
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
showPrepend: {
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
showAppend: {
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
textSearch: {
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
modeInit: {
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
searchDomain: {
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
listAutocomplate: {
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
emits: ["getAutoComplateList"],
|
||||||
|
watch: {
|
||||||
|
modeInit(newVal = 1) {
|
||||||
|
this.mode = newVal;
|
||||||
|
},
|
||||||
|
textSearch(newVal) {
|
||||||
|
this.localTextSearch = newVal;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
beforeMount() {
|
||||||
|
// this.inputPopupState = this.inputPopupState;
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.localTextSearch = this.textSearch;
|
||||||
|
|
||||||
|
if (window.localStorage.getItem([this.historySearchRecent])) {
|
||||||
|
try {
|
||||||
|
this.historySearch = JSON.parse(
|
||||||
|
window.localStorage.getItem([this.historySearchRecent])
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
window.localStorage.removeItem([this.historySearchRecent]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
window.removeEventListener("resize", this.handleResize);
|
||||||
|
window.removeEventListener("load", this.handleResize);
|
||||||
|
document.removeEventListener("click", this.handleClickOutside);
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
localListAutocomplate: [],
|
||||||
|
typingTimer: undefined,
|
||||||
|
doneTypingInterval: 800,
|
||||||
|
localTextSearch: "",
|
||||||
|
historySearch: [],
|
||||||
|
|
||||||
|
inputPopupState: 0,
|
||||||
|
mode: 1,
|
||||||
|
tagLiSelected: null,
|
||||||
|
inputfocused: false,
|
||||||
|
isLastKeyCodeArrow: false,
|
||||||
|
historySearchRecent: "historysearchrecent",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(useSearchStore, [
|
||||||
|
"domainActiveGetter",
|
||||||
|
"searchActiveTabGetter",
|
||||||
|
"searchSchemaGetter",
|
||||||
|
"searchSynonymTitleGetter",
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* تنظیم آیتم انتخاب شده و شروع جستجو.
|
||||||
|
* @param {Object} navItem - آیتم انتخابشده.
|
||||||
|
*/
|
||||||
|
setDomainField(navItem) {
|
||||||
|
this.$emit("onSetDomainField", navItem);
|
||||||
|
// this.prevSearchStart();
|
||||||
|
},
|
||||||
|
async getAutoComplateList() {
|
||||||
|
this.localListAutocomplate = [];
|
||||||
|
if (this.localTextSearch == "") return;
|
||||||
|
|
||||||
|
let index_key = this.contentKey;
|
||||||
|
if (!index_key) return;
|
||||||
|
|
||||||
|
let url = searchApi.search.autoComplate;
|
||||||
|
|
||||||
|
url = url.replace("{{appname}}", buildName());
|
||||||
|
url = url.replace("{{index_key}}", index_key);
|
||||||
|
url = url.replace("{{filter}}", "q=" + this.localTextSearch);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { $api } = useNuxtApp();
|
||||||
|
const response = await $api(url, {
|
||||||
|
baseURL: repoUrl(),
|
||||||
|
});
|
||||||
|
|
||||||
|
this.localListAutocomplate = response.hits?.hits;
|
||||||
|
this.inputPopupState = 3;
|
||||||
|
} catch (err) {}
|
||||||
|
},
|
||||||
|
|
||||||
|
onKeyDown() {
|
||||||
|
clearTimeout(this.typingTimer);
|
||||||
|
this.typingTimer = undefined;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* کنترل تایمر تکمیل خودکار و ارسال کوئری.
|
||||||
|
* تایمر فعلی را پاک میکند و یک تایمر جدید با یک تاخیر مشخص تنظیم میکند تا کوئری را ارسال کند.
|
||||||
|
*/
|
||||||
|
toggleAutocomplete(event) {
|
||||||
|
// برای کلید حرکت پایین درخواست اضافی نرود
|
||||||
|
if (
|
||||||
|
event.keyCode === 40 ||
|
||||||
|
event.keyCode === 38 ||
|
||||||
|
event.keyCode === 13
|
||||||
|
) {
|
||||||
|
this.isLastKeyCodeArrow = event.keyCode === 40 || event.keyCode === 38;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.isLastKeyCodeArrow = false;
|
||||||
|
|
||||||
|
if (!this.inputfocused && this.inputPopupState === 3) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.typingTimer) {
|
||||||
|
clearTimeout(this.typingTimer);
|
||||||
|
this.typingTimer = undefined;
|
||||||
|
} else {
|
||||||
|
this.typingTimer = setTimeout(() => {
|
||||||
|
this.getAutoComplateList();
|
||||||
|
this.typingTimer = undefined;
|
||||||
|
}, this.doneTypingInterval);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setInputFocus() {
|
||||||
|
this.inputfocused = true;
|
||||||
|
// this.inputPopupfocused=false
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* شروع جستجو را کنترل میکند.
|
||||||
|
* @event prevSearchStart
|
||||||
|
*/
|
||||||
|
prevSearchStart(event) {
|
||||||
|
if (
|
||||||
|
this.isLastKeyCodeArrow &&
|
||||||
|
event.keyCode === 13 &&
|
||||||
|
this.inputPopupState != 0
|
||||||
|
) {
|
||||||
|
this.selectAutocomplate2();
|
||||||
|
this.isLastKeyCodeArrow = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.tagLiSelected = null;
|
||||||
|
this.inputPopupState = 0;
|
||||||
|
this.addHistorySearch(this.localTextSearch);
|
||||||
|
|
||||||
|
let tt = myEncodeQuery(this.localTextSearch);
|
||||||
|
this.$emit("onSearchStart", tt);
|
||||||
|
// this.searchStart(tt);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*نمایش سابقه جستجو.
|
||||||
|
*/
|
||||||
|
showHisory() {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.localTextSearch == "") this.inputPopupState = 1;
|
||||||
|
else {
|
||||||
|
this.inputPopupState = 0;
|
||||||
|
this.tagLiSelected = null;
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* کنترل کلیکهای خارج از المان.
|
||||||
|
*/
|
||||||
|
keyupdiv(event) {
|
||||||
|
// 13:enter
|
||||||
|
// 8:backspace
|
||||||
|
if (this.inputfocused == false) return;
|
||||||
|
if (this.inputPopupState == 0 || this.inputPopupState == 2) return;
|
||||||
|
var el = "";
|
||||||
|
el =
|
||||||
|
this.inputPopupState == 1
|
||||||
|
? this.$refs["his_ul"]
|
||||||
|
: this.$refs["auto_complate_ul"];
|
||||||
|
|
||||||
|
if (!el || !el.firstChild) return;
|
||||||
|
|
||||||
|
const selectItem = (item) => {
|
||||||
|
this.tagLiSelected = item;
|
||||||
|
this.tagLiSelected?.classList.add("selected");
|
||||||
|
this.tagLiSelected?.focus();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 40: arrow down
|
||||||
|
// 38: arrow up
|
||||||
|
if (this.inputfocused == true && event.keyCode === 40) {
|
||||||
|
if (this.tagLiSelected) {
|
||||||
|
this.tagLiSelected?.classList.remove("selected");
|
||||||
|
const next = this.tagLiSelected?.nextSibling || el.firstChild;
|
||||||
|
selectItem(next);
|
||||||
|
} else {
|
||||||
|
selectItem(el?.firstChild);
|
||||||
|
}
|
||||||
|
} else if (this.inputfocused == true && event.keyCode === 38) {
|
||||||
|
if (this.tagLiSelected) {
|
||||||
|
this.tagLiSelected?.classList.remove("selected");
|
||||||
|
const prev = this.tagLiSelected?.previousSibling || el.lastChild;
|
||||||
|
selectItem(prev);
|
||||||
|
} else {
|
||||||
|
selectItem(el?.lastChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 46: delete
|
||||||
|
else if (this.inputfocused == true && event.keyCode === 46) {
|
||||||
|
let index = this.tagLiSelected?.getAttribute("data-key");
|
||||||
|
|
||||||
|
this.removeHistorySearch(index);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onClickOutside() {
|
||||||
|
if (this.inputPopupState == 1 || this.inputPopupState == 3) {
|
||||||
|
this.inputPopupState = 0;
|
||||||
|
this.tagLiSelected = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectAutocomplate(item) {
|
||||||
|
this.tagLiSelected = null;
|
||||||
|
this.inputPopupState = 0;
|
||||||
|
this.localTextSearch = item;
|
||||||
|
|
||||||
|
this.$emit("onSearchStart", this.localTextSearch);
|
||||||
|
// this.$emit("onSearchStart", {
|
||||||
|
// textSearch: this.localTextSearch,
|
||||||
|
// searchItem: item,
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
|
||||||
|
selectHistorySearch(item) {
|
||||||
|
this.localTextSearch = item;
|
||||||
|
this.$emit("onSearchStart", this.localTextSearch);
|
||||||
|
},
|
||||||
|
|
||||||
|
removeHistorySearch(x) {
|
||||||
|
this.tagLiSelected = null;
|
||||||
|
this.historySearch.splice(x, 1);
|
||||||
|
this.saveHistorySearch();
|
||||||
|
},
|
||||||
|
saveHistorySearch() {
|
||||||
|
const parsed = JSON.stringify(this.historySearch);
|
||||||
|
window.localStorage.setItem([this.historySearchRecent], parsed);
|
||||||
|
},
|
||||||
|
getHighlightAutocomplate(item) {
|
||||||
|
if (!item) return "";
|
||||||
|
|
||||||
|
let html = "";
|
||||||
|
|
||||||
|
let key = "title";
|
||||||
|
if (this.contentKey == "qasection" || this.contentKey == "rgsection") {
|
||||||
|
key = "qanon_title";
|
||||||
|
if (item?.highlight[key]) html = item.highlight[key][0];
|
||||||
|
if (!html) {
|
||||||
|
let key1 = key + ".ph";
|
||||||
|
if (item?.highlight[key1]) html = item.highlight[key1][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!html) {
|
||||||
|
let key1 = key + ".fa";
|
||||||
|
if (item?.highlight[key1]) html = item.highlight[key1][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
let key2 = "ts_date";
|
||||||
|
if (item?._source[key2]) {
|
||||||
|
html += `<span style="color: #a7a098;"> - تاریخ: ${item._source[key2]}</span>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.contentKey == "sanad") {
|
||||||
|
Object.values(item?.highlight).forEach((element, index) => {
|
||||||
|
html += element[0];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return html;
|
||||||
|
},
|
||||||
|
|
||||||
|
addHistorySearch(newSearch = "") {
|
||||||
|
if (newSearch == "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var index = this.historySearch.indexOf(newSearch);
|
||||||
|
if (index != -1) {
|
||||||
|
this.historySearch.splice(index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.historySearch.unshift(newSearch);
|
||||||
|
this.saveHistorySearch();
|
||||||
|
},
|
||||||
|
saveHistorySearch() {
|
||||||
|
const parsed = JSON.stringify(this.historySearch);
|
||||||
|
window.localStorage.setItem([this.historySearchRecent], parsed);
|
||||||
|
},
|
||||||
|
|
||||||
|
selectAutocomplate2(item) {
|
||||||
|
if (!item) {
|
||||||
|
if (this.localListAutocomplate.length) {
|
||||||
|
item = this.localListAutocomplate[this.tagLiSelected?.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let key = "title";
|
||||||
|
if (this.contentKey == "qasection" || this.contentKey == "rgsection")
|
||||||
|
key = "qanon_title";
|
||||||
|
|
||||||
|
this.inputfocused = false;
|
||||||
|
this.searchinput?.blur();
|
||||||
|
this.localTextSearch = item?._source[key];
|
||||||
|
|
||||||
|
this.$emit("onSearchStart", this.localTextSearch);
|
||||||
|
// this.$emit("onSearchStart", {
|
||||||
|
// textSearch: this.localTextSearch,
|
||||||
|
// searchItem: item,
|
||||||
|
// });
|
||||||
|
|
||||||
|
if (!item) {
|
||||||
|
this.localTextSearch = this.tagLiSelected?.innerText;
|
||||||
|
this.addHistorySearch(this.localTextSearch);
|
||||||
|
|
||||||
|
let tt = myEncodeQuery(this.localTextSearch);
|
||||||
|
|
||||||
|
this.$emit("onSearchStart", tt);
|
||||||
|
// this.$emit("onSearchStart", { textSearch: tt, searchItem: item });
|
||||||
|
}
|
||||||
|
|
||||||
|
this.inputPopupState = 0;
|
||||||
|
this.tagLiSelected = null;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.entityTheme {
|
||||||
|
.btn {
|
||||||
|
border-radius: 0.5rem 0 0 0.5rem !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.close {
|
||||||
|
svg {
|
||||||
|
font-size: 0.5em;
|
||||||
|
&:hover {
|
||||||
|
color: #ef4444 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.search-page__result.show {
|
||||||
|
border-radius: 0.5em !important;
|
||||||
|
}
|
||||||
|
.input-group-text {
|
||||||
|
background-color: #fff !important;
|
||||||
|
}
|
||||||
|
</style>
|
87
components/hadith/Dropdown.vue
Normal file
87
components/hadith/Dropdown.vue
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
// label - The label of the item.
|
||||||
|
// labelClass - The class of the item label.
|
||||||
|
// icon - The icon of the item.
|
||||||
|
// iconClass - The class of the item icon.
|
||||||
|
// avatar - The avatar of the item. You can pass all the props of the Avatar component.
|
||||||
|
// shortcuts - The shortcuts of the item.
|
||||||
|
// slot - The slot of the item.
|
||||||
|
// disabled - Whether the item is disabled.
|
||||||
|
// class - The class of the item.
|
||||||
|
// click - The click handler of the item.
|
||||||
|
|
||||||
|
const items = [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
label: "Profile",
|
||||||
|
avatar: {
|
||||||
|
src: "https://avatars.githubusercontent.com/u/739984?v=4",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
label: "Edit",
|
||||||
|
icon: "i-heroicons-pencil-square-20-solid",
|
||||||
|
shortcuts: ["E"],
|
||||||
|
click: () => {
|
||||||
|
console.log("Edit");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Duplicate",
|
||||||
|
icon: "i-heroicons-document-duplicate-20-solid",
|
||||||
|
shortcuts: ["D"],
|
||||||
|
disabled: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
label: "Archive",
|
||||||
|
icon: "i-heroicons-archive-box-20-solid",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Move",
|
||||||
|
icon: "i-heroicons-arrow-right-circle-20-solid",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
label: "Delete",
|
||||||
|
icon: "i-heroicons-trash-20-solid",
|
||||||
|
shortcuts: ["⌘", "D"],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<UDropdown
|
||||||
|
mode="hover"
|
||||||
|
:items="items"
|
||||||
|
:popper="{ placement: 'bottom-start' }"
|
||||||
|
>
|
||||||
|
<UButton
|
||||||
|
color="white"
|
||||||
|
label="Options"
|
||||||
|
trailing-icon="i-heroicons-chevron-down-20-solid"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- <template #account="{ item }">
|
||||||
|
<div class="text-left">
|
||||||
|
<p>
|
||||||
|
Signed in as
|
||||||
|
</p>
|
||||||
|
<p class="truncate font-medium text-gray-900 dark:text-white">
|
||||||
|
{{ item.label }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #item="{ item }">
|
||||||
|
<span class="truncate">{{ item.label }}</span>
|
||||||
|
|
||||||
|
<UIcon :name="item.icon" class="flex-shrink-0 h-4 w-4 text-gray-400 dark:text-gray-500 ms-auto" />
|
||||||
|
</template> -->
|
||||||
|
</UDropdown>
|
||||||
|
</template>
|
900
components/hadith/FooterMenu.vue
Normal file
900
components/hadith/FooterMenu.vue
Normal file
|
@ -0,0 +1,900 @@
|
||||||
|
<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>
|
900
components/hadith/LibraryTree.vue
Normal file
900
components/hadith/LibraryTree.vue
Normal file
|
@ -0,0 +1,900 @@
|
||||||
|
<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>
|
900
components/hadith/SearchTopHeader.vue
Normal file
900
components/hadith/SearchTopHeader.vue
Normal file
|
@ -0,0 +1,900 @@
|
||||||
|
<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>
|
36
json/hadith/json/menu.json
Normal file
36
json/hadith/json/menu.json
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
"reports": [
|
||||||
|
{
|
||||||
|
"icon": "Home-21",
|
||||||
|
"color": 1,
|
||||||
|
"link": "defaultRoute",
|
||||||
|
"actionMode": 1,
|
||||||
|
"title": "خانه",
|
||||||
|
"translateKey": "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "Component-198--1",
|
||||||
|
"color": 3,
|
||||||
|
"link": "search",
|
||||||
|
"actionMode": 3,
|
||||||
|
"title": "جستجو",
|
||||||
|
"translateKey": "Search"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "Component-68--1",
|
||||||
|
"color": 3,
|
||||||
|
"link": "searchNavigation",
|
||||||
|
"actionMode": 3,
|
||||||
|
"title": "فهرست",
|
||||||
|
"translateKey": "List"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "reports",
|
||||||
|
"color": 3,
|
||||||
|
"link": "searchChart",
|
||||||
|
"actionMode": 3,
|
||||||
|
"title": "نمودار",
|
||||||
|
"translateKey": "Chart"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
12
json/hadith/json/sidbarMenuMin.json
Normal file
12
json/hadith/json/sidbarMenuMin.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"reports": [
|
||||||
|
{
|
||||||
|
"icon": "Home-21",
|
||||||
|
"color": 1,
|
||||||
|
"link": "defaultRoute",
|
||||||
|
"actionMode": 1,
|
||||||
|
"title": "خانه",
|
||||||
|
"translateKey": "Dashboard"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
16
json/hadith/json/sidebar.json
Normal file
16
json/hadith/json/sidebar.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"color": 1,
|
||||||
|
"icon": "reports",
|
||||||
|
"link": "managementReports",
|
||||||
|
"title": "آمار",
|
||||||
|
"translateKey": "Statistics"
|
||||||
|
},{
|
||||||
|
"color": 2,
|
||||||
|
"icon": "settings",
|
||||||
|
"link": "managementSetting",
|
||||||
|
"title": "تنظیمات",
|
||||||
|
"translateKey": "Settings"
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
56
layouts/HadithLayout.vue
Normal file
56
layouts/HadithLayout.vue
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
<template>
|
||||||
|
<main >
|
||||||
|
<the-sidebar :showUserAvatar="true" :menu="$attrs.menu"></the-sidebar>
|
||||||
|
|
||||||
|
<section
|
||||||
|
class="main-page__content"
|
||||||
|
:class="{ expanded: !isSidebarCollapsed }"
|
||||||
|
>
|
||||||
|
<slot name="named-slot"></slot>
|
||||||
|
<slot></slot>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import { mapActions, mapState } from "pinia";
|
||||||
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
|
import { clearBodyClass } from "@manuals/utilities";
|
||||||
|
import { mapState } from "pinia";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
beforeMount() {
|
||||||
|
clearBodyClass();
|
||||||
|
// this.uuid = Math.floor(Math.random() * 100);
|
||||||
|
// document.title = import.meta.env.VITE_SEARCH_PAGE_TITLE;
|
||||||
|
},
|
||||||
|
// mounted() {
|
||||||
|
// this.setBodyClass(this.$attrs.bodyClass);
|
||||||
|
// },
|
||||||
|
destroyed() {
|
||||||
|
clearBodyClass();
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
uuid: undefined,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(useCommonStore, ["isSidebarCollapsed"]),
|
||||||
|
},
|
||||||
|
// methods: {
|
||||||
|
// ...mapActions(useCommonStore, ["setBodyClass"]),
|
||||||
|
// },
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/*@import "../../assets/scss/projects/tahrir/tahrir";*/
|
||||||
|
/*@import "../../assets/scss/projects/list/list";*/
|
||||||
|
@import "../assets/search/scss/search";
|
||||||
|
|
||||||
|
.search-system .modal-backdrop.show {
|
||||||
|
display: block;
|
||||||
|
background-color: #0000003b;
|
||||||
|
}
|
||||||
|
</style>
|
5
layouts/readme.md
Normal file
5
layouts/readme.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Layouts are wrappers around pages that contain a common User Interface for several pages, such as
|
||||||
|
a header and footer display. Layouts are Vue files using <slot /> components to display the page
|
||||||
|
content. The layouts/default.vue file will be used by default. Custom layouts can be set as part of
|
||||||
|
your page metadata.
|
||||||
|
If you only have a single layout in your application, we recommend using app.vue with <NuxtPage /> instead.
|
512
pages/hadith/(show)/EntityAddDraft.vue
Normal file
512
pages/hadith/(show)/EntityAddDraft.vue
Normal file
|
@ -0,0 +1,512 @@
|
||||||
|
<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>
|
327
pages/hadith/(show)/EntityListDraft.vue
Normal file
327
pages/hadith/(show)/EntityListDraft.vue
Normal file
|
@ -0,0 +1,327 @@
|
||||||
|
<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>
|
393
pages/hadith/(show)/NewEntity.vue
Normal file
393
pages/hadith/(show)/NewEntity.vue
Normal file
|
@ -0,0 +1,393 @@
|
||||||
|
<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"> افزودن مورد جدید: </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>
|
389
pages/hadith/(show)/[key]/[id]/EntityDetail.vue
Normal file
389
pages/hadith/(show)/[key]/[id]/EntityDetail.vue
Normal file
|
@ -0,0 +1,389 @@
|
||||||
|
<!-- برای نمایش یک جزء از قانون استفاده می شود -->
|
||||||
|
|
||||||
|
<!-- 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>
|
354
pages/hadith/(show)/[key]/[id]/EntityQRule.vue
Normal file
354
pages/hadith/(show)/[key]/[id]/EntityQRule.vue
Normal file
|
@ -0,0 +1,354 @@
|
||||||
|
<!-- برای نمایش یک جزء از قانون استفاده می شود -->
|
||||||
|
|
||||||
|
<!-- 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>
|
1838
pages/hadith/(show)/[key]/[id]/index.vue
Normal file
1838
pages/hadith/(show)/[key]/[id]/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
247
pages/hadith/chat.vue
Normal file
247
pages/hadith/chat.vue
Normal file
|
@ -0,0 +1,247 @@
|
||||||
|
<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>
|
257
pages/hadith/favorites/[id]/[slug]/index.vue
Normal file
257
pages/hadith/favorites/[id]/[slug]/index.vue
Normal file
|
@ -0,0 +1,257 @@
|
||||||
|
<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>
|
||||||
|
بستن
|
||||||
|
</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>
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@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>
|
257
pages/hadith/favorites/index.vue
Normal file
257
pages/hadith/favorites/index.vue
Normal file
|
@ -0,0 +1,257 @@
|
||||||
|
<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>
|
||||||
|
بستن
|
||||||
|
</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>
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@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>
|
1905
pages/hadith/hadith.vue
Normal file
1905
pages/hadith/hadith.vue
Normal file
File diff suppressed because it is too large
Load Diff
2058
pages/hadith/index.vue
Normal file
2058
pages/hadith/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
1206
pages/hadith/library/[id]/[slug]/index.vue
Normal file
1206
pages/hadith/library/[id]/[slug]/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
1206
pages/hadith/library/index.vue
Normal file
1206
pages/hadith/library/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
1206
pages/hadith/login.vue
Normal file
1206
pages/hadith/login.vue
Normal file
File diff suppressed because it is too large
Load Diff
247
pages/hadith/public-pages/about-us.vue
Normal file
247
pages/hadith/public-pages/about-us.vue
Normal file
|
@ -0,0 +1,247 @@
|
||||||
|
<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>
|
247
pages/hadith/public-pages/contact-us.vue
Normal file
247
pages/hadith/public-pages/contact-us.vue
Normal file
|
@ -0,0 +1,247 @@
|
||||||
|
<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>
|
247
pages/hadith/public-pages/rules.vue
Normal file
247
pages/hadith/public-pages/rules.vue
Normal file
|
@ -0,0 +1,247 @@
|
||||||
|
<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>
|
1206
pages/hadith/search.vue
Normal file
1206
pages/hadith/search.vue
Normal file
File diff suppressed because it is too large
Load Diff
228
stores/hadithStore.ts
Normal file
228
stores/hadithStore.ts
Normal file
|
@ -0,0 +1,228 @@
|
||||||
|
import type {
|
||||||
|
activeSearchChartSchema,
|
||||||
|
activeSearchListSchema,
|
||||||
|
Domain,
|
||||||
|
helpActiveSchema,
|
||||||
|
helpSchema,
|
||||||
|
searchActiveTab,
|
||||||
|
searchChartActiveTab,
|
||||||
|
searchListActiveTab,
|
||||||
|
searchSchema,
|
||||||
|
searchSynonymForm,
|
||||||
|
searchSynonymTitle,
|
||||||
|
selectionFilterItems,
|
||||||
|
} from "~/types/searchTypes";
|
||||||
|
|
||||||
|
import type {
|
||||||
|
isReturnFromItemshowPage,
|
||||||
|
list,
|
||||||
|
listComponentName,
|
||||||
|
listId,
|
||||||
|
projects,
|
||||||
|
selectedItem,
|
||||||
|
selectedProject,
|
||||||
|
} from "~/types/listTypes";
|
||||||
|
|
||||||
|
export const useSearchStore = defineStore("searchStore", {
|
||||||
|
persist: {
|
||||||
|
storage: piniaPluginPersistedstate.localStorage(),
|
||||||
|
}, state: () => ({
|
||||||
|
selectedProject: undefined as selectedProject | undefined,
|
||||||
|
isReturnFromItemshowPage: false as isReturnFromItemshowPage,
|
||||||
|
list: undefined as list | undefined,
|
||||||
|
listId: undefined as listId | undefined,
|
||||||
|
listComponentName: "ItemList" as listComponentName | undefined,
|
||||||
|
projects: [] as projects[],
|
||||||
|
// pieData: [],
|
||||||
|
selectedItem: undefined as selectedItem | undefined,
|
||||||
|
|
||||||
|
|
||||||
|
domainActive: undefined as Domain | undefined,
|
||||||
|
// activeTab: undefined,
|
||||||
|
|
||||||
|
searchActiveTab: undefined as searchActiveTab | undefined,
|
||||||
|
searchSchema: undefined as searchSchema | undefined,
|
||||||
|
helpSchema: undefined as helpSchema | undefined,
|
||||||
|
searchActiveSchema: undefined as searchActiveTab | undefined,
|
||||||
|
helpActiveSchema: undefined as helpActiveSchema | undefined,
|
||||||
|
|
||||||
|
searchListActiveTab: undefined as searchListActiveTab | undefined,
|
||||||
|
searchListSchema: undefined as searchListActiveTab[] | undefined,
|
||||||
|
activeSearchListSchema: undefined as activeSearchListSchema | undefined,
|
||||||
|
|
||||||
|
searchChartActiveTab: undefined as searchChartActiveTab | undefined,
|
||||||
|
searchChartSchema: undefined as searchChartActiveTab[] | undefined,
|
||||||
|
activeSearchChartSchema: undefined as activeSearchChartSchema | undefined,
|
||||||
|
|
||||||
|
searchSynonymTitle: undefined as searchSynonymTitle | undefined,
|
||||||
|
searchSynonymForm: undefined as searchSynonymForm | undefined,
|
||||||
|
|
||||||
|
selectionFilterItems: [] as selectionFilterItems,
|
||||||
|
}),
|
||||||
|
getters: {
|
||||||
|
projectsGetter(state) {
|
||||||
|
return state.projects;
|
||||||
|
},
|
||||||
|
selectedProjectGetter(state) {
|
||||||
|
return state.selectedProject;
|
||||||
|
},
|
||||||
|
listIdGetter(state) {
|
||||||
|
return state.listId;
|
||||||
|
},
|
||||||
|
listComponentNameGetter(state) {
|
||||||
|
return state.listComponentName;
|
||||||
|
},
|
||||||
|
selectedItemGetter(state) {
|
||||||
|
return state.selectedItem;
|
||||||
|
},
|
||||||
|
isReturnFromItemshowPageGetter(state) {
|
||||||
|
return state.isReturnFromItemshowPage;
|
||||||
|
},
|
||||||
|
listGetter(state) {
|
||||||
|
return state.list;
|
||||||
|
},
|
||||||
|
|
||||||
|
searchSynonymTitleGetter(state) {
|
||||||
|
return state.searchSynonymTitle;
|
||||||
|
},
|
||||||
|
searchSynonymFormGetter(state) {
|
||||||
|
return state.searchSynonymForm;
|
||||||
|
},
|
||||||
|
|
||||||
|
domainActiveGetter(state) {
|
||||||
|
return state.domainActive;
|
||||||
|
},
|
||||||
|
// activeTabGetter(state) {
|
||||||
|
// return state.activeTab;
|
||||||
|
// },
|
||||||
|
|
||||||
|
// search page
|
||||||
|
searchActiveTabGetter(state) {
|
||||||
|
return state.searchActiveTab;
|
||||||
|
},
|
||||||
|
searchSchemaGetter(state) {
|
||||||
|
return state.searchSchema;
|
||||||
|
},
|
||||||
|
helpSchemaGetter(state) {
|
||||||
|
return state.helpSchema;
|
||||||
|
},
|
||||||
|
helpActiveSchemaGetter(state) {
|
||||||
|
return state.helpActiveSchema;
|
||||||
|
},
|
||||||
|
searchActiveSchemaGetter(state) {
|
||||||
|
return state.searchActiveSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
// search list
|
||||||
|
searchListActiveTabGetter(state) {
|
||||||
|
return state.searchListActiveTab;
|
||||||
|
},
|
||||||
|
searchListSchemaGetter(state) {
|
||||||
|
return state.searchListSchema;
|
||||||
|
},
|
||||||
|
searchListActiveSchemaGetter(state) {
|
||||||
|
return state.activeSearchListSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
// search chart
|
||||||
|
searchChartActiveTabGetter(state) {
|
||||||
|
return state.searchChartActiveTab;
|
||||||
|
},
|
||||||
|
searchChartSchemaGetter(state) {
|
||||||
|
return state.searchChartSchema;
|
||||||
|
},
|
||||||
|
searchChartActiveSchemaGetter(state) {
|
||||||
|
return state.activeSearchChartSchema;
|
||||||
|
},
|
||||||
|
selectionFilterItemsGetter(state) {
|
||||||
|
return state.selectionFilterItems;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
SET_SELECTED_PROJECT(selectedProject = undefined) {
|
||||||
|
this.selectedProject = selectedProject;
|
||||||
|
},
|
||||||
|
SET_LIST_ID(listId = undefined) {
|
||||||
|
this.listId = listId;
|
||||||
|
},
|
||||||
|
SET_LIST_COMPONENT_NAME(
|
||||||
|
payload = { selectedItem: undefined, listComponentName: undefined }
|
||||||
|
) {
|
||||||
|
this.selectedItem = payload.selectedItem;
|
||||||
|
this.listComponentName = payload.listComponentName;
|
||||||
|
},
|
||||||
|
SET_SELECTED_ITEM(selectedItem = undefined) {
|
||||||
|
this.selectedItem = selectedItem;
|
||||||
|
},
|
||||||
|
SET_IS_RETURN_FROM_ITEM_SHOW_PAGE(isReturnFromItemshowPage = false) {
|
||||||
|
this.isReturnFromItemshowPage = isReturnFromItemshowPage;
|
||||||
|
},
|
||||||
|
SET_LIST(list = undefined) {
|
||||||
|
this.list = list;
|
||||||
|
},
|
||||||
|
|
||||||
|
searchSynonymFormSetter(searchSynonymForm = undefined) {
|
||||||
|
this.searchSynonymForm = searchSynonymForm;
|
||||||
|
},
|
||||||
|
searchSynonymTitleSetter(searchSynonymTitle = undefined) {
|
||||||
|
this.searchSynonymTitle = searchSynonymTitle;
|
||||||
|
},
|
||||||
|
|
||||||
|
domainActiveSetter(domain = undefined) {
|
||||||
|
this.domainActive = domain;
|
||||||
|
},
|
||||||
|
// activeTabSetter(activeTab = undefined) {
|
||||||
|
// this.activeTab = activeTab;
|
||||||
|
// },
|
||||||
|
|
||||||
|
// search page
|
||||||
|
searchActiveTabSetter(searchActiveTab: searchActiveTab = undefined) {
|
||||||
|
this.searchActiveTab = searchActiveTab;
|
||||||
|
},
|
||||||
|
searchSchemaSetter(searchSchema = undefined) {
|
||||||
|
this.searchSchema = searchSchema;
|
||||||
|
},
|
||||||
|
helpSchemaSetter(helpSchema = undefined) {
|
||||||
|
this.helpSchema = helpSchema;
|
||||||
|
},
|
||||||
|
helpActiveSchemaSetter(helpActiveSchema = undefined) {
|
||||||
|
this.helpActiveSchema = helpActiveSchema;
|
||||||
|
},
|
||||||
|
searchActiveSchemaSetter(searchActiveSchema = undefined) {
|
||||||
|
this.searchActiveSchema = searchActiveSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
// search list
|
||||||
|
searchListActiveTabSetter(searchListActiveTab = undefined) {
|
||||||
|
this.searchListActiveTab = searchListActiveTab;
|
||||||
|
},
|
||||||
|
searchListSchemaSetter(searchListSchema = undefined) {
|
||||||
|
this.searchListSchema = searchListSchema;
|
||||||
|
},
|
||||||
|
searchListActiveSchemaSetter(activeSearchListSchema = undefined) {
|
||||||
|
this.activeSearchListSchema = activeSearchListSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
// search chart
|
||||||
|
searchChartActiveTabSetter(searchChartActiveTab = undefined) {
|
||||||
|
this.searchChartActiveTab = searchChartActiveTab;
|
||||||
|
},
|
||||||
|
searchChartSchemaSetter(searchChartSchema = undefined) {
|
||||||
|
this.searchChartSchema = searchChartSchema;
|
||||||
|
},
|
||||||
|
searchChartActiveSchemaSetter(activeSearchChartSchema = undefined) {
|
||||||
|
this.activeSearchChartSchema = activeSearchChartSchema;
|
||||||
|
},
|
||||||
|
selectionFilterItemsSetter(selectionFilterItems = []) {
|
||||||
|
this.selectionFilterItems = <selectionFilterItems>selectionFilterItems;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// export default {
|
||||||
|
// namespaced:true,
|
||||||
|
|
||||||
|
// state,
|
||||||
|
// actions,
|
||||||
|
// mutations,
|
||||||
|
// getters
|
||||||
|
// };
|
260
types/hadithType.ts
Normal file
260
types/hadithType.ts
Normal file
|
@ -0,0 +1,260 @@
|
||||||
|
export type SummaryOption = { key: string; label: string; type: string };
|
||||||
|
export type Filter = {
|
||||||
|
title: string;
|
||||||
|
filter_key: string;
|
||||||
|
source_key: string;
|
||||||
|
by_more: number;
|
||||||
|
};
|
||||||
|
export type Summary = {
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
options: SummaryOption[];
|
||||||
|
};
|
||||||
|
export type Tag = {
|
||||||
|
قانون: string;
|
||||||
|
عنوان: string;
|
||||||
|
متن: string;
|
||||||
|
ماده: string;
|
||||||
|
نوع: string;
|
||||||
|
سال: string;
|
||||||
|
دسته: string;
|
||||||
|
مصوب: string;
|
||||||
|
تاریخ: string;
|
||||||
|
};
|
||||||
|
export type Domain = {
|
||||||
|
label: string;
|
||||||
|
tag: string;
|
||||||
|
key: string;
|
||||||
|
field_collapse: string;
|
||||||
|
table_actions: TableActions[];
|
||||||
|
table_columns: TableColumns;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DomainItem = {
|
||||||
|
label: string;
|
||||||
|
tag: string;
|
||||||
|
key: string;
|
||||||
|
field_collapse: string;
|
||||||
|
table_actions: TableActions[];
|
||||||
|
table_columns: TableColumns[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type baseTableAction = {
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
"v-can": string;
|
||||||
|
icon: string;
|
||||||
|
type: string;
|
||||||
|
link_route?: {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
key: string;
|
||||||
|
};
|
||||||
|
toggle_icons?: { icon1: string; icon2: string };
|
||||||
|
};
|
||||||
|
export type TableActions = [
|
||||||
|
baseTableAction & {
|
||||||
|
api_items: {
|
||||||
|
data_type: string;
|
||||||
|
ref_key: string;
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export type TableColumnItem = {
|
||||||
|
key: string;
|
||||||
|
title: string;
|
||||||
|
width: string;
|
||||||
|
textAlign?: string;
|
||||||
|
isLink?: true;
|
||||||
|
link_route?: { id: string; name: string; key: string };
|
||||||
|
trancate_word?: number;
|
||||||
|
colors?: {
|
||||||
|
منسوخه: string;
|
||||||
|
معتبر: string;
|
||||||
|
موقت: string;
|
||||||
|
"بااجرامنتفي مي شود": string;
|
||||||
|
تمديد: string;
|
||||||
|
آزمايشي: string;
|
||||||
|
تنفيذ: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type TableColumns = TableColumnItem[];
|
||||||
|
|
||||||
|
export type Advance = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
tag: string;
|
||||||
|
type: string;
|
||||||
|
placeholder: string;
|
||||||
|
labelClass: string;
|
||||||
|
inputClass: string;
|
||||||
|
multi_select: string;
|
||||||
|
options?: [{ value: string; title: string }];
|
||||||
|
};
|
||||||
|
export type SearchType = {
|
||||||
|
key: string;
|
||||||
|
description?: string;
|
||||||
|
label: string;
|
||||||
|
item?: {
|
||||||
|
label: string;
|
||||||
|
type: string;
|
||||||
|
component: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type SearchContentActions = {
|
||||||
|
icon?: "";
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
type: string;
|
||||||
|
"v-can": string;
|
||||||
|
|
||||||
|
api_items?: {
|
||||||
|
data_type: string;
|
||||||
|
ref_key: string;
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
};
|
||||||
|
toggle_icons?: { icon1: string; icon2: string };
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Item = {
|
||||||
|
key: string;
|
||||||
|
source_key: string;
|
||||||
|
label: string;
|
||||||
|
style: string;
|
||||||
|
process?: string;
|
||||||
|
|
||||||
|
link_route?: {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
key: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type Items = {
|
||||||
|
key: string;
|
||||||
|
items: Item[];
|
||||||
|
array_key: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SearchContentCollapseItems = {
|
||||||
|
key: string;
|
||||||
|
items: Items[];
|
||||||
|
};
|
||||||
|
export type ListItem = {
|
||||||
|
title: string;
|
||||||
|
list_key: string;
|
||||||
|
filter_key: string;
|
||||||
|
icon: string;
|
||||||
|
};
|
||||||
|
export type List = ListItem[];
|
||||||
|
// search
|
||||||
|
export type searchActiveTab = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
key_navbar:string;
|
||||||
|
description: string;
|
||||||
|
routeName: string;
|
||||||
|
searchContent: string;
|
||||||
|
showTableList: number;
|
||||||
|
summary: Summary;
|
||||||
|
filter: Filter[];
|
||||||
|
domain: {
|
||||||
|
tags: Tag;
|
||||||
|
domain: Domain[] | [];
|
||||||
|
}|{};
|
||||||
|
advance: Advance[];
|
||||||
|
searchType: SearchType[];
|
||||||
|
search_content: {
|
||||||
|
actions: SearchContentActions[];
|
||||||
|
collapse_items: SearchContentCollapseItems;
|
||||||
|
};
|
||||||
|
lists: List;
|
||||||
|
colors_qanon_etebar: {
|
||||||
|
منسوخه: "red";
|
||||||
|
معتبر: "green";
|
||||||
|
موقت: "blue";
|
||||||
|
"بااجرامنتفي مي شود": "blue";
|
||||||
|
تمديد: "coral";
|
||||||
|
آزمايشي: "blue";
|
||||||
|
تنفيذ: "coral";
|
||||||
|
};
|
||||||
|
}| undefined;
|
||||||
|
export type searchSchema = searchActiveTab[];
|
||||||
|
export type searchActiveSchema = [];
|
||||||
|
|
||||||
|
// search list
|
||||||
|
export type searchChartSchemaItem = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
description: string;
|
||||||
|
routeName: string;
|
||||||
|
searchContent: string;
|
||||||
|
showTableList: number;
|
||||||
|
summary: Summary;
|
||||||
|
filter: Filter[];
|
||||||
|
search_content: {
|
||||||
|
actions: SearchContentActions[];
|
||||||
|
collapse_items: SearchContentCollapseItems;
|
||||||
|
};
|
||||||
|
info: {
|
||||||
|
title: string;
|
||||||
|
index_name: string;
|
||||||
|
meta: string;
|
||||||
|
table_columns: string;
|
||||||
|
table_columns_subject: string;
|
||||||
|
entity_view: string;
|
||||||
|
lists: [];
|
||||||
|
items: [{ name: string; title: string }];
|
||||||
|
};
|
||||||
|
actions: TableActions;
|
||||||
|
items: searchListActiveTab[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type searchListActiveTabItem = {
|
||||||
|
key: string;
|
||||||
|
id: number;
|
||||||
|
url_GET_item: string;
|
||||||
|
key_filter: string;
|
||||||
|
label: string;
|
||||||
|
};
|
||||||
|
export type searchListActiveTab = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
field_collapsed: string;
|
||||||
|
items: searchListActiveTabItem[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type searchListSchema = searchChartSchemaItem[];
|
||||||
|
export type activeSearchListSchema = searchChartSchemaItem;
|
||||||
|
|
||||||
|
// search chart
|
||||||
|
export type searchChartActiveTab = {
|
||||||
|
key: string;
|
||||||
|
componentName: string;
|
||||||
|
label: string;
|
||||||
|
chartBase: {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
items: [{ key: string; label: string }];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type searchChartSchema = activeSearchChartSchema[];
|
||||||
|
export type activeSearchChartSchema = searchActiveTab & {
|
||||||
|
items: searchChartSchemaItem[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type searchSynonymTitle = {};
|
||||||
|
export type searchSynonymForm = [];
|
||||||
|
export type selectionFilterItems = [];
|
||||||
|
|
||||||
|
export type helpSchema = helpActiveSchema[];
|
||||||
|
export type helpActiveSchema = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
title: string;
|
||||||
|
comment: string;
|
||||||
|
};
|
||||||
|
export type DomainActive = Domain;
|
Loading…
Reference in New Issue
Block a user