mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix change and search
This commit is contained in:
@@ -234,7 +234,7 @@
|
||||
|
||||
<!-- most searched word-->
|
||||
<div class="most-searched-words d-md-flex flex-md-column">
|
||||
<p class="title ion-text-center">{{searchResult}}</p>
|
||||
<p *ngIf="showDocuments == false" class="title ion-text-center">{{searchResult}}</p>
|
||||
<div class="most-searched-word-container height-100 overflow-y-auto">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -520,7 +520,7 @@ export class SearchPage implements OnInit {
|
||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||
this.showLoader = true;
|
||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ export class SearchPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
|
||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
}
|
||||
|
||||
@@ -622,7 +622,7 @@ export class SearchPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
}
|
||||
res.Categories.forEach(e => {
|
||||
@@ -671,7 +671,7 @@ export class SearchPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
|
||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
}
|
||||
|
||||
@@ -733,7 +733,7 @@ export class SearchPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
}
|
||||
|
||||
@@ -780,7 +780,7 @@ export class SearchPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
}
|
||||
|
||||
@@ -885,7 +885,7 @@ export class SearchPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '386').subscribe(res => {
|
||||
if (!res.Categories.length && this.showSearchDocuments.length == 0) {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,19 @@ export class NewGroupPage implements OnInit{
|
||||
this.showDuration = event.detail.checked;
|
||||
|
||||
if(event.detail.checked) {
|
||||
this.expirationDate = null;
|
||||
// ✅ Set default 1 hour duration
|
||||
const now = new Date();
|
||||
this.expirationDate = new Date(
|
||||
now.getFullYear(),
|
||||
now.getMonth(),
|
||||
now.getDate(),
|
||||
now.getHours() + 1, // +1 hour
|
||||
now.getMinutes(),
|
||||
now.getSeconds(),
|
||||
now.getMilliseconds()
|
||||
);
|
||||
|
||||
this.displayDuration = this.formatDuration(0, 1, 0);
|
||||
}
|
||||
else {
|
||||
this.expirationDate = null;
|
||||
@@ -348,4 +360,29 @@ export class NewGroupPage implements OnInit{
|
||||
|
||||
}
|
||||
|
||||
|
||||
formatDuration(days: number, hours: number, minutes: number): string {
|
||||
if (days > 0) {
|
||||
if (days === 1) {
|
||||
if (hours === 1) {
|
||||
return `${days} day ${hours} hora ${minutes} minutos`;
|
||||
} else {
|
||||
return `${days} day ${hours} horas ${minutes} minutos`;
|
||||
}
|
||||
} else {
|
||||
if (hours === 1) {
|
||||
return `${days} days ${hours} hora ${minutes} minutos`;
|
||||
} else {
|
||||
return `${days} days ${hours} horas ${minutes} minutos`;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (hours === 1) {
|
||||
return `${hours} hora ${minutes} minutos`;
|
||||
} else {
|
||||
return `${hours} horas ${minutes} minutos`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user