mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
fix
This commit is contained in:
@@ -16,6 +16,7 @@ import { environment } from 'src/environments/environment';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { momentG } from 'src/plugin/momentG';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -319,11 +320,23 @@ export class SearchPage implements OnInit {
|
||||
*/
|
||||
basicSearch() {
|
||||
|
||||
if(this.type == "Agenda" ){
|
||||
let searchDocumentDate
|
||||
|
||||
if (this.searchDocumentDate) {
|
||||
searchDocumentDate = momentG(new Date(this.searchDocumentDate), 'yyyy-MM-dd')
|
||||
}
|
||||
|
||||
searchDocumentDate;
|
||||
|
||||
if(this.searchSubject == '') {
|
||||
this.searchSubject = undefined
|
||||
}
|
||||
|
||||
if(this.type == "Agenda" ) {
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
@@ -338,7 +351,7 @@ export class SearchPage implements OnInit {
|
||||
this.reorderList(this.ordinance);
|
||||
|
||||
// hide show document
|
||||
if(this.searchDocuments.length >= 1){
|
||||
if(this.searchDocuments.length >= 1) {
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
@@ -366,8 +379,8 @@ export class SearchPage implements OnInit {
|
||||
|
||||
let counter = 0;
|
||||
|
||||
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
|
||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res => {
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
e['Active'] = false;
|
||||
@@ -405,7 +418,7 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
@@ -448,7 +461,7 @@ export class SearchPage implements OnInit {
|
||||
} else {
|
||||
let counter = 0;
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res => {
|
||||
res.Categories.forEach( e => {
|
||||
e['Active'] = false;
|
||||
@@ -488,7 +501,7 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res => {
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
@@ -543,7 +556,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
let counter = 0;
|
||||
|
||||
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
@@ -581,7 +594,7 @@ export class SearchPage implements OnInit {
|
||||
} else {
|
||||
let counter = 0;
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
@@ -632,7 +645,7 @@ export class SearchPage implements OnInit {
|
||||
this.searchCategories = []
|
||||
this.searchDocuments = []
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res=>{
|
||||
|
||||
|
||||
@@ -683,7 +696,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
this.search.basicSearchPublication(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res => {
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user