mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Add desktop inputs
This commit is contained in:
+15
-1
@@ -15,9 +15,11 @@ import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-
|
||||
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
import {
|
||||
NgxMatDateFormats,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
NgxMatTimepickerModule
|
||||
NgxMatTimepickerModule,
|
||||
NGX_MAT_DATE_FORMATS
|
||||
} from '@angular-material-components/datetime-picker';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
@@ -28,6 +30,17 @@ import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
dateInput: "YYYY-MMMM-DD HH:mm"
|
||||
},
|
||||
display: {
|
||||
dateInput: "DD MMM YYYY H:mm",
|
||||
monthYearLabel: "MMM YYYY",
|
||||
dateA11yLabel: "LL",
|
||||
monthYearA11yLabel: "MMMM YYYY"
|
||||
}
|
||||
}
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
@@ -51,6 +64,7 @@ import { MatInputModule } from '@angular/material/input';
|
||||
ReactiveFormsModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
|
||||
{ provide: MAT_DATE_LOCALE, useValue: 'pt' },
|
||||
],
|
||||
declarations: [
|
||||
|
||||
+28
-11
@@ -28,14 +28,21 @@
|
||||
<ion-icon class="icon-time" slot="start" name="time-outline"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Prazo" [(ngModel)]="postData.Priority" interface="action-sheet" Cancel-text="Cancelar" required>
|
||||
<ion-select
|
||||
placeholder="Prazo"
|
||||
[(ngModel)]="postData.Priority"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar"
|
||||
required
|
||||
class="d-md-none"
|
||||
>
|
||||
<ion-select-option value="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999864"><b>Urgentíssimo</b> (8 horas para a execução da tarefa)</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
<mat-form-field class="width-100" placeholder="Sample Type" required>
|
||||
<mat-form-field class="width-100 d-none d-md-block" placeholder="Sample Type" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select >
|
||||
<mat-option value="Reunião">
|
||||
@@ -62,15 +69,25 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-item class="ion-no-border ion-no-padding ion-no-margin">
|
||||
<ion-label>Tipo de assunto</ion-label>
|
||||
<ion-select
|
||||
[(ngModel)]="selectedTypes"
|
||||
(ngModelChange)="onSelectedTypesChanged($event)"
|
||||
multiple="true" interface="alert" Cancel-text="Cancelar" required>
|
||||
<ion-select-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
<ion-item
|
||||
class="ion-no-border ion-no-padding ion-no-margin d-md-none">
|
||||
<ion-label>Tipo de assunto</ion-label>
|
||||
<ion-select
|
||||
[(ngModel)]="selectedTypes"
|
||||
(ngModelChange)="onSelectedTypesChanged($event)"
|
||||
multiple="true" interface="alert" Cancel-text="Cancelar" required>
|
||||
<ion-select-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<mat-form-field
|
||||
appearance="fill"
|
||||
class="width-100 d-none d-md-block">
|
||||
<mat-label>Toppings</mat-label>
|
||||
<mat-select [formControl]="toppings" multiple>
|
||||
<mat-option *ngFor="let type of subjectTypes" [value]="type.Code">{{type.Description}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+30
-1
@@ -20,11 +20,30 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
dateInput: "YYYY-MMMM-DD HH:mm"
|
||||
},
|
||||
display: {
|
||||
dateInput: "DD MMM YYYY H:mm",
|
||||
monthYearLabel: "MMM YYYY",
|
||||
dateA11yLabel: "LL",
|
||||
monthYearA11yLabel: "MMMM YYYY"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-expedient-task-modal',
|
||||
templateUrl: './expedient-task-modal.page.html',
|
||||
styleUrls: ['./expedient-task-modal.page.scss'],
|
||||
providers: [
|
||||
{ provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
|
||||
]
|
||||
})
|
||||
export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
@@ -46,7 +65,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
loadedAttachments:any;
|
||||
documents:SearchDocument[] = [];
|
||||
|
||||
subjectTypes:any;
|
||||
subjectTypes:any[] = [];
|
||||
selectedTypes: string[]=[];
|
||||
|
||||
postData: Despacho;
|
||||
@@ -66,6 +85,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
taskResult: any = {}
|
||||
|
||||
loggeduser: User;
|
||||
toppings = new FormControl();
|
||||
|
||||
get toppingsValues() {
|
||||
return this.toppings.value;
|
||||
}
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -190,6 +214,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
});
|
||||
docs.Attachments = DocumentToSave;
|
||||
|
||||
if (window.innerWidth >= 800) {
|
||||
this.selectedTypes = this.toppingsValues
|
||||
}
|
||||
|
||||
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
||||
|
||||
switch (this.loggeduser.Profile) {
|
||||
|
||||
Reference in New Issue
Block a user