This commit is contained in:
Peter Maquiran
2021-07-20 12:30:52 +01:00
parent a46474e0aa
commit f73070ff4a
13 changed files with 109 additions and 12 deletions
+2 -1
View File
@@ -11,7 +11,8 @@
"e2e": "ng e2e", "e2e": "ng e2e",
"test": "jest --detectOpenHandles --runInBand", "test": "jest --detectOpenHandles --runInBand",
"test:prof": "ionic build --prod && npm run test", "test:prof": "ionic build --prod && npm run test",
"dev": "lite-server --baseDir=www" "build:serve" : "ionic build --prod && cp -r ./www ./serve",
"dev:serve": "lite-server --baseDir=serve"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
+8
View File
@@ -40,6 +40,14 @@ ionic serve build --prod
npm run test npm run test
``` ```
## Deploy in local network[.](#run-test)
```bash
ionic build --prod
npm run dev:share
```
## Contributing ## Contributing
For major changes, please open an issue first to discuss what you would like to change. For major changes, please open an issue first to discuss what you would like to change.
+1 -1
View File
@@ -21,7 +21,7 @@ export class Event{
Organizer: string; Organizer: string;
Category: string; Category: string;
HasAttachments: boolean; HasAttachments: boolean;
EventRecurrence?: EventRecurrence; EventRecurrence: EventRecurrence;
/* public Event(){ /* public Event(){
this.EventRecurrence = new EventRecurrence(); this.EventRecurrence = new EventRecurrence();
@@ -74,7 +74,6 @@
</div> </div>
<div *ngIf="skeletonLoader && despachoList.length == 0"> <div *ngIf="skeletonLoader && despachoList.length == 0">
<ion-list> <ion-list>
<ion-item> <ion-item>
<ion-thumbnail slot="end"> <ion-thumbnail slot="end">
@@ -97,7 +96,8 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
</ion-list> </ion-list>
</div> </div>
</div> </div>
</ion-content> </ion-content>
@@ -67,6 +67,13 @@
</div> </div>
</div> </div>
<div
*ngIf="!skeletonLoader && despachoList.length == 0 && despachoList.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && despachoList.length == 0"> <div *ngIf="skeletonLoader && despachoList.length == 0">
<ion-list> <ion-list>
@@ -27,10 +27,10 @@
<ion-refresher-content> <ion-refresher-content>
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
<div class="main-content d-flex height-100" > <div class="main-content d-flex height-100" >
<div class="content d-flex flex-column width-100 overflow-y-auto px-20"> <div class="content d-flex flex-column width-100 overflow-y-auto px-20">
<div class="width-100 flex-grow-1 " *ngIf="taskslist"> <div class="width-100 flex-grow-1 " *ngIf="taskslist">
<ion-list> <ion-list>
<div <div
@@ -66,6 +66,13 @@
</ion-list> </ion-list>
</div> </div>
<div
*ngIf="!skeletonLoader && taskslist.length == 0 && taskslist.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && taskslist.length == 0"> <div *ngIf="skeletonLoader && taskslist.length == 0">
<ion-list> <ion-list>
@@ -94,4 +101,5 @@
</div> </div>
</div> </div>
</div> </div>
</ion-content> </ion-content>
@@ -61,6 +61,13 @@
</ion-list> </ion-list>
</div> </div>
<div
*ngIf="!skeletonLoader && taskslist.length == 0 && taskslist.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<!-- Skeleton loader --> <!-- Skeleton loader -->
<div *ngIf="skeletonLoader && taskslist.length == 0"> <div *ngIf="skeletonLoader && taskslist.length == 0">
@@ -114,6 +114,26 @@
</ion-list> </ion-list>
</div> </div>
</div> </div>
<div *ngSwitchCase="'parecer'" class="d-flex height-100 align-center justify-content-center" >
<div
*ngIf="!skeletonLoader && parecerList.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
</div>
<div *ngSwitchCase="'deferimento'" class="d-flex height-100 align-center justify-content-center">
<div
*ngIf="!skeletonLoader && deferimentoList.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
</div>
<div *ngIf="skeletonLoader && deferimentoList.length == 0 && skeletonLoader && parecerList.length == 0"> <div *ngIf="skeletonLoader && deferimentoList.length == 0 && skeletonLoader && parecerList.length == 0">
<ion-list> <ion-list>
@@ -204,9 +204,9 @@ export class EditEventPage implements OnInit {
Validators.required Validators.required
]), ]),
participantes: new FormControl(this.taskParticipants, [ participantes: new FormControl(this.taskParticipants, [
Validators.required // Validators.required
]), ]),
Date: new FormControl(this.dateControlStart.value.toLocaleString() < this.dateControlEnd.value.toLocaleString()? 'ok': null,[ Date: new FormControl( new Date(this.dateControlStart.value).toLocaleString() < new Date(this.dateControlEnd.value).toLocaleString()? 'ok': null,[
Validators.required Validators.required
]), ]),
@@ -259,6 +259,15 @@ export class EditEventPage implements OnInit {
this.getDatepickerData() this.getDatepickerData()
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc); this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
if(!this.postEvent.EventRecurrence.hasOwnProperty('Type')) {
this.postEvent.EventRecurrence.Type = '-1'
}
//
if(this.postEvent.EventRecurrence.Type == undefined) {
this.postEvent.EventRecurrence.Type = '-1'
}
this.showLoader = true; this.showLoader = true;
await this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => { await this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
@@ -249,9 +249,9 @@ export class NewEventPage implements OnInit {
Validators.required Validators.required
]), ]),
participantes: new FormControl(this.taskParticipants, [ participantes: new FormControl(this.taskParticipants, [
Validators.required // Validators.required
]), ]),
Date: new FormControl(this.postEvent.StartDate.getTime() < this.postEvent.EndDate.getTime() ? 'ok': null,[ Date: new FormControl( new Date(this.postEvent.StartDate).getTime() < new Date(this.postEvent.EndDate).getTime() ? 'ok': null,[
Validators.required Validators.required
]), ]),
@@ -357,10 +357,16 @@ export class NewEventPage implements OnInit {
if(this.documents.length >= 0) { if(this.documents.length >= 0) {
this.postEvent.HasAttachments = true; this.postEvent.HasAttachments = true;
} }
if(this.selectedRecurringType != '-1'){
if(this.selectedRecurringType != '-1') {
this.postEvent.EventRecurrence.Type = this.selectedRecurringType; this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
} }
//
if(this.postEvent.EventRecurrence.Type == undefined) {
this.postEvent.EventRecurrence.Type = '-1'
}
if(this.loggeduser.Profile == 'MDGPR') { if(this.loggeduser.Profile == 'MDGPR') {
// console.log('MD - Aqui'); // console.log('MD - Aqui');
// console.log(this.postEvent); // console.log(this.postEvent);
@@ -369,7 +375,6 @@ export class NewEventPage implements OnInit {
console.log(this.postEvent); console.log(this.postEvent);
let loader = this.toastService.loading(); let loader = this.toastService.loading();
console.log(this.postEvent); console.log(this.postEvent);
@@ -422,7 +427,7 @@ export class NewEventPage implements OnInit {
this.showLoader = false this.showLoader = false
this.toastService.badRequest('Evento não criado') this.toastService.badRequest('Evento não criado')
}); });
} }
else if(this.loggeduser.Profile == 'PR') { else if(this.loggeduser.Profile == 'PR') {
@@ -45,6 +45,14 @@
</div> </div>
</ion-list> </ion-list>
<div
*ngIf="!skeletonLoader && taskslist.length == 0 && taskslist.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && taskslist.length == 0"> <div *ngIf="skeletonLoader && taskslist.length == 0">
<ion-list> <ion-list>
@@ -55,6 +55,12 @@
</ion-list> </ion-list>
</div> </div>
<div
*ngIf="!skeletonLoader && taskslist.length == 0 && taskslist.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && taskslist.length == 0"> <div *ngIf="skeletonLoader && taskslist.length == 0">
@@ -106,6 +106,24 @@
</ion-list> </ion-list>
</div> </div>
<div *ngSwitchCase="'parecer'" class="d-flex height-100 align-center justify-content-center" >
<div
*ngIf="!skeletonLoader && parecerList.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
</div>
<div *ngSwitchCase="'deferimento'" class="d-flex height-100 align-center justify-content-center">
<div
*ngIf="!skeletonLoader && deferimentoList.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
</div>
<div *ngIf="skeletonLoader && parecerList.length == 0 && skeletonLoader && deferimentoList.length == 0 "> <div *ngIf="skeletonLoader && parecerList.length == 0 && skeletonLoader && deferimentoList.length == 0 ">
<ion-list> <ion-list>