mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
image: node:14.15.0
|
||||||
|
|
||||||
|
pipelines:
|
||||||
|
default:
|
||||||
|
- step:
|
||||||
|
caches:
|
||||||
|
- node
|
||||||
|
script:
|
||||||
|
- apt-get update; apt-get install -y gettext-base;
|
||||||
|
- echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/chrome.list
|
||||||
|
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
||||||
|
- set -x && apt-get update && apt-get install -y xvfb google-chrome-stable
|
||||||
|
- wget -q -O /usr/bin/xvfb-chrome https://bitbucket.org/atlassian/docker-node-chrome-firefox/raw/ff180e2f16ea8639d4ca4a3abb0017ee23c2836c/scripts/xvfb-chrome
|
||||||
|
- ln -sf /usr/bin/xvfb-chrome /usr/bin/google-chrome
|
||||||
|
- chmod 755 /usr/bin/google-chrome
|
||||||
|
- npm ci
|
||||||
|
- ./node_modules/@angular/cli/bin/ng -v
|
||||||
|
- npm run test
|
||||||
Generated
+5
@@ -5345,6 +5345,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ci": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ci/-/ci-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-StBCU1G9zbhgVBqvslvOpT601zme9YfyZaUSjgXCtfnIynPuDBHX85WwnXv5cnh74bYo8S3xfPpI41yk1jZmRw=="
|
||||||
|
},
|
||||||
"ci-info": {
|
"ci-info": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
"angular-calendar": "^0.28.22",
|
"angular-calendar": "^0.28.22",
|
||||||
"angular-tag-cloud-module": "^5.2.2",
|
"angular-tag-cloud-module": "^5.2.2",
|
||||||
"bootstrap": "^4.5.0",
|
"bootstrap": "^4.5.0",
|
||||||
|
"ci": "^2.1.1",
|
||||||
"cordova": "^10.0.0",
|
"cordova": "^10.0.0",
|
||||||
"cordova-plugin-camera": "^5.0.1",
|
"cordova-plugin-camera": "^5.0.1",
|
||||||
"cordova-plugin-filepath": "^1.5.8",
|
"cordova-plugin-filepath": "^1.5.8",
|
||||||
|
|||||||
@@ -44,11 +44,11 @@
|
|||||||
</ion-select>
|
</ion-select>
|
||||||
|
|
||||||
<mat-form-field appearance="fill" class="width-100 d-none d-md-block" floatLabel="never" appearance="none">
|
<mat-form-field appearance="fill" class="width-100 d-none d-md-block" floatLabel="never" appearance="none">
|
||||||
<mat-select placeholder="Prazo*" [(value)]="postData.Priority">
|
<mat-select placeholder="Prazo*" [(ngModel)]="postData.Priority">
|
||||||
<mat-option [value]="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</mat-option>
|
<mat-option value="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</mat-option>
|
||||||
<mat-option [value]="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</mat-option>
|
<mat-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</mat-option>
|
||||||
<mat-option [value]="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</mat-option>
|
<mat-option value="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</mat-option>
|
||||||
<mat-option [value]="99999864"><b>Urgentíssimo</b> (8 horas para a execução da tarefa)</mat-option>
|
<mat-option value="99999864"><b>Urgentíssimo</b> (8 horas para a execução da tarefa)</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
Priority: new FormControl(this.postData.Priority, [
|
Priority: new FormControl(this.postData.Priority, [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
]),
|
]),
|
||||||
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
participantes: new FormControl(this.taskParticipantsCc, [
|
||||||
// Validators.required
|
// Validators.required
|
||||||
]),
|
]),
|
||||||
selectedTypes: new FormControl(this.selectedTypes, [
|
selectedTypes: new FormControl(this.selectedTypes, [
|
||||||
|
|||||||
-9
@@ -104,12 +104,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
|
|
||||||
this.loggeduser = userAuth.ValidatedUser;
|
this.loggeduser = userAuth.ValidatedUser;
|
||||||
this.task = this.navParams.get('task');
|
this.task = this.navParams.get('task');
|
||||||
|
|
||||||
console.log('task', this.task)
|
|
||||||
|
|
||||||
this.taskType = this.navParams.get('taskAction');
|
this.taskType = this.navParams.get('taskAction');
|
||||||
|
|
||||||
//Initialize SubjectTypes Array with the value "Indefinido"
|
|
||||||
this.selectedTypes = ['99999850'];
|
this.selectedTypes = ['99999850'];
|
||||||
|
|
||||||
this.postData = new Despacho();
|
this.postData = new Despacho();
|
||||||
@@ -222,8 +219,6 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
if(this.Form.invalid) return false
|
if(this.Form.invalid) return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(this.postData.Priority=='99999861') {
|
if(this.postData.Priority=='99999861') {
|
||||||
this.dispatchFolder.DeadlineType = 'Normal';
|
this.dispatchFolder.DeadlineType = 'Normal';
|
||||||
}
|
}
|
||||||
@@ -258,10 +253,6 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
});
|
});
|
||||||
docs.Attachments = DocumentToSave;
|
docs.Attachments = DocumentToSave;
|
||||||
|
|
||||||
if (window.innerWidth >= 800) {
|
|
||||||
this.selectedTypes = this.toppingsValues
|
|
||||||
}
|
|
||||||
|
|
||||||
let loader = this.toastService.loading()
|
let loader = this.toastService.loading()
|
||||||
|
|
||||||
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
||||||
|
|||||||
@@ -4,6 +4,22 @@ import { FormsModule } from '@angular/forms';
|
|||||||
|
|
||||||
import { IonicModule } from '@ionic/angular';
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { MatNativeDateModule } from '@angular/material/core';
|
||||||
|
import {
|
||||||
|
NgxMatDatetimePickerModule,
|
||||||
|
NgxMatNativeDateModule,
|
||||||
|
NgxMatTimepickerModule
|
||||||
|
} from '@angular-material-components/datetime-picker';
|
||||||
|
import { ReactiveFormsModule } from '@angular/forms';
|
||||||
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
|
import { MatSelectModule } from '@angular/material/select';
|
||||||
|
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||||
|
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
||||||
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||||
|
import { MatInputModule } from '@angular/material/input';
|
||||||
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
|
import { MatMenuModule } from '@angular/material/menu';
|
||||||
|
|
||||||
import { EditActionPageRoutingModule } from './edit-action-routing.module';
|
import { EditActionPageRoutingModule } from './edit-action-routing.module';
|
||||||
|
|
||||||
import { EditActionPage } from './edit-action.page';
|
import { EditActionPage } from './edit-action.page';
|
||||||
@@ -13,7 +29,19 @@ import { EditActionPage } from './edit-action.page';
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
IonicModule,
|
IonicModule,
|
||||||
EditActionPageRoutingModule
|
EditActionPageRoutingModule,
|
||||||
|
// Angular material
|
||||||
|
MatDatepickerModule,
|
||||||
|
MatInputModule,
|
||||||
|
MatNativeDateModule,
|
||||||
|
NgxMatDatetimePickerModule,
|
||||||
|
NgxMatTimepickerModule,
|
||||||
|
NgxMatNativeDateModule,
|
||||||
|
NgxMatMomentModule,
|
||||||
|
MatSelectModule,
|
||||||
|
MatButtonModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
MatDialogModule,
|
||||||
],
|
],
|
||||||
declarations: [EditActionPage]
|
declarations: [EditActionPage]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,9 +1,134 @@
|
|||||||
<ion-header>
|
<ion-header class="ion-no-border pt-20 px-20">
|
||||||
<ion-toolbar>
|
<div class="title-content d-flex align-center justify-space-between ">
|
||||||
<ion-title>edit-action</ion-title>
|
<div class="div-title">
|
||||||
</ion-toolbar>
|
<ion-label class="title">Editar acção presidencial</ion-label>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="actionType">
|
||||||
|
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||||
|
<ion-segment-button value="Viagem">
|
||||||
|
<ion-label>Viagem</ion-label>
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="Evento">
|
||||||
|
<ion-label>Evento</ion-label>
|
||||||
|
</ion-segment-button>
|
||||||
|
</ion-segment>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
|
<div class="content-container">
|
||||||
|
|
||||||
|
<div class="ion-item-container">
|
||||||
|
<ion-input [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="ion-item-class-2 d-flex ">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class flex-grow-1">
|
||||||
|
<ion-datetime
|
||||||
|
class="d-block d-md-none"
|
||||||
|
[(ngModel)]="folder.DateBegin"
|
||||||
|
placeholder="Início"
|
||||||
|
displayFormat="D MMM YYYY H:mm"
|
||||||
|
minuteValues="0,15,30,45"
|
||||||
|
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||||
|
min="2018"
|
||||||
|
max="2025"
|
||||||
|
class="d-block d-md-none">
|
||||||
|
</ion-datetime>
|
||||||
|
|
||||||
|
|
||||||
|
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
|
placeholder="Choose a date*"
|
||||||
|
[formControl]="dateControlEnd"
|
||||||
|
[min]="minDate"
|
||||||
|
[disabled]="disabled"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #picker1
|
||||||
|
[showSpinners]="showSpinners"
|
||||||
|
[showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
|
[stepSecond]="stepSecond"
|
||||||
|
[touchUi]="touchUi">
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="ion-item-class-2 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-input-class d-flex flex-grow-1">
|
||||||
|
<ion-datetime
|
||||||
|
class="flex-grow-1 d-block d-md-none"
|
||||||
|
[(ngModel)]="folder.DateEnd"
|
||||||
|
placeholder="Fim"
|
||||||
|
displayFormat="D MMM YYYY H:mm"
|
||||||
|
minuteValues="0,15,30,45"
|
||||||
|
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||||
|
min="2018"
|
||||||
|
max="2022">
|
||||||
|
</ion-datetime>
|
||||||
|
|
||||||
|
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
||||||
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
|
placeholder="Choose a date*"
|
||||||
|
[formControl]="dateControlEnd"
|
||||||
|
[min]="minDate"
|
||||||
|
[disabled]="disabled"
|
||||||
|
>
|
||||||
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
|
<ngx-mat-datetime-picker #picker1
|
||||||
|
[showSpinners]="showSpinners"
|
||||||
|
[showSeconds]="showSeconds"
|
||||||
|
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||||
|
[stepSecond]="stepSecond"
|
||||||
|
[touchUi]="touchUi">
|
||||||
|
</ngx-mat-datetime-picker>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="ion-item-class-2 d-flex">
|
||||||
|
<div class="ion-icon-class">
|
||||||
|
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="ion-textarea-class flex-grow-1">
|
||||||
|
<ion-textarea [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção..."></ion-textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
||||||
|
<ion-footer class="ion-no-border">
|
||||||
|
<ion-toolbar class="footer-toolbar width-100 justify-space-between d-flex px-20">
|
||||||
|
<ion-buttons slot="start">
|
||||||
|
<button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
|
||||||
|
<ion-label>Cancelar</ion-label>
|
||||||
|
</button>
|
||||||
|
</ion-buttons>
|
||||||
|
<ion-buttons slot="end">
|
||||||
|
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||||
|
<ion-label>Gravar</ion-label>
|
||||||
|
</button>
|
||||||
|
</ion-buttons>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-footer>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
:host{
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
ion-content{
|
||||||
|
--background: transparent;
|
||||||
|
transform: translate3d(0, 5px, 0);
|
||||||
|
--border-radius: 30px;
|
||||||
|
}
|
||||||
|
ion-footer{
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
ion-toolbar{
|
||||||
|
/* --background:#0782c9; */
|
||||||
|
border-width: 0 !important;
|
||||||
|
}
|
||||||
|
.div-top-header{
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: #0782c9;
|
||||||
|
overflow: auto;
|
||||||
|
padding-top: 15px;
|
||||||
|
border: 0!important;
|
||||||
|
}
|
||||||
|
.div-search{
|
||||||
|
font-size: 45px;
|
||||||
|
float: left;
|
||||||
|
margin: 0 0 0 10px
|
||||||
|
}
|
||||||
|
.div-logo{
|
||||||
|
background: transparent;
|
||||||
|
width: 140px;
|
||||||
|
margin: 5px 0 0px 71px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.div-logo img{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.div-profile{
|
||||||
|
font-size: 45px;
|
||||||
|
float: right;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.content-top{
|
||||||
|
background: #f3f2f2;
|
||||||
|
height: 20px;
|
||||||
|
margin: 0 auto;
|
||||||
|
border-top-left-radius: 25px;
|
||||||
|
border-top-right-radius: 25px;
|
||||||
|
}
|
||||||
|
.content-container{
|
||||||
|
width: 100%;
|
||||||
|
margin:0 auto;
|
||||||
|
border-top-left-radius: 25px;
|
||||||
|
border-top-right-radius: 25px;
|
||||||
|
background: #ffffff;
|
||||||
|
height: 100%;
|
||||||
|
padding: 25px 20px 0 20px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.title-content{
|
||||||
|
margin: 0px auto;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
.div-title{
|
||||||
|
width: fit-content;
|
||||||
|
float: left;
|
||||||
|
margin: 2.5px 0 0 5px;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
.container-div{
|
||||||
|
margin-bottom: 15px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.ion-item-container{
|
||||||
|
margin: 15px auto;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.ion-item-container-no-border{
|
||||||
|
width: 100%;
|
||||||
|
margin: 0px auto;
|
||||||
|
padding: 0 !important;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.ion-item-class-2{
|
||||||
|
margin: 0px auto;
|
||||||
|
}
|
||||||
|
.ion-icon-class{
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
float: left;
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
.ion-input-class{
|
||||||
|
height: auto;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 10px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.ion-textarea-class{
|
||||||
|
width: 315px;
|
||||||
|
height: auto;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 10px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.ion-input-class-no-height{
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
border-radius: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.actionType{
|
||||||
|
float: right;
|
||||||
|
overflow: auto;
|
||||||
|
border-radius: 30px;
|
||||||
|
}
|
||||||
|
.ion-segment{
|
||||||
|
--background: #0782c9;
|
||||||
|
}
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
|
import { ModalController, NavParams } from '@ionic/angular';
|
||||||
|
import * as moment from 'moment';
|
||||||
|
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||||
|
import { PublicationsService } from 'src/app/services/publications.service';
|
||||||
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-edit-action',
|
selector: 'app-edit-action',
|
||||||
@@ -7,9 +13,99 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class EditActionPage implements OnInit {
|
export class EditActionPage implements OnInit {
|
||||||
|
|
||||||
constructor() { }
|
Form: FormGroup;
|
||||||
|
validateFrom = false
|
||||||
|
|
||||||
ngOnInit() {
|
public date: any;
|
||||||
|
public disabled = false;
|
||||||
|
public showSpinners = true;
|
||||||
|
public showSeconds = false;
|
||||||
|
public touchUi = false;
|
||||||
|
public enableMeridian = false;
|
||||||
|
public minDate: any;
|
||||||
|
public maxDate: any;
|
||||||
|
public stepHour = 1;
|
||||||
|
public stepMinute = 5;
|
||||||
|
public stepSecond = 5;
|
||||||
|
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||||
|
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||||
|
|
||||||
|
folder: PublicationFolder;
|
||||||
|
folderId: string;
|
||||||
|
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||||
|
@Output() updateDesktopComponent= new EventEmitter<any>();
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private publicationsService: PublicationsService,
|
||||||
|
private toastService: ToastService,
|
||||||
|
private navParams: NavParams,
|
||||||
|
private modalController: ModalController,
|
||||||
|
) {
|
||||||
|
this.folder = new PublicationFolder();
|
||||||
|
this.folderId = this.navParams.get('folderId');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.getPublicationDetail();
|
||||||
|
}
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.modalController.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
getPublicationDetail() {
|
||||||
|
this.publicationsService.GetPresidentialAction(this.folderId).subscribe( res => {
|
||||||
|
this.folder = res;
|
||||||
|
|
||||||
|
this.dateControlStart = new FormControl(moment(new Date(this.folder.DateBegin)));
|
||||||
|
this.dateControlEnd = new FormControl(moment(new Date(this.folder.DateEnd)));
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
get dateValid() {
|
||||||
|
if (window.innerWidth <= 800) {
|
||||||
|
return this.folder.DateBegin < this.folder.DateEnd? ['ok']: []
|
||||||
|
} else {
|
||||||
|
return ['ok']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
runValidation() {
|
||||||
|
this.validateFrom = true
|
||||||
|
}
|
||||||
|
|
||||||
|
injectValidation() {
|
||||||
|
|
||||||
|
this.Form = new FormGroup({
|
||||||
|
Subject: new FormControl(this.folder.Description, [
|
||||||
|
Validators.required,
|
||||||
|
// Validators.minLength(4)
|
||||||
|
]),
|
||||||
|
Date: new FormControl(this.dateValid, [
|
||||||
|
Validators.required
|
||||||
|
]),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async save() {
|
||||||
|
let body = {
|
||||||
|
ProcessId: this.folderId,
|
||||||
|
Description: this.folder.Description,
|
||||||
|
Detail: this.folder.Detail,
|
||||||
|
DateBegin: this.folder.DateBegin,
|
||||||
|
DateEnd: this.folder.DateEnd,
|
||||||
|
ActionType: this.folder.ActionType,
|
||||||
|
}
|
||||||
|
console.log(body);
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.publicationsService.UpdatePresidentialAction(body).toPromise()
|
||||||
|
this.close();
|
||||||
|
this.updateDesktopComponent.emit();
|
||||||
|
this.toastService.successMessage('Acção presidencial atualizada')
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest('Não foi possivel atualizar a acção presidencial')
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,9 +35,10 @@
|
|||||||
|
|
||||||
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||||
<!-- <ion-list class="width-100"> -->
|
<!-- <ion-list class="width-100"> -->
|
||||||
<ion-item-sliding class="width-100"
|
<ion-item-sliding disabled="{{showSlidingOptions}}" class="item width-100"
|
||||||
*ngFor="let viagem of publicationsTravelFolderList">
|
*ngFor="let viagem of publicationsTravelFolderList">
|
||||||
<ion-item class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
<ion-item lines="none"
|
||||||
|
class="width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-icon cursor-pointer">
|
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-icon cursor-pointer">
|
||||||
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,12 +52,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item-options class="members-options" side="end">
|
<ion-item-options class="members-options" side="end">
|
||||||
<!-- <ion-item-option (click)="editAction(viagem.ProcessId)">
|
<ion-item-option class="edit-option" (click)="editAction(viagem.ProcessId)">
|
||||||
<button class="btn-no-color">
|
<button class="btn-no-color">
|
||||||
<ion-icon class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
<ion-icon class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</ion-item-option> -->
|
</ion-item-option>
|
||||||
<ion-item-option (click)="deleteAction(viagem.ProcessId)">
|
<ion-item-option class="delete-option" (click)="deleteAction(viagem.ProcessId)">
|
||||||
<button class="btn-no-color">
|
<button class="btn-no-color">
|
||||||
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
@@ -78,9 +79,10 @@
|
|||||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<ion-item-sliding class="item width-100"
|
<ion-item-sliding disabled="{{showSlidingOptions}}" class="item width-100"
|
||||||
*ngFor="let evento of publicationsEventFolderList">
|
*ngFor="let evento of publicationsEventFolderList">
|
||||||
<ion-item class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding"
|
<ion-item lines="none"
|
||||||
|
class="width-100 d-flex ion-no-border ion-no-margin ion-no-padding"
|
||||||
(click)="viewPublications(evento)">
|
(click)="viewPublications(evento)">
|
||||||
<div class="item-icon2">
|
<div class="item-icon2">
|
||||||
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
|
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
|
||||||
@@ -96,7 +98,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item-options class="members-options" side="end">
|
<ion-item-options class="members-options" side="end">
|
||||||
<ion-item-option color="danger"><ion-icon name="delete"></ion-icon> Apagar</ion-item-option>
|
<ion-item-option class="edit-option" (click)="editAction(evento.ProcessId)">
|
||||||
|
<button class="btn-no-color">
|
||||||
|
<ion-icon class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||||
|
</button>
|
||||||
|
</ion-item-option>
|
||||||
|
<ion-item-option class="delete-option" (click)="deleteAction(evento.ProcessId)">
|
||||||
|
<button class="btn-no-color">
|
||||||
|
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
||||||
|
</button>
|
||||||
|
</ion-item-option>
|
||||||
</ion-item-options>
|
</ion-item-options>
|
||||||
</ion-item-sliding>
|
</ion-item-sliding>
|
||||||
<!-- <div class="item width-100 d-flex"
|
<!-- <div class="item width-100 d-flex"
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ ion-toolbar{
|
|||||||
}
|
}
|
||||||
.item{
|
.item{
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
padding: 0 0px 0 0px !important;
|
padding: 0px !important;
|
||||||
border-bottom: 1px solid #ebebeb;
|
border-bottom: 1px solid #ebebeb;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -163,6 +163,11 @@ ion-toolbar{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ion-item-options{
|
||||||
|
border: 1px solid #fff;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
ion-item-option{
|
ion-item-option{
|
||||||
display: flex;
|
display: flex;
|
||||||
background: #ffe0e0;
|
background: #ffe0e0;
|
||||||
@@ -170,12 +175,36 @@ ion-toolbar{
|
|||||||
align-content: center;
|
align-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.delete-option{
|
||||||
|
display: flex;
|
||||||
|
background: #ffe0e0;
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
border: 1px solid #d30a0a67;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit-option{
|
||||||
|
display: flex;
|
||||||
|
background: #fff;
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
margin-right: 5px !important;
|
||||||
|
border: 1px solid #42b9feb9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit{
|
||||||
|
padding: 6px;
|
||||||
|
font-size: 35px;
|
||||||
|
color:#061b52;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin: 7px;
|
||||||
|
}
|
||||||
.delete{
|
.delete{
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
font-size: 21px;
|
font-size: 21px;
|
||||||
color:#d30a0a;
|
color:#d30a0a;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
margin: 10px;
|
margin: 12px;
|
||||||
border: 1px solid #d30a0a;
|
border: 1px solid #d30a0a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export class PublicationsPage implements OnInit {
|
|||||||
// from publication details
|
// from publication details
|
||||||
//publication: object;
|
//publication: object;
|
||||||
hideRefreshBtn = true;
|
hideRefreshBtn = true;
|
||||||
|
showSlidingOptions = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@@ -63,7 +64,6 @@ export class PublicationsPage implements OnInit {
|
|||||||
) {
|
) {
|
||||||
this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||||
this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -80,14 +80,20 @@ export class PublicationsPage implements OnInit {
|
|||||||
window.onresize = (event) => {
|
window.onresize = (event) => {
|
||||||
if( window.innerWidth < 801) {
|
if( window.innerWidth < 801) {
|
||||||
this.hideRefreshBtn = false;
|
this.hideRefreshBtn = false;
|
||||||
|
this.showSlidingOptions = false;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.hideRefreshBtn = true;
|
this.hideRefreshBtn = true;
|
||||||
|
this.showSlidingOptions = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(window.innerWidth < 801){
|
if(window.innerWidth < 801){
|
||||||
console.log('YASS');
|
|
||||||
this.hideRefreshBtn = false;
|
this.hideRefreshBtn = false;
|
||||||
|
this.showSlidingOptions = false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.hideRefreshBtn = true;
|
||||||
|
this.showSlidingOptions = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,14 +144,14 @@ export class PublicationsPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async editAction(id?: string){
|
async editAction(folderId?: string){
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: EditActionPage,
|
component: EditActionPage,
|
||||||
componentProps:{
|
componentProps:{
|
||||||
item: id,
|
folderId: folderId,
|
||||||
},
|
},
|
||||||
cssClass: 'new-action modal modal-desktop',
|
cssClass: 'new-action modal modal-desktop',
|
||||||
backdropDismiss: false
|
backdropDismiss: true
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(()=>{
|
modal.onDidDismiss().then(()=>{
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import { FormControl } from '@angular/forms';
|
|||||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||||
import { ThemePalette } from '@angular/material/core';
|
import { ThemePalette } from '@angular/material/core';
|
||||||
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import { NgZone, ViewChild } from '@angular/core';
|
import { NgZone, ViewChild } from '@angular/core';
|
||||||
import { FormGroup, Validators } from '@angular/forms';
|
import { FormGroup, Validators } from '@angular/forms';
|
||||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||||
@@ -198,7 +197,6 @@ export class NewEventPage implements OnInit {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(this.postEvent.Attendees != null) {
|
if(this.postEvent.Attendees != null) {
|
||||||
this.postEvent.Attendees.forEach(e =>{
|
this.postEvent.Attendees.forEach(e =>{
|
||||||
if(e.IsRequired) {
|
if(e.IsRequired) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<ion-header class="ion-no-border pt-20 px-20">
|
<ion-header class="ion-no-border pt-20 px-20">
|
||||||
<div class="title-content d-flex align-center justify-space-between ">
|
<div class="title-content d-flex align-center justify-space-between ">
|
||||||
<div class="div-title">
|
<div class="div-title">
|
||||||
<ion-label class="title">123 Editar acção presidencial</ion-label>
|
<ion-label class="title">Editar acção presidencial</ion-label>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="actionType">
|
<!-- <div class="actionType">
|
||||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ export class NewActionPage implements OnInit {
|
|||||||
folder: PublicationFolder;
|
folder: PublicationFolder;
|
||||||
segment:string;
|
segment:string;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public date: any;
|
public date: any;
|
||||||
public disabled = false;
|
public disabled = false;
|
||||||
public showSpinners = true;
|
public showSpinners = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user