mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
add search
This commit is contained in:
+3
-5
@@ -316,7 +316,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
async addParticipants(){
|
||||
async addParticipants() {
|
||||
|
||||
this.adding = "intervenient";
|
||||
|
||||
@@ -408,8 +408,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
|
||||
async getDoc(){
|
||||
async getDoc() {
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
cssClass: 'modal-width-100-width-background modal',
|
||||
@@ -432,7 +431,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.documents = this.documents.filter( (e, i) => index != i);
|
||||
}
|
||||
|
||||
validateFormInputs(){
|
||||
validateFormInputs() {
|
||||
let formLocation = this.postData.Location.trim();
|
||||
if(!this.postData.Location && formLocation.length <= 0){
|
||||
this.formLocationSatus = true;
|
||||
@@ -456,5 +455,4 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+34
-8
@@ -21,6 +21,7 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { task } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||
import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -64,6 +65,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
subjectTypes:any[] = [];
|
||||
selectedTypes: string[]=[];
|
||||
seachDocuments: any = []
|
||||
|
||||
postData: Despacho;
|
||||
dispatchFolder: Folder;
|
||||
@@ -91,6 +93,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
return this.toppings.value;
|
||||
}
|
||||
|
||||
private searchDocumentPipe = SearchDocumentPipe
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private router:Router,
|
||||
@@ -107,8 +111,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
this.task = this.navParams.get('task');
|
||||
|
||||
console.log(this.task)
|
||||
this.seachDocuments = this.navParams.get('seachDocuments');
|
||||
|
||||
this.taskType = this.navParams.get('taskAction');
|
||||
|
||||
@@ -138,7 +141,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.profile = this.navParams.get('profile');
|
||||
}
|
||||
|
||||
async setAdding(type: "intervenient" | "CC"){
|
||||
async setAdding(type: "intervenient" | "CC") {
|
||||
this.adding = type;
|
||||
}
|
||||
|
||||
@@ -215,7 +218,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
})
|
||||
}
|
||||
//
|
||||
async saveTask(){
|
||||
async saveTask() {
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.injectValidation()
|
||||
@@ -259,6 +262,29 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
docs.Attachments = DocumentToSave;
|
||||
|
||||
|
||||
if(this.seachDocuments) {
|
||||
if(this.seachDocuments.Documents) {
|
||||
this.seachDocuments.Documents.forEach( (ele) => {
|
||||
docs.Attachments.push({
|
||||
ApplicationId: 361,
|
||||
Source: 1,
|
||||
SourceId: ele.docID || ele.docId || ele.DocId,
|
||||
SourceName: ele.Assunto
|
||||
})
|
||||
});
|
||||
} else {
|
||||
docs.Attachments.push({
|
||||
ApplicationId: 8,
|
||||
Source: 1,
|
||||
SourceId: this.seachDocuments.docID || this.seachDocuments.docId || this.seachDocuments.DocId,
|
||||
SourceName: this.seachDocuments.Assunto
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
@@ -266,7 +292,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
case 'MDGPR':
|
||||
if(this.taskParticipants.length > 0) {
|
||||
switch (this.taskType) {
|
||||
case '0':
|
||||
case '0': // Despacho
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
@@ -303,7 +329,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
break;
|
||||
|
||||
case '1':
|
||||
case '1': // Parecer
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
@@ -334,7 +360,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
loader.remove()
|
||||
}
|
||||
break;
|
||||
case '2':
|
||||
case '2': // Deferimento
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
@@ -409,7 +435,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
break;
|
||||
|
||||
case '1':
|
||||
case '1': // parecer
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
|
||||
Reference in New Issue
Block a user