mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' into developer_mobilefirst
This commit is contained in:
+154
-153
@@ -1,141 +1,142 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
import { ChatPage } from './pages/chat/chat.page';
|
||||
import { MessagesPage } from './pages/chat/messages/messages.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./index/index.module').then(m => m.IndexPageModule)
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)
|
||||
},
|
||||
{
|
||||
path: 'empty-chat',
|
||||
loadChildren: () => import('./shared/chat/empty-chat/empty-chat.module').then( m => m.EmptyChatPageModule)
|
||||
},
|
||||
{
|
||||
path: 'empty-container',
|
||||
loadChildren: () => import('./shared/empty-container/empty-container.module').then( m => m.EmptyContainerPageModule)
|
||||
},
|
||||
{
|
||||
path: 'events-to-approve',
|
||||
loadChildren: () => import('./shared/gabinete-digital/events-to-approve/events-to-approve.module').then( m => m.EventsToApprovePageModule)
|
||||
},
|
||||
{
|
||||
path: 'expedients',
|
||||
loadChildren: () => import('./shared/gabinete-digital/expedients/expedients.module').then( m => m.ExpedientsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'document-detail',
|
||||
loadChildren: () => import('./modals/document-detail/document-detail.module').then( m => m.DocumentDetailPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-group',
|
||||
loadChildren: () => import('./shared/chat/edit-group/edit-group.module').then( m => m.EditGroupPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pedidos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/pedidos/pedidos.module').then( m => m.PedidosPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-list',
|
||||
loadChildren: () => import('./pages/gabinete-digital/event-list/event-list.module').then(m =>m.EventListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/despachos/despachos.module').then( m => m.DespachosPageModule)
|
||||
},
|
||||
{
|
||||
path: 'create-process',
|
||||
loadChildren: () => import('./modals/create-process/create-process.module').then( m => m.CreateProcessPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pendentes',
|
||||
loadChildren: () => import('./shared/gabinete-digital/pendentes/pendentes.module').then( m => m.PendentesPageModule)
|
||||
},
|
||||
{
|
||||
path: 'delegar',
|
||||
loadChildren: () => import('./modals/delegar/delegar.module').then( m => m.DelegarPageModule)
|
||||
},
|
||||
{
|
||||
path: 'add-note',
|
||||
loadChildren: () => import('./modals/add-note/add-note.module').then( m => m.AddNotePageModule)
|
||||
},
|
||||
{
|
||||
path: 'dar-parecer',
|
||||
loadChildren: () => import('./modals/dar-parecer/dar-parecer.module').then( m => m.DarParecerPageModule)
|
||||
},
|
||||
{
|
||||
path: 'opts-expediente',
|
||||
loadChildren: () => import('./shared/popover/opts-expediente/opts-expediente.module').then( m => m.OptsExpedientePageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-pr',
|
||||
loadChildren: () => import('./shared/gabinete-digital/despachos-pr/despachos-pr.module').then( m => m.DespachosPrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'diplomas',
|
||||
loadChildren: () => import('./shared/gabinete-digital/diplomas/diplomas.module').then( m => m.DiplomasPageModule)
|
||||
},
|
||||
{
|
||||
path: 'expedientes-pr',
|
||||
loadChildren: () => import('./shared/gabinete-digital/expedientes-pr/expedientes-pr.module').then( m => m.ExpedientesPrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'diplomas-assinar',
|
||||
loadChildren: () => import('./shared/gabinete-digital/diplomas-assinar/diplomas-assinar.module').then( m => m.DiplomasAssinarPageModule)
|
||||
},
|
||||
{
|
||||
path: 'opts-expediente-pr',
|
||||
loadChildren: () => import('./shared/popover/opts-expediente-pr/opts-expediente-pr.module').then( m => m.OptsExpedientePrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-options',
|
||||
loadChildren: () => import('./shared/popover/despachos-options/despachos-options.module').then( m => m.DespachosOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-pr-options',
|
||||
loadChildren: () => import('./shared/popover/despachos-pr-options/despachos-pr-options.module').then( m => m.DespachosPrOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'deploma-options',
|
||||
loadChildren: () => import('./shared/popover/deploma-options/deploma-options.module').then( m => m.DeplomaOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pin',
|
||||
loadChildren: () => import('./shared/pin/pin.module').then( m => m.PinPageModule)
|
||||
},
|
||||
{
|
||||
path: 'fingerprint',
|
||||
loadChildren: () => import('./shared/fingerprint/fingerprint.module').then( m => m.FingerprintPageModule)
|
||||
},
|
||||
{
|
||||
path: 'new-event',
|
||||
loadChildren: () => import('./shared/agenda/new-event/new-event.module').then( m => m.NewEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-list',
|
||||
loadChildren: () => import('./shared/agenda/event-list/event-list.module').then( m => m.EventListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'approve-event',
|
||||
loadChildren: () => import('./shared/agenda/approve-event/approve-event.module').then( m => m.ApproveEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'bad-request',
|
||||
loadChildren: () => import('./shared/popover/bad-request/bad-request.module').then( m => m.BadRequestPageModule)
|
||||
},
|
||||
{
|
||||
path: 'success-message',
|
||||
loadChildren: () => import('./shared/popover/success-message/success-message.module').then( m => m.SuccessMessagePageModule)
|
||||
},
|
||||
{
|
||||
path: 'forward',
|
||||
loadChildren: () => import('./modals/forward/forward.module').then( m => m.ForwardPageModule)
|
||||
},
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
import { ChatPage } from './pages/chat/chat.page';
|
||||
import { MessagesPage } from './pages/chat/messages/messages.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./index/index.module').then(m => m.IndexPageModule)
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)
|
||||
},
|
||||
{
|
||||
path: 'empty-chat',
|
||||
loadChildren: () => import('./shared/chat/empty-chat/empty-chat.module').then( m => m.EmptyChatPageModule)
|
||||
},
|
||||
{
|
||||
path: 'empty-container',
|
||||
loadChildren: () => import('./shared/empty-container/empty-container.module').then( m => m.EmptyContainerPageModule)
|
||||
},
|
||||
{
|
||||
path: 'events-to-approve',
|
||||
loadChildren: () => import('./shared/gabinete-digital/events-to-approve/events-to-approve.module').then( m => m.EventsToApprovePageModule)
|
||||
},
|
||||
{
|
||||
path: 'expedients',
|
||||
loadChildren: () => import('./shared/gabinete-digital/expedients/expedients.module').then( m => m.ExpedientsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'document-detail',
|
||||
loadChildren: () => import('./modals/document-detail/document-detail.module').then( m => m.DocumentDetailPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-group',
|
||||
loadChildren: () => import('./shared/chat/edit-group/edit-group.module').then( m => m.EditGroupPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pedidos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/pedidos/pedidos.module').then( m => m.PedidosPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-list',
|
||||
loadChildren: () => import('./pages/gabinete-digital/event-list/event-list.module').then(m =>m.EventListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos',
|
||||
loadChildren: () => import('./shared/gabinete-digital/despachos/despachos.module').then( m => m.DespachosPageModule)
|
||||
},
|
||||
{
|
||||
path: 'create-process',
|
||||
loadChildren: () => import('./modals/create-process/create-process.module').then( m => m.CreateProcessPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pendentes',
|
||||
loadChildren: () => import('./shared/gabinete-digital/pendentes/pendentes.module').then( m => m.PendentesPageModule)
|
||||
},
|
||||
{
|
||||
path: 'delegar',
|
||||
loadChildren: () => import('./modals/delegar/delegar.module').then( m => m.DelegarPageModule)
|
||||
},
|
||||
{
|
||||
path: 'add-note',
|
||||
loadChildren: () => import('./modals/add-note/add-note.module').then( m => m.AddNotePageModule)
|
||||
},
|
||||
{
|
||||
path: 'dar-parecer',
|
||||
loadChildren: () => import('./modals/dar-parecer/dar-parecer.module').then( m => m.DarParecerPageModule)
|
||||
},
|
||||
{
|
||||
path: 'opts-expediente',
|
||||
loadChildren: () => import('./shared/popover/opts-expediente/opts-expediente.module').then( m => m.OptsExpedientePageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-pr',
|
||||
loadChildren: () => import('./shared/gabinete-digital/despachos-pr/despachos-pr.module').then( m => m.DespachosPrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'diplomas',
|
||||
loadChildren: () => import('./shared/gabinete-digital/diplomas/diplomas.module').then( m => m.DiplomasPageModule)
|
||||
},
|
||||
{
|
||||
path: 'expedientes-pr',
|
||||
loadChildren: () => import('./shared/gabinete-digital/expedientes-pr/expedientes-pr.module').then( m => m.ExpedientesPrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'diplomas-assinar',
|
||||
loadChildren: () => import('./shared/gabinete-digital/diplomas-assinar/diplomas-assinar.module').then( m => m.DiplomasAssinarPageModule)
|
||||
},
|
||||
{
|
||||
path: 'opts-expediente-pr',
|
||||
loadChildren: () => import('./shared/popover/opts-expediente-pr/opts-expediente-pr.module').then( m => m.OptsExpedientePrPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-options',
|
||||
loadChildren: () => import('./shared/popover/despachos-options/despachos-options.module').then( m => m.DespachosOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'despachos-pr-options',
|
||||
loadChildren: () => import('./shared/popover/despachos-pr-options/despachos-pr-options.module').then( m => m.DespachosPrOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'deploma-options',
|
||||
loadChildren: () => import('./shared/popover/deploma-options/deploma-options.module').then( m => m.DeplomaOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'pin',
|
||||
loadChildren: () => import('./shared/pin/pin.module').then( m => m.PinPageModule)
|
||||
},
|
||||
{
|
||||
path: 'fingerprint',
|
||||
loadChildren: () => import('./shared/fingerprint/fingerprint.module').then( m => m.FingerprintPageModule)
|
||||
},
|
||||
{
|
||||
path: 'new-event',
|
||||
loadChildren: () => import('./shared/agenda/new-event/new-event.module').then( m => m.NewEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-list',
|
||||
loadChildren: () => import('./shared/agenda/event-list/event-list.module').then( m => m.EventListPageModule)
|
||||
},
|
||||
{
|
||||
path: 'approve-event',
|
||||
loadChildren: () => import('./shared/agenda/approve-event/approve-event.module').then( m => m.ApproveEventPageModule)
|
||||
},
|
||||
{
|
||||
path: 'bad-request',
|
||||
loadChildren: () => import('./shared/popover/bad-request/bad-request.module').then( m => m.BadRequestPageModule)
|
||||
},
|
||||
{
|
||||
path: 'success-message',
|
||||
loadChildren: () => import('./shared/popover/success-message/success-message.module').then( m => m.SuccessMessagePageModule)
|
||||
},
|
||||
{
|
||||
path: 'forward',
|
||||
loadChildren: () => import('./modals/forward/forward.module').then( m => m.ForwardPageModule)
|
||||
},
|
||||
{
|
||||
path: 'edit-event-to-approve',
|
||||
loadChildren: () => import('./shared/agenda/edit-event-to-approve/edit-event-to-approve.module').then( m => m.EditEventToApprovePageModule)
|
||||
},
|
||||
@@ -148,18 +149,18 @@ const routes: Routes = [
|
||||
loadChildren: () => import('./shared/publication/edit-action/edit-action.module').then( m => m.EditActionPageModule)
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
/* {
|
||||
path: 'chat',
|
||||
component: ChatPage
|
||||
} */
|
||||
|
||||
];
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
|
||||
|
||||
/* {
|
||||
path: 'chat',
|
||||
component: ChatPage
|
||||
} */
|
||||
|
||||
];
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
|
||||
@@ -45,6 +45,7 @@ import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { ProcessesResolverService } from './resolvers/processes-resolver.service';
|
||||
|
||||
|
||||
@NgModule({
|
||||
@@ -57,7 +58,7 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
provide: DateAdapter,
|
||||
useFactory: adapterFactory
|
||||
}),
|
||||
IonicModule.forRoot(),
|
||||
IonicModule.forRoot({animated: false}),
|
||||
IonicStorageModule.forRoot(),
|
||||
AppRoutingModule,
|
||||
HttpClientModule,
|
||||
|
||||
@@ -7,6 +7,7 @@ import { GroupMessagesPage } from '../pages/chat/group-messages/group-messages.p
|
||||
import { MessagesPage } from '../pages/chat/messages/messages.page';
|
||||
import { ProcessesResolverService } from '../resolvers/processes-resolver.service';
|
||||
import { UserDataResolver } from '../resolvers/userData.resolver';
|
||||
import { DiplomasPage } from '../shared/gabinete-digital/diplomas/diplomas.page';
|
||||
|
||||
import { HomePage } from './home.page';
|
||||
|
||||
@@ -15,7 +16,7 @@ const routes: Routes = [
|
||||
path: 'home',
|
||||
component: HomePage,
|
||||
resolve: {
|
||||
userData: UserDataResolver
|
||||
userData: UserDataResolver,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
@@ -141,6 +142,9 @@ const routes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'gabinete-digital',
|
||||
resolve: {
|
||||
diplomas: ProcessesResolverService
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path:'',
|
||||
@@ -216,7 +220,6 @@ const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/diplomas/diplomas.module').then(m => m.DiplomasPageModule),
|
||||
/* resolve { diplomas: ProcessesResolverService}, */
|
||||
},
|
||||
{
|
||||
path:':SerialNumber/:caller',
|
||||
|
||||
@@ -8,7 +8,6 @@ import { HomePageRoutingModule } from './home-routing.module';
|
||||
|
||||
import { HomePage } from './home.page';
|
||||
/* import { IonicSelectableModule } from 'ionic-selectable'; */
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { ComponentsModule } from '../components/components.module';
|
||||
|
||||
@NgModule({
|
||||
@@ -19,6 +18,6 @@ import { ComponentsModule } from '../components/components.module';
|
||||
HomePageRoutingModule,
|
||||
ComponentsModule
|
||||
],
|
||||
declarations: [HomePage]
|
||||
declarations: [HomePage],
|
||||
})
|
||||
export class HomePageModule {}
|
||||
|
||||
@@ -27,27 +27,65 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon class="icon-time" slot="start" name="time-outline"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Priority')?.invalid && validateFrom">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Priority')?.invalid && validateFrom" >
|
||||
|
||||
<ion-select class="d-block d-md-none" [(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-block 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 appearance="fill" class="width-100 d-none d-md-block" floatLabel="never">
|
||||
<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-option [value]="99999861">Normal</mat-option>
|
||||
<mat-option [value]="99999862">Urgente</mat-option>
|
||||
<mat-option [value]="99999863">Muito Urgente</mat-option>
|
||||
<mat-option [value]="99999864">Urgentíssimo</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]="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-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('selectedTypes')?.invalid && validateFrom ">
|
||||
<!-- <ion-item
|
||||
class="ion-no-border ion-no-padding ion-no-margin d-block d-md-none">
|
||||
<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
|
||||
floatLabel="never"
|
||||
appearance="fill"
|
||||
class="width-100 d-block"
|
||||
appearance="none">
|
||||
<mat-select [(ngModel)]="selectedTypes" multiple placeholder="Selecione o tipo de evento*">
|
||||
<mat-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
|
||||
@@ -187,6 +187,9 @@ export class CreateProcessPage implements OnInit {
|
||||
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
// Validators.required
|
||||
]),
|
||||
selectedTypes: new FormControl(this.selectedTypes, [
|
||||
Validators.required,
|
||||
]),
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -237,19 +237,21 @@
|
||||
|
||||
<div class="d-flex container-div width-100" *ngFor="let document of loadedEventAttachments" >
|
||||
<ion-list class="width-100 list">
|
||||
<ion-item class="width-100">
|
||||
<ion-item class="width-100 ion-no-border ion-no-padding">
|
||||
<ion-label class="width-100">
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<p class="p-item-title d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.SourceName}}</span>
|
||||
<span class="app-name" *ngIf="document.ApplicationId == 8"> Correspondencia </span>
|
||||
<span class="app-name" *ngIf="document.ApplicationId == 386"> AccoesPresidenciais </span>
|
||||
<span class="app-name" *ngIf="document.ApplicationId == 361 "> ArquivoDespachoElect </span>
|
||||
<span class="close-button text-black" (click)="deleteAttachment(document.Id)" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
|
||||
</p>
|
||||
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate | date: 'dd-MM-yy'}} </span></p>
|
||||
</p>
|
||||
<p><span class="span-left">{{document.Stakeholders}}</span></p>
|
||||
<p>
|
||||
<span class="app-name span-left" *ngIf="document.ApplicationId == 8"> Correspondência </span>
|
||||
<span class="app-name span-left" *ngIf="document.ApplicationId == 386"> Acções Presidenciais </span>
|
||||
<span class="app-name span-left" *ngIf="document.ApplicationId == 361 "> Arquivo Despacho Electrónico </span>
|
||||
|
||||
<span class="span-right"> {{document.CreateDate | date: 'dd-MM-yy'}} </span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
@@ -136,6 +136,7 @@ export class NewEventPage implements OnInit {
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
@@ -188,8 +189,6 @@ export class NewEventPage implements OnInit {
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
console.log('passed')
|
||||
|
||||
if(this.documents.length >= 0) {
|
||||
this.postEvent.HasAttachments = true;
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-list class="width-100">
|
||||
<ion-item *ngFor="let attach of loadedAttachments; let i = index" class="width-100" lines="none" class="ion-no-margin ion-no-padding">
|
||||
<ion-item *ngFor="let attach of loadedAttachments; let i = index" class="width-100" class="ion-no-margin ion-no-padding">
|
||||
<ion-label class="width-100 d-flex " >
|
||||
<p class="flex-grow-1" (click)="viewDocument(attach.SourceId)">
|
||||
<span class="attach-title-item d-block">{{attach.SourceName}}</span>
|
||||
|
||||
@@ -88,6 +88,7 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.activatedRoute.data.subscribe(data => console.log(data));
|
||||
//Inicializar segment
|
||||
this.segment = "Combinada";
|
||||
//Initialize profile as mdgpr
|
||||
@@ -285,13 +286,11 @@ export class EventsPage implements OnInit {
|
||||
case 'MDGPR':
|
||||
this.processes.GetTasksList("Expediente", false).subscribe(result => {
|
||||
this.expedientList = result.reverse();
|
||||
console.log(this.expedientList);
|
||||
});
|
||||
break;
|
||||
case 'PR':
|
||||
this.processes.GetTasksList("Expediente do Presidente", false).subscribe(result => {
|
||||
this.expedientList = result.reverse();
|
||||
console.log(this.expedientList);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -95,6 +95,7 @@ export class DiplomaPage implements OnInit {
|
||||
component: DeplomaOptionsPage,
|
||||
cssClass: 'exp-options',
|
||||
componentProps: {
|
||||
serialNumber: this.serialNumber,
|
||||
task: this.task,
|
||||
fulltask: this.fulltask,
|
||||
taskAction:taskAction,
|
||||
@@ -292,6 +293,4 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
<ion-toolbar>
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="validar">
|
||||
Diplomas por validar
|
||||
Por validar
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="assinados">
|
||||
Diplomas assinados PR
|
||||
Assinados PR
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
@@ -28,12 +28,7 @@
|
||||
|
||||
<div class="main-content">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
<ion-refresher-content></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100" [ngSwitch]="segment">
|
||||
@@ -57,7 +52,7 @@
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label></label>
|
||||
<label>{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
|
||||
@@ -1,34 +1,31 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationError, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
import { DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { DiplomaPage } from 'src/app/pages/gabinete-digital/diplomas/diploma/diploma.page';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
|
||||
@Component({
|
||||
selector: 'app-diplomas',
|
||||
templateUrl: './diplomas.page.html',
|
||||
styleUrls: ['./diplomas.page.scss'],
|
||||
})
|
||||
export class DiplomasPage implements OnInit {
|
||||
diplomasList:DailyWorkTask[] = [];
|
||||
export class DiplomasPage implements OnInit, OnDestroy {
|
||||
list:DailyWorkTask[] = [];
|
||||
diplomasList:DailyWorkTask[] = [];
|
||||
diplomasAssinadoList:DailyWorkTask[] = [];
|
||||
showLoader: boolean;
|
||||
totalDocs:any;
|
||||
serialNumber:string;
|
||||
|
||||
@Input() profile:string;
|
||||
@Input() segment:string;
|
||||
segment:string;
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
this.diplomasList = [];
|
||||
this.segment = 'validar';
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
console.log('Cria');
|
||||
|
||||
@@ -37,34 +34,103 @@ constructor(
|
||||
} else if (params['segment'] == 'assinados') {
|
||||
this.segment = 'assinados';
|
||||
}
|
||||
|
||||
this.LoadList();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
console.log('Atualiza');
|
||||
|
||||
this.LoadList();
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
console.log('Init');
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
/* async loadDiplomas(){
|
||||
console.log('Load');
|
||||
|
||||
this.activatedRoute.data.subscribe(data => {
|
||||
console.log(data['diplomas']);
|
||||
|
||||
switch (this.segment) {
|
||||
case 'validar':
|
||||
|
||||
let diplomasValidar = data['diplomas'].filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
diplomasValidar.forEach(async element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
|
||||
let res = await this.processes.GetDocumentDetails(DocId, '361').toPromise();
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": res.DocumentsTotal,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
this.diplomasList = removeDuplicate( this.diplomasList)
|
||||
|
||||
});
|
||||
this.showLoader = false;
|
||||
break;
|
||||
|
||||
case 'assinados':
|
||||
//this.diplomasList = new Array();
|
||||
let diplomasAssinados = data.diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
diplomasAssinados.forEach(async element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
|
||||
let res = await this.processes.GetDocumentDetails(DocId, '361').toPromise();
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
this.diplomasList = removeDuplicate( this.diplomasList)
|
||||
|
||||
});
|
||||
this.showLoader = false;
|
||||
break;
|
||||
}
|
||||
});
|
||||
} */
|
||||
|
||||
async getTotalDocs(DocId:any){
|
||||
let res = await this.processes.GetDocumentDetails(DocId, '361').toPromise();
|
||||
console.log(res.DocumentsTotal);
|
||||
return res.DocumentsTotal;
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
console.log('8. on destroy called');
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
let navigationExtras: NavigationExtras;
|
||||
|
||||
if (this.segment == 'assinados') {
|
||||
navigationExtras= { queryParams: {"assinados": true,}};
|
||||
} else if (this.segment == 'validar') {
|
||||
navigationExtras = { queryParams: {"validar": true,}};
|
||||
}
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
@@ -73,115 +139,95 @@ constructor(
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
this.diplomasList = [];
|
||||
console.log(this.diplomasList);
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
|
||||
|
||||
switch (this.segment) {
|
||||
case 'validar':
|
||||
this.diplomasList = new Array();
|
||||
let diplomasValidar = diplomas.reverse().filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
diplomasValidar.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
let diplomasValidar = diplomas.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
console.log(diplomasValidar);
|
||||
|
||||
diplomasValidar.forEach(async element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.totalDocs = await this.getTotalDocs(DocId);
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=> {
|
||||
this.diplomasList = removeDuplicate(this.diplomasList);
|
||||
this.diplomasList = this.sortArrayISODate(this.diplomasList).reverse();
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
});
|
||||
this.showLoader = false;
|
||||
this.showLoader = false;
|
||||
break;
|
||||
case 'assinados':
|
||||
this.diplomasList = new Array();
|
||||
let diplomasAssinados = diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
diplomasAssinados.forEach(element => {
|
||||
diplomasAssinados.forEach(async element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
this.totalDocs = await this.getTotalDocs(DocId);
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=> {
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
this.diplomasList = removeDuplicate(this.diplomasList);
|
||||
this.diplomasList = this.sortArrayISODate(this.diplomasList).reverse();
|
||||
|
||||
});
|
||||
this.showLoader = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
sortArrayISODate(myArray: any) {
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
async refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
|
||||
async doRefresh(event) {
|
||||
console.log('refresh');
|
||||
|
||||
//this.loadDiplomas();
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
event.target.complete();
|
||||
|
||||
+11
-13
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2 width-100">
|
||||
<div class="ion-icon-class">
|
||||
@@ -65,12 +65,12 @@
|
||||
<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 appearance="fill" class="width-100 d-none d-md-block" appearance="none">
|
||||
<mat-form-field appearance="fill" class="width-100 d-none d-md-block" floatLabel="never" appearance="none">
|
||||
<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]="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]="99999864"><b>Urgentíssimo</b> (8 horas 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="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-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('selectedTypes')?.invalid && validateFrom ">
|
||||
<ion-item
|
||||
<!-- <ion-item
|
||||
class="ion-no-border ion-no-padding ion-no-margin d-block d-md-none">
|
||||
<ion-select
|
||||
[(ngModel)]="selectedTypes"
|
||||
@@ -103,15 +103,14 @@
|
||||
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> -->
|
||||
<mat-form-field
|
||||
floatLabel="never"
|
||||
appearance="fill"
|
||||
class="width-100 d-none d-md-block"
|
||||
class="width-100 d-block"
|
||||
appearance="none">
|
||||
<mat-select [formControl]="toppings" multiple placeholder="Selecione o tipo de evento*">
|
||||
<mat-option *ngFor="let type of subjectTypes" [value]="type.Code">{{type.Description}}</mat-option>
|
||||
<mat-select [(ngModel)]="selectedTypes" multiple placeholder="Selecione o tipo de evento*">
|
||||
<mat-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@@ -129,7 +128,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
|
||||
+8
-6
@@ -191,7 +191,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
Location: new FormControl(this.postData.DispatchFolder.Message, [
|
||||
Validators.required,
|
||||
]),
|
||||
selectedTypes: new FormControl(this.toppingsValues, [
|
||||
selectedTypes: new FormControl(this.selectedTypes, [
|
||||
Validators.required,
|
||||
]),
|
||||
Priority: new FormControl(this.postData.Priority, [
|
||||
@@ -218,20 +218,22 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
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';
|
||||
}
|
||||
else if(this.postData.Priority=='99999862'){
|
||||
else if(this.postData.Priority=='99999862') {
|
||||
this.dispatchFolder.DeadlineType = 'Urgente';
|
||||
}
|
||||
else if(this.postData.Priority=='99999863'){
|
||||
else if(this.postData.Priority=='99999863') {
|
||||
this.dispatchFolder.DeadlineType = 'Muito Urgente';
|
||||
}
|
||||
else if(this.postData.Priority=='99999864'){
|
||||
else if(this.postData.Priority=='99999864') {
|
||||
this.dispatchFolder.DeadlineType = 'Urgentíssimo';
|
||||
}
|
||||
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
@@ -42,8 +42,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
ngOnInit() {
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.LoadList();
|
||||
console.log('not run');
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -107,6 +106,12 @@ export class ExpedientesPrPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -431,8 +431,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
openDiplomasPage(segment:string) {
|
||||
if( window.innerWidth <= 801){
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": segment}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas']);
|
||||
}
|
||||
else{
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
@@ -8,12 +8,40 @@ import { NewActionPageRoutingModule } from './new-action-routing.module';
|
||||
|
||||
import { NewActionPage } from './new-action.page';
|
||||
|
||||
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';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
NewActionPageRoutingModule
|
||||
NewActionPageRoutingModule,
|
||||
// Angular material
|
||||
MatDatepickerModule,
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatTimepickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
NgxMatMomentModule,
|
||||
MatSelectModule,
|
||||
MatButtonModule,
|
||||
ReactiveFormsModule,
|
||||
MatDialogModule,
|
||||
],
|
||||
exports: [NewActionPage],
|
||||
declarations: [NewActionPage]
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container">
|
||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<div class="ion-input-class">
|
||||
<ion-datetime
|
||||
[(ngModel)]="folder.DateBegin"
|
||||
class="d-block d-md-none"
|
||||
placeholder="Início"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
@@ -37,6 +38,25 @@
|
||||
min="2018"
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field class="date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
[formControl]="dateControlStart"
|
||||
[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>
|
||||
@@ -47,7 +67,8 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-datetime
|
||||
<ion-datetime
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="folder.DateEnd"
|
||||
placeholder="Fim"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
@@ -56,6 +77,25 @@
|
||||
min="2018"
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field class="date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date"
|
||||
[formControl]="dateControlEnd"
|
||||
[min]="endMinDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #fim
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepSecond]="stepSecond"
|
||||
[touchUi]="touchUi"
|
||||
>
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,76 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AnimationController, ModalController } from '@ionic/angular';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ModalController } 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';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { NGX_MAT_DATE_FORMATS } 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-new-action',
|
||||
templateUrl: './new-action.page.html',
|
||||
styleUrls: ['./new-action.page.scss'],
|
||||
providers: [
|
||||
{ provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
|
||||
]
|
||||
})
|
||||
export class NewActionPage implements OnInit {
|
||||
|
||||
folder: PublicationFolder;
|
||||
segment:string;
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
public date: any;
|
||||
public disabled = false;
|
||||
public showSpinners = true;
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
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"));
|
||||
|
||||
showLoader = false
|
||||
|
||||
get dateStart () {
|
||||
return this.dateControlStart.value
|
||||
}
|
||||
|
||||
get dateEnd () {
|
||||
return this.dateControlEnd.value
|
||||
}
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private publication: PublicationsService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService
|
||||
|
||||
) {
|
||||
this.folder = new PublicationFolder();
|
||||
|
||||
this.dateControlStart = new FormControl(moment(new Date()));
|
||||
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -34,7 +81,39 @@ export class NewActionPage implements OnInit {
|
||||
console.log(ev.detail.value);
|
||||
}
|
||||
|
||||
async save(){
|
||||
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() {
|
||||
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
this.folder = {
|
||||
ProcessId: null,
|
||||
Description: this.folder.Description,
|
||||
@@ -43,7 +122,6 @@ export class NewActionPage implements OnInit {
|
||||
DateEnd: this.folder.DateEnd,
|
||||
ActionType: this.segment,
|
||||
}
|
||||
console.log(this.folder);
|
||||
|
||||
try {
|
||||
await this.publication.CreatePublicationFolder(this.folder).toPromise();
|
||||
@@ -54,12 +132,9 @@ export class NewActionPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AlertController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { GalleryPage } from '../gallery/gallery.page';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
/* import {Plugins, CameraResultType, CameraSource} from '@capacitor/core'; */
|
||||
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { Publication } from 'src/app/models/publication';
|
||||
import { Image } from 'src/app/models/image';
|
||||
import { ThrowStmt } from '@angular/compiler';
|
||||
import { PhotoService } from 'src/app/services/photo.service';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
//Capacitor
|
||||
/* const { Camera } = Plugins; */
|
||||
|
||||
//Cordova
|
||||
import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { ViewPublicationsPage } from '../view-publications/view-publications.page';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-publication',
|
||||
@@ -26,6 +21,24 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
styleUrls: ['./new-publication.page.scss'],
|
||||
})
|
||||
export class NewPublicationPage implements OnInit {
|
||||
|
||||
// date picker
|
||||
public date: any;
|
||||
public disabled = false;
|
||||
public showSpinners = true;
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public color: ThemePalette = 'primary';
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
showLoader: boolean;
|
||||
publication: Publication;
|
||||
pub: Publication = new Publication();
|
||||
@@ -38,7 +51,6 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
Defaultimage:any = '';
|
||||
|
||||
|
||||
photo: SafeResourceUrl;
|
||||
|
||||
guestPicture:any;
|
||||
@@ -46,7 +58,6 @@ export class NewPublicationPage implements OnInit {
|
||||
capturedImage:any;
|
||||
capturedImageTitle:any;
|
||||
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
public photoService: PhotoService,
|
||||
@@ -59,13 +70,14 @@ export class NewPublicationPage implements OnInit {
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
this.folderId = this.navParams.get('folderId');
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.setTitle();
|
||||
this.clear();
|
||||
// this.takePicture();
|
||||
}
|
||||
|
||||
takePicture() {
|
||||
const options: CameraOptions = {
|
||||
quality: 90,
|
||||
@@ -77,17 +89,17 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
this.camera.getPicture(options).then((imageData) => {
|
||||
// imageData is either a base64 encoded string or a file URI
|
||||
// If it's base64 (DATA_URL):
|
||||
let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
// imageData is either a base64 encoded string or a file URI
|
||||
// If it's base64 (DATA_URL):
|
||||
let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
/* console.log(err); */
|
||||
/* console.log(err); */
|
||||
});
|
||||
}
|
||||
|
||||
getPicture(){
|
||||
getPicture() {
|
||||
const options: CameraOptions = {
|
||||
quality: 90,
|
||||
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
|
||||
@@ -97,21 +109,46 @@ export class NewPublicationPage implements OnInit {
|
||||
targetWidth: 720,
|
||||
targetHeight: 720,
|
||||
}
|
||||
|
||||
this.camera.getPicture(options).then((imageData) => {
|
||||
// imageData is either a base64 encoded string or a file URI
|
||||
// If it's base64 (DATA_URL):
|
||||
let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
}, (err) => {
|
||||
/* console.log(err); */
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async save(){
|
||||
console.log('SAVE');
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.pub.Title, [
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
capturedImage: new FormControl(this.capturedImage, [
|
||||
|
||||
]),
|
||||
Message: new FormControl(this.pub.Message, [
|
||||
Validators.required
|
||||
])
|
||||
})
|
||||
}
|
||||
|
||||
async save() {
|
||||
|
||||
if(this.publicationType == '3'){
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
if(this.publicationType == '3') {
|
||||
console.log(this.navParams.get('publication'));
|
||||
|
||||
if(this.capturedImage != '') {
|
||||
@@ -139,7 +176,7 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.publication = {
|
||||
DateIndex: this.publication.DateIndex,
|
||||
DocumentId:this.publication.DocumentId,
|
||||
@@ -165,7 +202,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.publication = {
|
||||
DateIndex: new Date(),
|
||||
DocumentId:null,
|
||||
@@ -194,15 +231,17 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
close(){
|
||||
close() {
|
||||
this.modalController.dismiss().then(()=>{
|
||||
this.showLoader=true;
|
||||
});
|
||||
}
|
||||
clear(){
|
||||
|
||||
clear() {
|
||||
this.capturedImage = '';
|
||||
}
|
||||
setTitle(){
|
||||
|
||||
setTitle() {
|
||||
if(this.publicationType == '1') {
|
||||
this.publicationTitle = 'Nova Publicação Rápida';
|
||||
}
|
||||
@@ -239,4 +278,4 @@ export class NewPublicationPage implements OnInit {
|
||||
this.photo = this.sanitizer.bypassSecurityTrustResourceUrl(image && (image.dataUrl));
|
||||
} */
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,6 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { PublicationsPageRoutingModule } from './publications-routing.module';
|
||||
|
||||
import { PublicationsPage } from './publications.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { ViewPublicationsPage } from 'src/app/shared/publication/view-publications/view-publications.page';
|
||||
import { NewPublicationPage } from 'src/app/shared/publication/new-publication/new-publication.page';
|
||||
import { PublicationDetailPage } from 'src/app/shared/publication/view-publications/publication-detail/publication-detail.page';
|
||||
import { NewActionPage } from 'src/app/shared/publication/new-action/new-action.page';
|
||||
import { ComponentsModule } from 'src/app/components/components.module';
|
||||
import { ViewPublicationsPageModule } from 'src/app/shared/publication/view-publications/view-publications.module';
|
||||
import { NewPublicationPageModule } from 'src/app/shared/publication/new-publication/new-publication.module';
|
||||
@@ -20,7 +15,6 @@ import { PublicationDetailPageModule } from 'src/app/shared/publication/view-pub
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
import { EditActionPageModule } from 'src/app/shared/publication/edit-action/edit-action.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRoute, ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { DailyWorkTask } from '../models/dailyworktask.model';
|
||||
import { ProcessesService } from '../services/processes.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProcessesResolverService implements Resolve<any[]> {
|
||||
export class ProcessesResolverService implements Resolve<any> {
|
||||
|
||||
constructor(
|
||||
private processesService: ProcessesService,
|
||||
) { }
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot):
|
||||
Observable<any> | Promise<any> | any[] {
|
||||
Observable<any> | Promise<any> | any {
|
||||
/* const n: any = [{numero: '1', n2:'3e'}]
|
||||
return n; */
|
||||
return this.processesService.GetTasksList("Despacho do Presidente da República", false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<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">
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
@@ -162,13 +162,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-div d-flex">
|
||||
<div class="ion-item-class-2 width-100 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1">
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('IsRecurring')?.invalid && validateFrom " >
|
||||
|
||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
|
||||
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postEvent.IsRecurring">
|
||||
|
||||
@@ -18,6 +18,7 @@ import * as moment from 'moment';
|
||||
templateUrl: './edit-event.page.html',
|
||||
styleUrls: ['./edit-event.page.scss'],
|
||||
})
|
||||
|
||||
export class EditEventPage implements OnInit {
|
||||
|
||||
stEvent: Event;
|
||||
@@ -191,14 +192,16 @@ export class EditEventPage implements OnInit {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
if(this.Form.invalid) {
|
||||
return false
|
||||
}
|
||||
|
||||
this.getDatepickerData()
|
||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
this.showLoader = true
|
||||
await this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||
if(this.initCalendarName != this.postEvent.CalendarName){
|
||||
if(this.initCalendarName != this.postEvent.CalendarName) {
|
||||
let body = {
|
||||
"EventId": this.postEvent.EventId,
|
||||
"CalendarDestinationName": this.postEvent.CalendarName,
|
||||
@@ -254,7 +257,6 @@ export class EditEventPage implements OnInit {
|
||||
this.dateControlStart = new FormControl(moment(this.postEvent.StartDate));
|
||||
this.dateControlEnd = new FormControl(moment(this.postEvent.EndDate));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
saveTemporaryData() {
|
||||
|
||||
@@ -2,10 +2,9 @@ import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angu
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { DiplomaPage } from 'src/app/pages/gabinete-digital/diplomas/diploma/diploma.page';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
|
||||
@Component({
|
||||
selector: 'app-diplomas',
|
||||
@@ -33,7 +32,7 @@ constructor(
|
||||
ngOnInit() {
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.LoadList();
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -51,123 +50,93 @@ constructor(
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
this.diplomasList = new Array();
|
||||
|
||||
console.log('OOOKAY');
|
||||
this.diplomasList = [];
|
||||
console.log(this.diplomasList);
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
|
||||
|
||||
console.log(diplomas);
|
||||
switch (this.segment) {
|
||||
case 'validar':
|
||||
let diplomasValidar = diplomas.reverse().filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
let diplomasValidar = diplomas.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
console.log(diplomasValidar);
|
||||
diplomasValidar.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
diplomasValidar.forEach(async element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.totalDocs = await this.getTotalDocs(DocId);
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.originator.email,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DispatchDocID,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=>{
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DispatchDocID,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
this.diplomasList = removeDuplicate(this.diplomasList);
|
||||
this.diplomasList = this.sortArrayISODate(this.diplomasList).reverse();
|
||||
|
||||
});
|
||||
});
|
||||
this.showLoader = false;
|
||||
this.showLoader = false;
|
||||
break;
|
||||
case 'assinados':
|
||||
console.log(this.segment);
|
||||
this.diplomasList = new Array();
|
||||
let diplomasAssinados = diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
console.log(diplomasAssinados);
|
||||
diplomasAssinados.forEach(element => {
|
||||
diplomasAssinados.forEach(async element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
this.totalDocs = await this.getTotalDocs(DocId);
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DispatchDocID,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=> {
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DispatchDocID,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
this.diplomasList = removeDuplicate(this.diplomasList);
|
||||
this.diplomasList = this.sortArrayISODate(this.diplomasList).reverse();
|
||||
|
||||
});
|
||||
this.showLoader = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
async getTotalDocs(DocId:any){
|
||||
let res = await this.processes.GetDocumentDetails(DocId, '361').toPromise();
|
||||
console.log(res.DocumentsTotal);
|
||||
return res.DocumentsTotal;
|
||||
}
|
||||
sortArrayISODate(myArray: any) {
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
async refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
this.LoadList();
|
||||
|
||||
@@ -35,21 +35,17 @@ export class ExpedientesPrPage implements OnInit {
|
||||
private router: Router,
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.LoadList();
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.doRefresh();
|
||||
this.refreshing();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
this.openExpedientDetail.emit(data);
|
||||
@@ -115,6 +111,12 @@ export class ExpedientesPrPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { AnimationController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
@@ -26,19 +26,14 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private processes: ProcessesService,
|
||||
private animationController: AnimationController,
|
||||
private navParams: NavParams,
|
||||
private toastService: ToastService,
|
||||
private router: Router,) {
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
}
|
||||
});
|
||||
|
||||
this.serialnumber = this.navParams.get('serialNumber');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.serialnumber);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
@@ -26,9 +26,9 @@ export class DespachosOptionsPage implements OnInit {
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
public popoverController: PopoverController,
|
||||
private animationController: AnimationController,
|
||||
private navParams: NavParams,
|
||||
private toastService: ToastService) {
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.task = this.navParams.get('task')
|
||||
this.fulltask = this.navParams.get('fulltask')
|
||||
}
|
||||
@@ -45,7 +45,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
@@ -63,8 +63,6 @@ export class DespachosOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
console.log(this.task.SerialNumber);
|
||||
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
@@ -46,7 +46,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
}
|
||||
|
||||
close(){
|
||||
if( window.innerWidth <= 1024){
|
||||
if( window.innerWidth < 801){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
else{
|
||||
@@ -69,13 +69,22 @@ export class OptsExpedientePage implements OnInit {
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
window.history.back();
|
||||
|
||||
/* this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log('YES');
|
||||
console.log(params);
|
||||
|
||||
|
||||
switch (params["params"].caller) {
|
||||
case 'events':
|
||||
console.log('here-1');
|
||||
|
||||
this.router.navigate(['/home',params["params"].caller]);
|
||||
break;
|
||||
|
||||
case 'gabinete-digital':
|
||||
console.log('here0');
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"expedientes": true,
|
||||
@@ -83,13 +92,15 @@ export class OptsExpedientePage implements OnInit {
|
||||
}
|
||||
if( window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
console.log('here');
|
||||
|
||||
} else {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
});
|
||||
}); */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +163,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
}
|
||||
|
||||
async distartExpedientModal(body:any){
|
||||
this.close();
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { AnimationController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { DarParecerPage } from 'src/app/modals/dar-parecer/dar-parecer.page';
|
||||
@@ -30,7 +30,8 @@ export class RequestOptionsPage implements OnInit {
|
||||
private processes: ProcessesService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
@@ -61,12 +62,13 @@ export class RequestOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
close(){
|
||||
if( window.innerWidth <= 1024){
|
||||
this.popoverController.dismiss();
|
||||
if( window.innerWidth < 801){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
else{
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos']);
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
|
||||
@@ -8,12 +8,41 @@ import { EditActionPageRoutingModule } from './edit-action-routing.module';
|
||||
|
||||
import { EditActionPage } from './edit-action.page';
|
||||
|
||||
|
||||
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';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
EditActionPageRoutingModule
|
||||
EditActionPageRoutingModule,
|
||||
// Angular material
|
||||
MatDatepickerModule,
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatTimepickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
NgxMatMomentModule,
|
||||
MatSelectModule,
|
||||
MatButtonModule,
|
||||
ReactiveFormsModule,
|
||||
MatDialogModule,
|
||||
],
|
||||
exports: [EditActionPage],
|
||||
declarations: [EditActionPage]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<ion-header class="ion-no-border pt-20 px-20">
|
||||
<div class="title-content d-flex align-center justify-space-between ">
|
||||
<div class="div-title">
|
||||
<ion-label class="title"> Editar acção presidencial</ion-label>
|
||||
<ion-label class="title">123 Editar acção presidencial</ion-label>
|
||||
</div>
|
||||
<!-- <div class="actionType">
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
@@ -30,15 +30,36 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1">
|
||||
<ion-datetime
|
||||
<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">
|
||||
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>
|
||||
@@ -50,7 +71,7 @@
|
||||
</div>
|
||||
<div class="ion-input-class d-flex flex-grow-1">
|
||||
<ion-datetime
|
||||
class="flex-grow-1"
|
||||
class="flex-grow-1 d-block d-md-none"
|
||||
[(ngModel)]="folder.DateEnd"
|
||||
placeholder="Fim"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
@@ -59,6 +80,23 @@
|
||||
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>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
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';
|
||||
@@ -10,6 +12,23 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
})
|
||||
export class EditActionPage implements OnInit {
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
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;
|
||||
@Input() folderId: string;
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
@@ -26,17 +45,46 @@ export class EditActionPage implements OnInit {
|
||||
this.getPublicationDetail();
|
||||
}
|
||||
|
||||
close(){
|
||||
close() {
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
|
||||
getPublicationDetail(){
|
||||
this.publicationsService.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
this.folder = res;
|
||||
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)));
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async save(){
|
||||
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,
|
||||
@@ -55,7 +103,5 @@ export class EditActionPage implements OnInit {
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Não foi possivel atualizar a acção presidencial')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,12 +8,40 @@ import { NewActionPageRoutingModule } from './new-action-routing.module';
|
||||
|
||||
import { NewActionPage } from './new-action.page';
|
||||
|
||||
|
||||
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';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
NewActionPageRoutingModule
|
||||
NewActionPageRoutingModule,
|
||||
// Angular material
|
||||
MatDatepickerModule,
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatTimepickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
NgxMatMomentModule,
|
||||
MatSelectModule,
|
||||
MatButtonModule,
|
||||
ReactiveFormsModule,
|
||||
MatDialogModule,
|
||||
],
|
||||
exports: [NewActionPage],
|
||||
declarations: [NewActionPage]
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<ion-content>
|
||||
<div class="content-container">
|
||||
|
||||
<div class="ion-item-container">
|
||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||
</div>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
</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"
|
||||
@@ -39,6 +40,25 @@
|
||||
min="2018"
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
|
||||
|
||||
<mat-form-field class="width-100 date-hour-picker d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date*"
|
||||
[formControl]="dateControlStart"
|
||||
[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>
|
||||
@@ -50,7 +70,7 @@
|
||||
</div>
|
||||
<div class="ion-input-class d-flex flex-grow-1">
|
||||
<ion-datetime
|
||||
class="flex-grow-1"
|
||||
class="flex-grow-1 d-md-none"
|
||||
[(ngModel)]="folder.DateEnd"
|
||||
placeholder="Fim"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
@@ -59,6 +79,22 @@
|
||||
min="2018"
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field class="width-100 date-hour-picker 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">
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { AnimationController, ModalController } 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';
|
||||
@@ -16,15 +18,47 @@ export class NewActionPage implements OnInit {
|
||||
folder: PublicationFolder;
|
||||
segment:string;
|
||||
|
||||
|
||||
|
||||
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 endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
|
||||
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private publication: PublicationsService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService
|
||||
) {
|
||||
this.folder = new PublicationFolder();
|
||||
|
||||
this.dateControlStart = new FormControl(moment(new Date()));
|
||||
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||
|
||||
}
|
||||
|
||||
get dateStart () {
|
||||
return this.dateControlStart.value
|
||||
}
|
||||
|
||||
get dateEnd () {
|
||||
return this.dateControlEnd.value
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -35,7 +69,39 @@ export class NewActionPage implements OnInit {
|
||||
console.log(ev.detail.value);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
this.folder = {
|
||||
ProcessId: null,
|
||||
Description: this.folder.Description,
|
||||
|
||||
@@ -12,15 +12,13 @@
|
||||
<ion-content>
|
||||
<div class="content-container">
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container">
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input [(ngModel)]="pub.Title" name="title" placeholder="Título" ></ion-input>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="container-div pb-20">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<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">
|
||||
|
||||
@@ -14,6 +14,7 @@ import { PhotoService } from 'src/app/services/photo.service';
|
||||
//Cordova
|
||||
import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-publication',
|
||||
@@ -30,6 +31,8 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
Defaultimage:any = '';
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
photo: SafeResourceUrl;
|
||||
|
||||
@@ -134,7 +137,30 @@ export class NewPublicationPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.pub.Title, [
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
])
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
async save(){
|
||||
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
if(this.publicationType == '3'){
|
||||
|
||||
if(this.capturedImage != '') {
|
||||
|
||||
+6
-2
@@ -287,9 +287,13 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
|
||||
.btn-refresh{
|
||||
display: none;
|
||||
}
|
||||
.p-item-title{
|
||||
width: 100% !important;
|
||||
}
|
||||
.attach-title-item{
|
||||
width: 200px !important;
|
||||
border: 1px solid red;
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user