mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
git pull made
This commit is contained in:
+1
-1
@@ -211,4 +211,4 @@
|
||||
"styleext": "scss"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = 94BRNM2LSS;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
@@ -498,7 +498,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
MARKETING_VERSION = 1.2;
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -516,7 +516,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = 94BRNM2LSS;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
@@ -525,7 +525,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
MARKETING_VERSION = 1.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.gpr.gabinetedigital.teste;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
|
||||
|
||||
+11
-2
@@ -2,8 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key></key>
|
||||
<string></string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
@@ -39,6 +37,17 @@
|
||||
<string></string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSAllowsArbitraryLoadsForMedia</key>
|
||||
<true/>
|
||||
<key>NSAllowsArbitraryLoadsInWebContent</key>
|
||||
<true/>
|
||||
<key>NSAllowsLocalNetworking</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>This app requires access to the camera.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
|
||||
@@ -31,6 +31,7 @@ def capacitor_pods
|
||||
pod 'CapacitorVoiceRecorder', :path => '../../node_modules/capacitor-voice-recorder'
|
||||
pod 'SendIntent', :path => '../../node_modules/send-intent'
|
||||
pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
|
||||
pod 'CordovaPluginsStatic', :path => '../capacitor-cordova-ios-plugins'
|
||||
pod 'CordovaPluginsResources', :path => '../capacitor-cordova-ios-plugins'
|
||||
end
|
||||
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
<dict>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>com.gpr.gabinetedigital.teste</string>
|
||||
@@ -41,8 +37,6 @@
|
||||
<integer>1</integer>
|
||||
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
|
||||
<integer>1</integer>
|
||||
<key>NSExtensionActivationUsesStrictMatching</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
Generated
+31
-23
@@ -29,6 +29,7 @@
|
||||
"@angular/router": "~12.1.2",
|
||||
"@awesome-cordova-plugins/core": "^5.40.0",
|
||||
"@awesome-cordova-plugins/document-viewer": "^5.41.0",
|
||||
"@awesome-cordova-plugins/ffmpeg": "^6.6.0",
|
||||
"@awesome-cordova-plugins/file": "^5.41.0",
|
||||
"@awesome-cordova-plugins/file-opener": "^5.41.0",
|
||||
"@awesome-cordova-plugins/media-capture": "^6.4.0",
|
||||
@@ -116,6 +117,7 @@
|
||||
"cordova": "^11.0.0",
|
||||
"cordova-plugin-crop": "^0.4.0",
|
||||
"cordova-plugin-document-viewer": "^1.0.0",
|
||||
"cordova-plugin-ffmpeg": "github:MaximBelov/cordova-plugin-ffmpeg",
|
||||
"cordova-plugin-file": "^6.0.2",
|
||||
"cordova-plugin-file-opener2": "^3.0.5",
|
||||
"cordova-plugin-file-transfer": "github:apache/cordova-plugin-file-transfer",
|
||||
@@ -206,7 +208,6 @@
|
||||
"cordova-plugin-androidx-adapter": "^1.1.3",
|
||||
"cordova-plugin-device": "^2.0.2",
|
||||
"cordova-plugin-dialogs": "^2.0.2",
|
||||
"cordova-plugin-fingerprint-aio": "^4.0.2",
|
||||
"cordova-plugin-globalization": "^1.11.0",
|
||||
"cordova-plugin-inappbrowser": "^4.0.0",
|
||||
"cordova-plugin-media": "^5.0.4",
|
||||
@@ -1869,6 +1870,18 @@
|
||||
"rxjs": "^5.5.0 || ^6.5.0 || ^7.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@awesome-cordova-plugins/ffmpeg": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@awesome-cordova-plugins/ffmpeg/-/ffmpeg-6.6.0.tgz",
|
||||
"integrity": "sha512-Js27Q1+ehahZddmsrpewq6Luo7yunNQwSWDlKZEb/HXxzBe/mXXJQI0W1BgL2IZkG/PGsoR1Vqk65WhV/+1ZSA==",
|
||||
"dependencies": {
|
||||
"@types/cordova": "latest"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@awesome-cordova-plugins/core": "^6.0.1",
|
||||
"rxjs": "^5.5.0 || ^6.5.0 || ^7.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@awesome-cordova-plugins/file": {
|
||||
"version": "5.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@awesome-cordova-plugins/file/-/file-5.41.0.tgz",
|
||||
@@ -12703,6 +12716,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/cordova-plugin-ffmpeg": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "git+ssh://git@github.com/MaximBelov/cordova-plugin-ffmpeg.git#535a64e437f81b34bacf090da7fc97e6754189c7",
|
||||
"license": "Apache-2"
|
||||
},
|
||||
"node_modules/cordova-plugin-file": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-6.0.2.tgz",
|
||||
@@ -12745,22 +12763,6 @@
|
||||
"integrity": "sha512-DwKuH5tXhZJImU/rHDzQhG3bY2ihAUw5QqdNllso96MZ9TQTAbFvKPLppuJwx21XxYS2g3uB9R17AXEEme+sKA==",
|
||||
"deprecated": "No longer maintained"
|
||||
},
|
||||
"node_modules/cordova-plugin-fingerprint-aio": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-fingerprint-aio/-/cordova-plugin-fingerprint-aio-4.0.2.tgz",
|
||||
"integrity": "sha512-Mmm/Ee85s4JH7qL3yikQ2J2I2vY2XbNi1fttoEK2kI++YHr/WeqPHWGREFL7bmFYjZTph/JovhfWHPGV924WjQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"cordovaDependencies": {
|
||||
">=3.0.0": {
|
||||
"cordova-android": ">=8.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/NiklasMerz"
|
||||
}
|
||||
},
|
||||
"node_modules/cordova-plugin-globalization": {
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-globalization/-/cordova-plugin-globalization-1.11.0.tgz",
|
||||
@@ -45037,6 +45039,14 @@
|
||||
"@types/cordova": "latest"
|
||||
}
|
||||
},
|
||||
"@awesome-cordova-plugins/ffmpeg": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@awesome-cordova-plugins/ffmpeg/-/ffmpeg-6.6.0.tgz",
|
||||
"integrity": "sha512-Js27Q1+ehahZddmsrpewq6Luo7yunNQwSWDlKZEb/HXxzBe/mXXJQI0W1BgL2IZkG/PGsoR1Vqk65WhV/+1ZSA==",
|
||||
"requires": {
|
||||
"@types/cordova": "latest"
|
||||
}
|
||||
},
|
||||
"@awesome-cordova-plugins/file": {
|
||||
"version": "5.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@awesome-cordova-plugins/file/-/file-5.41.0.tgz",
|
||||
@@ -53472,6 +53482,10 @@
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-document-viewer/-/cordova-plugin-document-viewer-1.0.0.tgz",
|
||||
"integrity": "sha512-LQZiWVU543rLJ0wYoawSdMrAfoxBLWCx8a2CuQjFeav4U9CN16QAh1VHetHaHicp5ZEwTC7Zq/0TNbak6A7bVw=="
|
||||
},
|
||||
"cordova-plugin-ffmpeg": {
|
||||
"version": "git+ssh://git@github.com/MaximBelov/cordova-plugin-ffmpeg.git#535a64e437f81b34bacf090da7fc97e6754189c7",
|
||||
"from": "cordova-plugin-ffmpeg@https://github.com/MaximBelov/cordova-plugin-ffmpeg.git"
|
||||
},
|
||||
"cordova-plugin-file": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-6.0.2.tgz",
|
||||
@@ -53492,12 +53506,6 @@
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-filepath/-/cordova-plugin-filepath-1.6.0.tgz",
|
||||
"integrity": "sha512-DwKuH5tXhZJImU/rHDzQhG3bY2ihAUw5QqdNllso96MZ9TQTAbFvKPLppuJwx21XxYS2g3uB9R17AXEEme+sKA=="
|
||||
},
|
||||
"cordova-plugin-fingerprint-aio": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-fingerprint-aio/-/cordova-plugin-fingerprint-aio-4.0.2.tgz",
|
||||
"integrity": "sha512-Mmm/Ee85s4JH7qL3yikQ2J2I2vY2XbNi1fttoEK2kI++YHr/WeqPHWGREFL7bmFYjZTph/JovhfWHPGV924WjQ==",
|
||||
"dev": true
|
||||
},
|
||||
"cordova-plugin-globalization": {
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-globalization/-/cordova-plugin-globalization-1.11.0.tgz",
|
||||
|
||||
+2
-1
@@ -43,6 +43,7 @@
|
||||
"@angular/router": "~12.1.2",
|
||||
"@awesome-cordova-plugins/core": "^5.40.0",
|
||||
"@awesome-cordova-plugins/document-viewer": "^5.41.0",
|
||||
"@awesome-cordova-plugins/ffmpeg": "^6.6.0",
|
||||
"@awesome-cordova-plugins/file": "^5.41.0",
|
||||
"@awesome-cordova-plugins/file-opener": "^5.41.0",
|
||||
"@awesome-cordova-plugins/media-capture": "^6.4.0",
|
||||
@@ -130,6 +131,7 @@
|
||||
"cordova": "^11.0.0",
|
||||
"cordova-plugin-crop": "^0.4.0",
|
||||
"cordova-plugin-document-viewer": "^1.0.0",
|
||||
"cordova-plugin-ffmpeg": "github:MaximBelov/cordova-plugin-ffmpeg",
|
||||
"cordova-plugin-file": "^6.0.2",
|
||||
"cordova-plugin-file-opener2": "^3.0.5",
|
||||
"cordova-plugin-file-transfer": "github:apache/cordova-plugin-file-transfer",
|
||||
@@ -220,7 +222,6 @@
|
||||
"cordova-plugin-androidx-adapter": "^1.1.3",
|
||||
"cordova-plugin-device": "^2.0.2",
|
||||
"cordova-plugin-dialogs": "^2.0.2",
|
||||
"cordova-plugin-fingerprint-aio": "^4.0.2",
|
||||
"cordova-plugin-globalization": "^1.11.0",
|
||||
"cordova-plugin-inappbrowser": "^4.0.0",
|
||||
"cordova-plugin-media": "^5.0.4",
|
||||
|
||||
@@ -301,30 +301,6 @@ const routes = [
|
||||
{
|
||||
path: 'not-found',
|
||||
loadChildren: () => import('./pages/not-found/not-found.module').then( m => m.NotFoundPageModule)
|
||||
},
|
||||
{
|
||||
path: 'dk-deplomas-options',
|
||||
loadChildren: () => import('./shared/popover/desktop/dk-deplomas-options/dk-deplomas-options.module').then( m => m.DkDeplomasOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'dk-despachos-options',
|
||||
loadChildren: () => import('./shared/popover/desktop/dk-despachos-options/dk-despachos-options.module').then( m => m.DkDespachosOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'dk-despachos-pr-options',
|
||||
loadChildren: () => import('./shared/popover/desktop/dk-despachos-pr-options/dk-despachos-pr-options.module').then( m => m.DkDespachosPrOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'dk-diplomas-gerar-options',
|
||||
loadChildren: () => import('./shared/popover/desktop/dk-diplomas-gerar-options/dk-diplomas-gerar-options.module').then( m => m.DkDiplomasGerarOptionsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'dk-opts-expediente',
|
||||
loadChildren: () => import('./shared/popover/desktop/dk-opts-expediente/dk-opts-expediente.module').then( m => m.DKOptsExpedientePageModule)
|
||||
},
|
||||
{
|
||||
path: 'dk-request-options',
|
||||
loadChildren: () => import('./shared/popover/desktop/dk-request-options/dk-request-options.module').then( m => m.DKRequestOptionsPageModule)
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -28,6 +28,7 @@ import {MAT_DATE_LOCALE} from '@angular/material/core';
|
||||
import { Network } from '@ionic-native/network/ngx';
|
||||
import { MultipleDocumentsPicker } from '@awesome-cordova-plugins/multiple-document-picker/ngx';
|
||||
import { DocumentViewer } from '@awesome-cordova-plugins/document-viewer/ngx';
|
||||
import { FFMpeg } from '@awesome-cordova-plugins/ffmpeg/ngx';
|
||||
|
||||
|
||||
|
||||
@@ -213,6 +214,7 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
|
||||
NgxExtendedPdfViewerModule,
|
||||
FileOpener,
|
||||
DocumentViewer,
|
||||
FFMpeg,
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: LoggingInterceptorService, multi: true },
|
||||
tokenInterceptor
|
||||
|
||||
|
||||
@@ -104,7 +104,8 @@ export class HomePage implements OnInit {
|
||||
public ActiveTabService: ActiveTabService,
|
||||
private RoleIdService: RoleIdService,
|
||||
private modalController: ModalController,
|
||||
private zone: NgZone
|
||||
private zone: NgZone,
|
||||
public alertController: AlertController,
|
||||
|
||||
// private ChunkService: ChunkService,
|
||||
// private StreamService: StreamService
|
||||
@@ -165,7 +166,11 @@ export class HomePage implements OnInit {
|
||||
}
|
||||
if (result.url) {
|
||||
window["sharedContent"] = result;
|
||||
this.zone.run(() => this.router.navigateByUrl("/home/publications"));
|
||||
this.zone.run(() => this.router.navigateByUrl("/home/publications")).then(() => {
|
||||
this.alertMessageSharerContent();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}).catch(err => console.error(err));
|
||||
|
||||
@@ -410,4 +415,20 @@ export class HomePage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
alertMessageSharerContent() {
|
||||
this.alertController .create({
|
||||
header: 'Selecione uma acção para criar a publicação',
|
||||
message: '',
|
||||
buttons: [
|
||||
{
|
||||
text: 'Ok',
|
||||
handler: () => {
|
||||
}
|
||||
}
|
||||
]
|
||||
}).then(res => {
|
||||
res.present();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -112,6 +112,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div>
|
||||
<ion-item>
|
||||
<ion-label>Todo dia</ion-label>
|
||||
<ion-checkbox [(ngModel)]="recursoAtivado" (ionChange)="onCheckboxChange($event)"></ion-checkbox>
|
||||
</ion-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex" >
|
||||
@@ -141,7 +151,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div *ngIf="!allDayCheck" class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
|
||||
@@ -222,3 +222,8 @@ ion-content{
|
||||
.icon-time{
|
||||
color: #797979b0;
|
||||
}
|
||||
|
||||
.checkbox{
|
||||
width: auto;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ export class NewEventPage implements OnInit {
|
||||
environment = environment
|
||||
eventPersons: EventPerson[];
|
||||
contacts: EventPerson[];
|
||||
allDayCheck: boolean = false;
|
||||
|
||||
|
||||
constructor(
|
||||
@@ -877,4 +878,29 @@ export class NewEventPage implements OnInit {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
onCheckboxChange(event: any) {
|
||||
if (this.allDayCheck) {
|
||||
this.allDayCheck = !this.allDayCheck
|
||||
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||
|
||||
console.log('Recurso desativado');
|
||||
} else {
|
||||
this.allDayCheck = !this.allDayCheck
|
||||
this.postEvent.IsAllDayEvent = this.allDayCheck;
|
||||
this.postEvent.StartDate = this.setAlldayTime(this.CalendarDate)
|
||||
console.log('Recurso ativado!!');
|
||||
}
|
||||
}
|
||||
|
||||
setAlldayTime(timeToReturn) {
|
||||
let date: any = new Date(timeToReturn) || new Date();
|
||||
let newdate = new Date();
|
||||
date.setHours(0)
|
||||
date.setMinutes(0)
|
||||
date.setSeconds(0);
|
||||
|
||||
|
||||
return date
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { DkDespachosPrOptionsPage } from 'src/app/shared/popover/desktop/dk-despachos-pr-options/dk-despachos-pr-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@@ -9,7 +9,6 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { DkDespachosOptionsPage } from 'src/app/shared/popover/desktop/dk-despachos-options/dk-despachos-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||
import { fullTask } from 'src/app/models/dailyworktask.model';
|
||||
@@ -94,6 +93,8 @@ export class DespachoPage implements OnInit {
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
}
|
||||
|
||||
this.modalController.dismiss();
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
-1
@@ -4,7 +4,6 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { momentG } from 'src/plugin/momentG';
|
||||
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { DkDiplomasGerarOptionsPage } from 'src/app/shared/popover/desktop/dk-diplomas-gerar-options/dk-diplomas-gerar-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@@ -12,7 +12,6 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { DkDiplomasGerarOptionsPage } from 'src/app/shared/popover/desktop/dk-diplomas-gerar-options/dk-diplomas-gerar-options.page';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { DiplomasGerarOptionsPage } from 'src/app/shared/popover/diplomas-gerar-options/diplomas-gerar-options.page';
|
||||
|
||||
@@ -7,7 +7,6 @@ import { momentG } from 'src/plugin/momentG';
|
||||
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { DkDeplomasOptionsPage } from 'src/app/shared/popover/desktop/dk-deplomas-options/dk-deplomas-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,6 @@ import { BookMeetingModalPage } from '../book-meeting-modal/book-meeting-modal.p
|
||||
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
|
||||
import { momentG } from 'src/plugin/momentG'
|
||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { DKOptsExpedientePage } from 'src/app/shared/popover/desktop/dk-opts-expediente/dk-opts-expediente.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchList } from 'src/app/models/search-document';
|
||||
@@ -610,6 +609,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
return await popover.present().then(() => {
|
||||
this.TaskService.loadExpedientes()
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
@@ -10,7 +10,6 @@ import { CreateProcessPage } from 'src/app/modals/create-process/create-process.
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { DarParecerPage } from 'src/app/modals/dar-parecer/dar-parecer.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { DKRequestOptionsPage } from 'src/app/shared/popover/desktop/dk-request-options/dk-request-options.page';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ForwardPage } from 'src/app/modals/forward/forward.page';
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="subject" [ngClass]="{'add-ellipsis': i != selectedIndex}">{{ attachment.Assunto || "Sem assunto" }}</div>
|
||||
<div class="subject add-ellipsis">{{ attachment.Assunto || "Sem assunto" }}</div>
|
||||
<div class="user" >
|
||||
{{ attachment.Sender }}
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
margin: 0px;
|
||||
}
|
||||
.subject {
|
||||
max-width: 230px;
|
||||
max-width: 150px;
|
||||
}
|
||||
|
||||
ion-icon {
|
||||
@@ -47,7 +47,7 @@ iframe {
|
||||
}
|
||||
|
||||
.subject {
|
||||
max-width: 300px !important;
|
||||
max-width: 200px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ import { Media } from '@ionic-native/media/ngx';
|
||||
import { checkFileTypeService } from 'src/app/services/checkFileType.service';
|
||||
import { FileValidatorService } from "src/app/services/file/file-validator.service"
|
||||
import { App } from '@capacitor/app';
|
||||
import { Router } from '@angular/router';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { VideoconvertService } from 'src/app/services/videoconvert.service'
|
||||
|
||||
|
||||
const config = {
|
||||
@@ -139,6 +140,7 @@ export class NewPublicationPage implements OnInit {
|
||||
public checkFileType: checkFileTypeService,
|
||||
private FileValidatorService: FileValidatorService,
|
||||
private router: Router,
|
||||
private videoconvertService: VideoconvertService
|
||||
) {
|
||||
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
@@ -255,46 +257,9 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
try {
|
||||
if (this.platform.is('ios')) {
|
||||
const result = await Filesystem.writeFile({
|
||||
path: 'video.mov',
|
||||
data: element.fullPath,
|
||||
directory: FilesystemDirectory.Data,
|
||||
encoding: FilesystemEncoding.UTF8
|
||||
})
|
||||
console.log('Wrote file', result);
|
||||
|
||||
Filesystem.readFile({ path: result.uri })
|
||||
|
||||
.then(async (content) => {
|
||||
console.log(content.data)
|
||||
this.filecontent = true;
|
||||
let fileObject = {
|
||||
FileBase64: 'data:video/mp4;base64,' + content.data,
|
||||
FileExtension: 'mp4',
|
||||
OriginalFileName: 'video'
|
||||
}
|
||||
this.seletedContent.push(fileObject)
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
this.recordevideoIos(element.fullPath)
|
||||
} else {
|
||||
const savedFile = await Filesystem.copy({
|
||||
from: Capacitor.convertFileSrc(element.fullPath), // directory prop removed, Capacitor parses filename for us
|
||||
to: "video.mp4",
|
||||
toDirectory: FilesystemDirectory.Data
|
||||
});
|
||||
console.log(savedFile.uri)
|
||||
Filesystem.readFile({ path: savedFile.uri })
|
||||
|
||||
.then(async (content) => {
|
||||
this.filecontent = true;
|
||||
let fileObject = {
|
||||
FileBase64: 'data:video/mp4;base64,' + content.data,
|
||||
FileExtension: 'mp4',
|
||||
OriginalFileName: 'video'
|
||||
}
|
||||
this.seletedContent.push(fileObject)
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
@@ -583,7 +548,17 @@ export class NewPublicationPage implements OnInit {
|
||||
await this.publications.CreatePublication(this.folderId, this.publication).toPromise();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Criar publicação')
|
||||
if (window["sharedContent"]) {
|
||||
this.router.navigate(['/home/publications', this.folderId]);
|
||||
|
||||
window["sharedContent"] = null
|
||||
window["openFolder"] = true
|
||||
|
||||
if(window.innerWidth <= 700) {
|
||||
this.router.navigate(['/home/publications', this.folderId]);
|
||||
} else if(window.innerWidth >= 701){
|
||||
let navigationExtras: NavigationExtras = { queryParams: { "folderId": this.folderId, } };
|
||||
this.router.navigate(['/home/publications']);
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -842,5 +817,58 @@ export class NewPublicationPage implements OnInit {
|
||||
App.exitApp()
|
||||
}
|
||||
|
||||
async recordevideoIos(fullPath) {
|
||||
try {
|
||||
const directory = await Filesystem.getUri({
|
||||
directory: Directory.Cache,
|
||||
path: '',
|
||||
});
|
||||
|
||||
this.videoconvertService.convertVideo(fullPath,directory.uri,'mp4');
|
||||
|
||||
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
|
||||
|
||||
.then(async (content) => {
|
||||
console.log(content.data)
|
||||
this.filecontent = true;
|
||||
let fileObject = {
|
||||
FileBase64: 'data:video/mp4;base64,' + content.data,
|
||||
FileExtension: 'mp4',
|
||||
OriginalFileName: 'video'
|
||||
}
|
||||
this.seletedContent.push(fileObject)
|
||||
})
|
||||
.catch((erro) => console.error('read converted video erro ', erro));
|
||||
} catch (error) {
|
||||
console.log('record video ios erro, ', error)
|
||||
}
|
||||
}
|
||||
|
||||
async recordVideoAndroid(fullPath) {
|
||||
try {
|
||||
const savedFile = await Filesystem.copy({
|
||||
from: Capacitor.convertFileSrc(fullPath),
|
||||
to: "video.mp4",
|
||||
toDirectory: FilesystemDirectory.Data
|
||||
});
|
||||
console.log(savedFile.uri)
|
||||
Filesystem.readFile({ path: savedFile.uri })
|
||||
|
||||
.then(async (content) => {
|
||||
this.filecontent = true;
|
||||
let fileObject = {
|
||||
FileBase64: 'data:video/mp4;base64,' + content.data,
|
||||
FileExtension: 'mp4',
|
||||
OriginalFileName: 'video'
|
||||
}
|
||||
this.seletedContent.push(fileObject)
|
||||
})
|
||||
.catch((error) => console.error('reade converted video erro ',error));
|
||||
|
||||
} catch (error) {
|
||||
console.log('record video android erro ', error)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router, NavigationEnd } from '@angular/router';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { NewActionPage } from './new-action/new-action.page';
|
||||
@@ -78,6 +78,7 @@ export class PublicationsPage implements OnInit {
|
||||
private StreamService:StreamService,
|
||||
private http: HttpClient,
|
||||
|
||||
|
||||
) {
|
||||
this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
@@ -87,14 +88,30 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
checkQueryParameter() {
|
||||
var urlSearchParams = new URLSearchParams(window.location.search);
|
||||
var folderId = urlSearchParams.get('folderId');
|
||||
|
||||
if (folderId !== null && window["openFolder"]) {
|
||||
window["openFolder"] = false
|
||||
this.goToPublicationsList(folderId)
|
||||
} else {
|
||||
console.log('Folder ID::', folderId);
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
const pathname = window.location.pathname
|
||||
this.getActions();
|
||||
this.checkQueryParameter()
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.getActions();
|
||||
this.checkQueryParameter()
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -82,6 +82,28 @@ export class ChatService {
|
||||
return this.http.get(environment.apiChatUrl + 'rooms.info', opts);
|
||||
}
|
||||
|
||||
|
||||
GetSubscriptionRoomUnreadM(roomId) {
|
||||
let params = new HttpParams();
|
||||
params = params.set("roomId", roomId);
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
return this.http.get(environment.apiChatUrl + 'subscriptions.getOne', opts);
|
||||
}
|
||||
|
||||
getChannelInfo(roomId: any) {
|
||||
let params = new HttpParams();
|
||||
params = params.set("roomId", roomId);
|
||||
params = params.set("unread", "true");
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
return this.http.get(environment.apiChatUrl + 'rooms.info', opts);
|
||||
}
|
||||
|
||||
customsRooms(params: any) {
|
||||
let opts = {
|
||||
headers: this.headers,
|
||||
@@ -348,12 +370,12 @@ export class ChatService {
|
||||
|
||||
setheader() {
|
||||
try {
|
||||
|
||||
|
||||
if (this.p.userPermission(this.p.permissionList.Chat.access) && SessionStore.user.ChatData) {
|
||||
this.headers = new HttpHeaders();;
|
||||
|
||||
|
||||
if (this.p.userPermission(this.p.permissionList.Chat.access)) {
|
||||
//
|
||||
//
|
||||
this.headers = this.headers.set('X-User-Id', SessionStore.user.ChatData.data.userId);
|
||||
this.headers = this.headers.set('X-Auth-Token', SessionStore.user.ChatData.data.authToken);
|
||||
this.options = {
|
||||
@@ -375,10 +397,10 @@ export class ChatService {
|
||||
let options = {
|
||||
headers: this.headers
|
||||
};
|
||||
|
||||
|
||||
try {
|
||||
let res = await this.http.get(environment.apiURL + 'UserAuthentication/RegenereChatToken', options).toPromise();
|
||||
|
||||
|
||||
let data = {
|
||||
status: res['status'],
|
||||
data: {
|
||||
@@ -412,7 +434,7 @@ export class ChatService {
|
||||
await this.refreshtoken();
|
||||
}, 60000)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -436,13 +458,13 @@ export class ChatService {
|
||||
if(this.timerEventTriggerDateLastUpdate == null) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
if(diffTime >= 5000) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
|
||||
}
|
||||
|
||||
functionTimer = null;
|
||||
@@ -460,7 +482,7 @@ export class ChatService {
|
||||
} else {
|
||||
this.resetTimer()
|
||||
}
|
||||
|
||||
|
||||
}, 60000 * 15); // time is in milliseconds
|
||||
|
||||
}
|
||||
|
||||
@@ -370,7 +370,9 @@ export class ChatSystemService {
|
||||
|
||||
this.RochetChatConnectorService.streamNotifyLogged().then((subscription => { }))
|
||||
|
||||
this.RochetChatConnectorService.subStreamMessageUser().then((subscription => { }))
|
||||
this.RochetChatConnectorService.subStreamMessageUser().then((subscription => {
|
||||
console.log({subscription})
|
||||
}))
|
||||
} else {
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -490,6 +492,8 @@ export class ChatSystemService {
|
||||
room.sortRoomList = this.sortRoomList
|
||||
room.chatServiceDeleteRoom = this.deleteRoom
|
||||
room.isGroup = !this.isIndividual(roomData)
|
||||
room.info()
|
||||
|
||||
|
||||
// create individual room
|
||||
if (this.isIndividual(roomData)) {
|
||||
|
||||
@@ -461,6 +461,11 @@ export class RochetChatConnectorService {
|
||||
resolve(message)
|
||||
return true
|
||||
}
|
||||
|
||||
if (message.id == requestId || message?.subs?.[0] == requestId) { // same request send
|
||||
resolve(message)
|
||||
return true
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
@@ -588,6 +593,40 @@ export class RochetChatConnectorService {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
loadHistoryUnread(roomId, limit: number = 50) {
|
||||
|
||||
const requestId = uuidv4()
|
||||
|
||||
const message = {
|
||||
msg: "method",
|
||||
method: "loadHistory",
|
||||
id: requestId,
|
||||
params: [
|
||||
roomId,
|
||||
null,
|
||||
limit,
|
||||
{
|
||||
"$date": 1480377601
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
this.ws.send({ message, requestId: 'loadHistory' })
|
||||
|
||||
return new Promise<chatHistory>((resolve, reject) => {
|
||||
this.ws.registerCallback({
|
||||
type: 'Onmessage', funx: (message) => {
|
||||
//
|
||||
if (message.id == requestId) { // same request send
|
||||
resolve(message)
|
||||
return true
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
setStatus(status: 'online' | 'busy' | 'away' | 'offline') {
|
||||
|
||||
const requestId = uuidv4()
|
||||
|
||||
@@ -379,6 +379,17 @@ export class RoomService {
|
||||
}, 5)
|
||||
})
|
||||
|
||||
|
||||
async info() {
|
||||
|
||||
// set unread messages
|
||||
const response: any = await this.chatService.GetSubscriptionRoomUnreadM(this.id).toPromise()
|
||||
|
||||
if(response?.subscription?.unread >= 1) {
|
||||
this.messageUnread = true
|
||||
}
|
||||
}
|
||||
|
||||
getUsersByStatus(status: 'offline' | 'online') {
|
||||
|
||||
return this.getAllUsers().filter((user => {
|
||||
@@ -958,6 +969,10 @@ export class RoomService {
|
||||
|
||||
const users = this.getUsersByStatus('online')
|
||||
|
||||
if(chatHistory.result.unreadNotLoaded >= 1) {
|
||||
this.messageUnread = true
|
||||
}
|
||||
|
||||
for (let message of chatHistory.result.messages.reverse()) {
|
||||
|
||||
message.origin = 'history'
|
||||
@@ -1231,7 +1246,7 @@ export class RoomService {
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
console.log("getGroupMembers", this.membersExcludeMe)
|
||||
// console.log("getGroupMembers", this.membersExcludeMe)
|
||||
}, 500)
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export class checkFileTypeService {
|
||||
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp','tiff','tif',
|
||||
'image/jpg', 'image/jpeg', 'image/png', 'image/gif', 'image/bmp','image/tiff','image/tif', 'image/*']; // Add more if needed
|
||||
const videoExtensions = ['mp4', 'webm', 'mpg', 'mpeg', 'ogg',
|
||||
'video/mp4', 'video/webm', 'video/mpg', 'video/mpeg', 'video/ogg','video/quicktime','video/mov', 'video/*']; // Add more if needed
|
||||
'video/mp4', 'video/webm', 'video/mpg', 'video/mpeg', 'video/ogg','video/quicktime', 'video/*']; // Add more if needed
|
||||
|
||||
// Check if it's an image
|
||||
if (imageExtensions.includes(lowerCaseType)) {
|
||||
|
||||
@@ -2,14 +2,17 @@ import { Filesystem } from '@capacitor/filesystem';
|
||||
import { SendIntent } from "send-intent";
|
||||
import { Router } from '@angular/router';
|
||||
import { CallbackScheduler } from './callbackScheduler';
|
||||
import { AlertController, Platform } from '@ionic/angular';
|
||||
|
||||
export class SendIntentService {
|
||||
|
||||
Router!: Router
|
||||
|
||||
callbackScheduler = new CallbackScheduler()
|
||||
alertController = new AlertController()
|
||||
|
||||
constructor() {
|
||||
constructor(
|
||||
) {
|
||||
|
||||
SendIntent.checkSendIntentReceived().then((result: any) => {
|
||||
// logger
|
||||
@@ -36,11 +39,32 @@ export class SendIntentService {
|
||||
|
||||
|
||||
private onReceive = this.callbackScheduler.function<any>((result)=> {
|
||||
this.Router.navigateByUrl("/home/publications");
|
||||
this.Router.navigateByUrl("/home/publications").then(() => {
|
||||
if(Platform.prototype.is('ios')) {
|
||||
this.alertIos();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
window["sharedContent"] = result;
|
||||
})
|
||||
|
||||
private alertIos() {
|
||||
this.alertController .create({
|
||||
header: 'Selecione uma acção para criar a publicação',
|
||||
message: '',
|
||||
buttons: [
|
||||
{
|
||||
text: 'Ok',
|
||||
handler: () => {
|
||||
}
|
||||
}
|
||||
]
|
||||
}).then(res => {
|
||||
res.present();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export const sendIntent = new SendIntentService()
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { VideoconvertService } from './videoconvert.service';
|
||||
|
||||
describe('VideoconvertService', () => {
|
||||
let service: VideoconvertService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(VideoconvertService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FFMpeg } from '@awesome-cordova-plugins/ffmpeg/ngx';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class VideoconvertService {
|
||||
|
||||
constructor(
|
||||
private ffmpeg: FFMpeg
|
||||
) { }
|
||||
|
||||
async convertVideo(inputPath, outputPath, formart) {
|
||||
const ffmpegCommand = `-i "${inputPath}" -c:v copy -c:a aac -strict experimental "${outputPath}output.${formart}"`;
|
||||
|
||||
const result = await this.ffmpeg.exec(ffmpegCommand)
|
||||
|
||||
console.log('Convert returns ', `${outputPath}output.${formart}`);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<ion-content>
|
||||
<!-- Edit event for Inicio -->
|
||||
<div class="main-content height-100 d-flex">
|
||||
|
||||
|
||||
<div class="content d-flex flex-column width-md-100 height-100">
|
||||
|
||||
<div class="main-header pt-30 px-20 background-white pb-15">
|
||||
@@ -24,7 +24,7 @@
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('Subject').errors?.required">
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="Form.get('Subject').errors?.minlength">
|
||||
O campo deve ter pelo menos 4 caracteres.
|
||||
@@ -47,7 +47,7 @@
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('Location').errors?.required">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -304,7 +304,11 @@
|
||||
<div class="ion-input-class-no-height d-flex cursor-pointer" (click)="addParticipantsCC()">
|
||||
<div class="list-people flex-grow-1">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-list
|
||||
style="
|
||||
|
||||
display: grid;
|
||||
">
|
||||
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Adicionar Intervenientes</ion-label>
|
||||
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.title-content::after, .header-md::after{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.content {
|
||||
margin: 0;
|
||||
float: left;
|
||||
@@ -12,10 +12,10 @@
|
||||
.main-header{
|
||||
font-family: Roboto;
|
||||
background-color: #fff;
|
||||
|
||||
|
||||
overflow:hidden;
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
|
||||
.title-content{
|
||||
margin: 0px auto;
|
||||
padding: 0 !important;
|
||||
@@ -25,11 +25,11 @@
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.title{
|
||||
font-size: rem(25);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.ion-item-container{
|
||||
margin: rem(15) auto;
|
||||
@@ -76,7 +76,7 @@
|
||||
}
|
||||
.list-people{
|
||||
float: left;
|
||||
|
||||
|
||||
}
|
||||
.add-people{
|
||||
width: rem(45);
|
||||
@@ -137,7 +137,7 @@
|
||||
--color:#ffffff;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
|
||||
.text-input{
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
@@ -145,7 +145,7 @@
|
||||
padding: 0 !important;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* Error Messages */
|
||||
.error{
|
||||
color:red;
|
||||
@@ -156,17 +156,17 @@
|
||||
.span-color{
|
||||
color:red;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.buttons{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.app-name{
|
||||
background: var(--title-text-color);
|
||||
border-radius: 18px;
|
||||
@@ -183,21 +183,21 @@
|
||||
-ms-border-radius: 18px;
|
||||
-o-border-radius: 18px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.close-button {
|
||||
display: none;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.list:hover {
|
||||
|
||||
|
||||
.app-name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.close-button {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
<!-- Edit event for Inicio -->
|
||||
<div class="main-content height-100 d-flex">
|
||||
|
||||
<div class="content d-flex flex-column width-md-100 height-100">
|
||||
<div class="content d-flex flex-column width-100 height-100 ">
|
||||
|
||||
<div class="main-header pt-30 px-20 background-white pb-15">
|
||||
<ion-header>
|
||||
<div class="title-content">
|
||||
<div class="middle">
|
||||
<ion-label class="title">Editar evento por aprovar</ion-label> <br>
|
||||
<ion-label class="title">Editar evento por aprovar ccxcxcxc</ion-label> <br>
|
||||
<i style="margin-top: -5px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
</div>
|
||||
<ion-item-sliding class="overflow-y-auto">
|
||||
<div class="px-20">
|
||||
<ion-item-sliding class="overflow-y-auto d-flex width-100">
|
||||
<div class="px-20 d-flex flex-column width-100">
|
||||
<div class="ion-item-container width-100">
|
||||
<ion-input placeholder="Assunto*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
|
||||
</div>
|
||||
@@ -223,7 +223,7 @@
|
||||
<div (click)="addParticipants()" class="ion-input-class-no-height d-flex">
|
||||
<div class="list-people flex-grow-1">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-list style="display:grid">
|
||||
<ion-label *ngIf="taskParticipants?.length < 1" class="list-people-title">Adicionar Intervenientes*</ion-label>
|
||||
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
@@ -325,6 +325,6 @@
|
||||
<div class="buttons">
|
||||
<button class="btn-ok cursor-pointer" shape="round" (click)="save()">Gravar</button>
|
||||
<button class="btn-cancel cursor-pointer" shape="round" (click)="close()">Cancelar</button>
|
||||
|
||||
|
||||
</div>
|
||||
</ion-footer>
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
margin-bottom: 20px;
|
||||
font-family: Roboto;
|
||||
background-color: #fff;
|
||||
|
||||
min-height: 79px;
|
||||
|
||||
overflow:hidden;
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
|
||||
.title-content{
|
||||
margin: 0px auto;
|
||||
padding: 0 !important;
|
||||
@@ -77,7 +78,7 @@
|
||||
}
|
||||
.list-people{
|
||||
float: left;
|
||||
|
||||
|
||||
}
|
||||
.add-people{
|
||||
width: rem(45);
|
||||
@@ -138,7 +139,7 @@
|
||||
--color:#ffffff;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
|
||||
.text-input{
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
@@ -146,7 +147,7 @@
|
||||
padding: 0 !important;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* Error Messages */
|
||||
.error{
|
||||
color:red;
|
||||
@@ -158,14 +159,14 @@
|
||||
color:red;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.buttons{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.app-name{
|
||||
@@ -184,8 +185,8 @@
|
||||
-ms-border-radius: 18px;
|
||||
-o-border-radius: 18px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.close-button {
|
||||
display: none;
|
||||
height: 20px;
|
||||
@@ -201,4 +202,4 @@
|
||||
.close-button {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<ion-header *ngIf="task" class="ion-no-border ">
|
||||
<div class="main-header mt-30 px-20">
|
||||
<div *ngIf="dropButton" class="main-header mt-30 px-20">
|
||||
<div class="title-content width-100 d-flex justify-space-between align-center">
|
||||
<div class=" btn-dismiss font-30-rem cursor-pointer" (click)="goBack.emit()" defaultHref="#">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
|
||||
<div class=" flex-1 d-flex flex-column height-100 d-flex overflow-y-auto-desktop" >
|
||||
<div class="upper-content" >
|
||||
<div *ngIf="dropButton" class="upper-content" >
|
||||
<div class="content-details">
|
||||
<div class="mobile-header">
|
||||
<ion-label>
|
||||
@@ -44,7 +44,7 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line mx-20"></div>
|
||||
<div *ngIf="dropButton" class="line mx-20"></div>
|
||||
|
||||
<div style="
|
||||
display: flex;
|
||||
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DkDeplomasOptionsPage } from './dk-deplomas-options.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DkDeplomasOptionsPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class DkDeplomasOptionsPageRoutingModule {}
|
||||
@@ -1,20 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DkDeplomasOptionsPageRoutingModule } from './dk-deplomas-options-routing.module';
|
||||
|
||||
import { DkDeplomasOptionsPage } from './dk-deplomas-options.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DkDeplomasOptionsPageRoutingModule
|
||||
],
|
||||
declarations: [DkDeplomasOptionsPage]
|
||||
})
|
||||
export class DkDeplomasOptionsPageModule {}
|
||||
@@ -1,68 +0,0 @@
|
||||
<ion-content class="options-container">
|
||||
<div class="arrow-right" (click)="goBack('no')">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="width-100 pr-options" *ngIf="task.activityInstanceName == 'Tarefa de Despacho' && task.WorkflowName == 'Despacho do Presidente da República' ">
|
||||
<div *ngIf="task && !p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1 width-50 pr-10">
|
||||
<button class="btn-cancel desk" shape="round" > Responder ao {{ environment.PR}} </button>
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel width-100" shape="round" >Executado</button>
|
||||
<button class="btn-cancel desk" shape="round"> Reencaminhar para Área Jurídica </button>
|
||||
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel width-100" shape="round" >Gerar Diploma</button>
|
||||
<button class="btn-cancel desk" shape="round"> Outras opções </button>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel width-100" shape="round" >Efetuar Despacho</button>
|
||||
</div>
|
||||
<div class="flex-grow-1 width-50 pl-10">
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel width-100" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openTaskProcessModal('2',fulltask)" class="btn-cancel width-100" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel width-100" shape="round" >Delegar</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel width-100" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho' && task.WorkflowName != 'Despacho do Presidente da República' ">
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Reexecutar Despacho'">
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openDelegarModal(task)" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
@@ -1,38 +0,0 @@
|
||||
@import '~src/function.scss';
|
||||
|
||||
.options-container {
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
|
||||
}
|
||||
.arrow-right {
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon {
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: rem(35);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.solid {
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 100% !important;
|
||||
margin: 5px 5px 5px 5px !important;
|
||||
}
|
||||
|
||||
.pr-options {
|
||||
.btn-ok, .btn-cancel{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DkDeplomasOptionsPage } from './dk-deplomas-options.page';
|
||||
|
||||
describe('DkDeplomasOptionsPage', () => {
|
||||
let component: DkDeplomasOptionsPage;
|
||||
let fixture: ComponentFixture<DkDeplomasOptionsPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DkDeplomasOptionsPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DkDeplomasOptionsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,402 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { 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';
|
||||
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 { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { customTask, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-dk-deplomas-options',
|
||||
templateUrl: './dk-deplomas-options.page.html',
|
||||
styleUrls: ['./dk-deplomas-options.page.scss'],
|
||||
})
|
||||
export class DkDeplomasOptionsPage implements OnInit {
|
||||
|
||||
|
||||
task: customTask
|
||||
fulltask: fullTask;
|
||||
serialNumber: string;
|
||||
environment = environment
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private modalController: ModalController,
|
||||
public popoverController: PopoverController,
|
||||
private navParams: NavParams,
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public TaskService: TaskService
|
||||
) {
|
||||
|
||||
this.task = this.navParams.get('task')
|
||||
this.fulltask = this.navParams.get('fulltask')
|
||||
|
||||
|
||||
this.serialNumber = this.task.SerialNumber
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
|
||||
async openTaskProcessModal(taskAction: any, task: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: CreateProcessPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( res => {
|
||||
// this.goBack();
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
loader.remove()
|
||||
|
||||
this.goBack('back');
|
||||
},(error)=>{
|
||||
loader.remove()
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.fulltask.serialNumber,
|
||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
this.goBack('back');
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask:this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.goBack('no');
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: DelegarPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res){
|
||||
const data = res.data;
|
||||
if(data == 'close') {
|
||||
this.goBack('back');
|
||||
}
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async generateDiploma(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 99999839,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.goBack('back');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps: {
|
||||
showAttachmentBtn: true,
|
||||
actionName:actionName
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
if(res.data) {
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
if(actionName == 'Executado') {
|
||||
await this.executado(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Gerar Diploma') {
|
||||
await this.generateDiploma(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Concluido') {
|
||||
this.concluir(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Reexecução') {
|
||||
await this.reexecutar(res.data.note, docs);
|
||||
}
|
||||
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
async concluir(note: string, documents: any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList": documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Concluir Despacho')
|
||||
this.TaskService.loadDiplomas()
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.goBack('back');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
async executado(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.goBack('back');
|
||||
this.toastService._successMessage()
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
async reexecutar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reexecução",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.goBack('back');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
goBack(params) {
|
||||
this.popoverController.dismiss(params)
|
||||
}
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DkDespachosOptionsPage } from './dk-despachos-options.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DkDespachosOptionsPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class DkDespachosOptionsPageRoutingModule {}
|
||||
@@ -1,20 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DkDespachosOptionsPageRoutingModule } from './dk-despachos-options-routing.module';
|
||||
|
||||
import { DkDespachosOptionsPage } from './dk-despachos-options.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DkDespachosOptionsPageRoutingModule
|
||||
],
|
||||
declarations: [DkDespachosOptionsPage]
|
||||
})
|
||||
export class DkDespachosOptionsPageModule {}
|
||||
@@ -1,69 +0,0 @@
|
||||
<ion-content class="options-container">
|
||||
<div class="arrow-right" (click)="goBack('no')">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="width-100 pr-options" *ngIf="task.activityInstanceName == 'Tarefa de Despacho' && task.WorkflowName == 'Despacho do Presidente da República' ">
|
||||
<div *ngIf="task && !p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1 width-50 pr-10">
|
||||
<button class="btn-cancel desk" shape="round" > Responder ao {{ environment.PR}} </button>
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel width-100" shape="round" >Executado</button>
|
||||
<button class="btn-cancel desk" shape="round"> Reencaminhar para Área Jurídica </button>
|
||||
<button (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel width-100" shape="round" >Gerar Diploma</button>
|
||||
<button class="btn-cancel desk" shape="round"> Outras opções </button>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel width-100" shape="round" >Efetuar Despacho</button>
|
||||
</div>
|
||||
<div class="flex-grow-1 width-50 pl-10">
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel width-100" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openTaskProcessModal('2',fulltask)" class="btn-cancel width-100" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel width-100" shape="round" >Delegar</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel width-100" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho' && task.WorkflowName != 'Despacho do Presidente da República' ">
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Reexecutar Despacho'">
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button (click)="openDelegarModal(task)" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openTaskProcessModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openTaskProcessModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
@@ -1,40 +0,0 @@
|
||||
@import '~src/function.scss';
|
||||
|
||||
.options-container {
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
|
||||
}
|
||||
.arrow-right {
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon {
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: rem(35);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.solid {
|
||||
display: none;
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 100% !important;
|
||||
margin: 5px 5px 5px 5px !important;
|
||||
}
|
||||
|
||||
.pr-options {
|
||||
.btn-ok, .btn-cancel{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DkDespachosOptionsPage } from './dk-despachos-options.page';
|
||||
|
||||
describe('DkDespachosOptionsPage', () => {
|
||||
let component: DkDespachosOptionsPage;
|
||||
let fixture: ComponentFixture<DkDespachosOptionsPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DkDespachosOptionsPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DkDespachosOptionsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,403 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { 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';
|
||||
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 { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { customTask, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-dk-despachos-options',
|
||||
templateUrl: './dk-despachos-options.page.html',
|
||||
styleUrls: ['./dk-despachos-options.page.scss'],
|
||||
})
|
||||
export class DkDespachosOptionsPage implements OnInit {
|
||||
|
||||
task: customTask
|
||||
fulltask: fullTask;
|
||||
serialNumber: string;
|
||||
environment = environment
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private modalController: ModalController,
|
||||
public popoverController: PopoverController,
|
||||
private navParams: NavParams,
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public TaskService: TaskService
|
||||
) {
|
||||
|
||||
this.task = this.navParams.get('task')
|
||||
this.fulltask = this.navParams.get('fulltask')
|
||||
|
||||
|
||||
this.serialNumber = this.task.SerialNumber
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
|
||||
async openTaskProcessModal(taskAction: any, task: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: CreateProcessPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( res => {
|
||||
// this.goBack();
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
loader.remove()
|
||||
|
||||
this.goBack('back');
|
||||
},(error)=>{
|
||||
loader.remove()
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.fulltask.serialNumber,
|
||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
this.goBack('back');
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask:this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.goBack('no');
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: DelegarPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res){
|
||||
const data = res.data;
|
||||
if(data == 'close') {
|
||||
this.goBack('back');
|
||||
}
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async generateDiploma(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 99999839,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.goBack('back');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps: {
|
||||
showAttachmentBtn: true,
|
||||
actionName:actionName
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
if(res.data) {
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
if(actionName == 'Executado') {
|
||||
await this.executado(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Gerar Diploma') {
|
||||
await this.generateDiploma(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Concluido') {
|
||||
this.concluir(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Reexecução') {
|
||||
await this.reexecutar(res.data.note, docs);
|
||||
}
|
||||
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
async concluir(note: string, documents: any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList": documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Concluir Despacho')
|
||||
this.TaskService.loadDiplomas()
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.goBack('back');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
async executado(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.goBack('back');
|
||||
this.toastService._successMessage()
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
async reexecutar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reexecução",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.goBack('back');
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
goBack(params) {
|
||||
this.popoverController.dismiss(params)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DkDespachosPrOptionsPage } from './dk-despachos-pr-options.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DkDespachosPrOptionsPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class DkDespachosPrOptionsPageRoutingModule {}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DkDespachosPrOptionsPageRoutingModule } from './dk-despachos-pr-options-routing.module';
|
||||
|
||||
import { DkDespachosPrOptionsPage } from './dk-despachos-pr-options.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DkDespachosPrOptionsPageRoutingModule
|
||||
],
|
||||
declarations: [DkDespachosPrOptionsPage]
|
||||
})
|
||||
export class DkDespachosPrOptionsPageModule {}
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
<ion-content class="options-container">
|
||||
<div class="arrow-right" (click)="close()">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="width-100">
|
||||
<div *ngIf="task && !p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1 width-50 pr-10">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Responder ao {{ environment.PR}} </button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Reencaminhar para Área Jurídica </button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Gerar Diploma')" class="btn-cancel" shape="round" >Gerar Diploma</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Outras opções </button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
</div>
|
||||
<div class="flex-grow-1 width-50 pl-10">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<!-- <button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button> -->
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" full class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="cancle()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="cancle()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="solid"></div>
|
||||
<button (click)="cancle()" full class="btn-cancel" shape="round" >Cancelar</button> -->
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
@import '~src/function.scss';
|
||||
|
||||
:host {
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.options-container{
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
width: 100%;
|
||||
}
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: rem(35);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.solid {
|
||||
display: none;
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel{
|
||||
//width: 50% !important;
|
||||
margin-bottom: 5px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
|
||||
.desk{
|
||||
text-align: left;
|
||||
background-color: white;
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DkDespachosPrOptionsPage } from './dk-despachos-pr-options.page';
|
||||
|
||||
describe('DkDespachosPrOptionsPage', () => {
|
||||
let component: DkDespachosPrOptionsPage;
|
||||
let fixture: ComponentFixture<DkDespachosPrOptionsPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DkDespachosPrOptionsPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DkDespachosPrOptionsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
-430
@@ -1,430 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
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 { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-dk-despachos-pr-options',
|
||||
templateUrl: './dk-despachos-pr-options.page.html',
|
||||
styleUrls: ['./dk-despachos-pr-options.page.scss'],
|
||||
})
|
||||
export class DkDespachosPrOptionsPage implements OnInit {
|
||||
|
||||
|
||||
task: any;
|
||||
fulltask: any;
|
||||
serialNumber: string;
|
||||
profile: string
|
||||
environment = environment
|
||||
|
||||
constructor(private activateRoute: ActivatedRoute,
|
||||
private processes: ProcessesService,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private toastService: ToastService,
|
||||
private RouteService: RouteService,
|
||||
public p: PermissionService,
|
||||
public ThemeService: ThemeService,
|
||||
public TaskService: TaskService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.profile = "mdgpr";
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialNumber = params["serialNumber"];
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if(this.task.serialNumber) {
|
||||
this.serialNumber = this.task.serialNumber
|
||||
} else if(this.task.SerialNumber) {
|
||||
this.serialNumber = this.task.SerialNumber
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close () {
|
||||
this.goBack()
|
||||
}
|
||||
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
// this.modalController.dismiss();
|
||||
this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: CreateProcessPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( (res)=> {
|
||||
|
||||
if(res['data']=='openDiscart') {
|
||||
|
||||
|
||||
this.distartExpedientModal();
|
||||
|
||||
} else {
|
||||
this.goBack()
|
||||
}
|
||||
|
||||
this.modalController.dismiss('close')
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
|
||||
|
||||
this.httpErroHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.modalController.dismiss('close')
|
||||
loader.remove()
|
||||
},(error)=>{
|
||||
loader.remove()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
this.modalController.dismiss();
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.fulltask.serialNumber,
|
||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
this.close();
|
||||
/*
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
this.modalController.dismiss('close')
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask:this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(
|
||||
()=> {},
|
||||
(error) => {
|
||||
console.log(error)
|
||||
}
|
||||
)
|
||||
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: DelegarPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res) {
|
||||
const data = res.data;
|
||||
if(data == 'close') {
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async generateDiploma(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reencaminhar",
|
||||
"ActionTypeId": 99999839,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps: {
|
||||
showAttachmentBtn: true,
|
||||
actionName:actionName
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
if(res.data){
|
||||
|
||||
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
if(actionName == 'Executado') {
|
||||
await this.executado(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Gerar Diploma') {
|
||||
await this.generateDiploma(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Reexecução') {
|
||||
await this.reexecutar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Concluido') {
|
||||
await this.concluir(res.data.note, docs);
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
async concluir(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Concluir Despacho')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService.successMessage('Processo arquivado')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não arquivado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
async executado(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Conhecimento",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Executado')
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
} catch(error) {
|
||||
this.toastService.badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
async reexecutar(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reexecução",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Reexecução')
|
||||
this.toastService.successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.RouteService.goBack();
|
||||
this.TaskService.loadDiplomas()
|
||||
}
|
||||
|
||||
cancle() {
|
||||
this.modalController.dismiss()
|
||||
}
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DkDiplomasGerarOptionsPage } from './dk-diplomas-gerar-options.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DkDiplomasGerarOptionsPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class DkDiplomasGerarOptionsPageRoutingModule {}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DkDiplomasGerarOptionsPageRoutingModule } from './dk-diplomas-gerar-options-routing.module';
|
||||
|
||||
import { DkDiplomasGerarOptionsPage } from './dk-diplomas-gerar-options.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DkDiplomasGerarOptionsPageRoutingModule
|
||||
],
|
||||
declarations: [DkDiplomasGerarOptionsPage]
|
||||
})
|
||||
export class DkDiplomasGerarOptionsPageModule {}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
<div class="wrapper">
|
||||
<div>
|
||||
<div class="buttons">
|
||||
<button (click)="enviarDiploma({note: '', documents: [], serialnumber: task.SerialNumber})" class="btn-cancel" shape="round" >Enviar Diploma</button>
|
||||
<button (click)="openDelegarModal()" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
-67
@@ -1,67 +0,0 @@
|
||||
@import '~src/function.scss';
|
||||
|
||||
.wrapper{
|
||||
width: 100% !important;
|
||||
padding-top:20px !important;
|
||||
padding-bottom:20px !important;
|
||||
}
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: rem(35);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons{
|
||||
width: 100% !important;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.solid {
|
||||
display: none;
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel{
|
||||
//width: 50% !important;
|
||||
margin-bottom: 5px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.container{
|
||||
width: 100% !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 47% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.container{
|
||||
width: 100% !important;
|
||||
|
||||
}
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
display: none;
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-delete, .btn-ok{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DkDiplomasGerarOptionsPage } from './dk-diplomas-gerar-options.page';
|
||||
|
||||
describe('DkDiplomasGerarOptionsPage', () => {
|
||||
let component: DkDiplomasGerarOptionsPage;
|
||||
let fixture: ComponentFixture<DkDiplomasGerarOptionsPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DkDiplomasGerarOptionsPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DkDiplomasGerarOptionsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
-209
@@ -1,209 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
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 { customTask, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-dk-diplomas-gerar-options',
|
||||
templateUrl: './dk-diplomas-gerar-options.page.html',
|
||||
styleUrls: ['./dk-diplomas-gerar-options.page.scss'],
|
||||
})
|
||||
export class DkDiplomasGerarOptionsPage implements OnInit {
|
||||
|
||||
|
||||
task: customTask
|
||||
fulltask: fullTask;
|
||||
serialNumber: string;
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
public popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
private despachoService: DespachoService,
|
||||
private navParams: NavParams,
|
||||
private router: Router,
|
||||
private RouteService: RouteService,
|
||||
public TaskService: TaskService
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.task = this.navParams.get('task')
|
||||
this.fulltask = this.navParams.get('fulltask')
|
||||
this.serialNumber = this.navParams.get('serialNumber')
|
||||
}
|
||||
|
||||
|
||||
async enviarDiploma({note = '', documents = [], serialnumber}) {
|
||||
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'add-note-modal-no-height'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps: {
|
||||
showAttachmentBtn: true,
|
||||
actionName:false
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
if (res.data) {
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
let body = {
|
||||
"serialNumber": serialnumber,
|
||||
"action": "Enviar diploma",
|
||||
"ActionTypeId": 104,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": res.data.note,
|
||||
},
|
||||
"AttachmentList" : docs,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.modalController.dismiss('sucess');
|
||||
this.toastService._successMessage();
|
||||
this.goBack()
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest();
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
async sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.despachoService.sendExpedienteToPending(this.serialNumber).subscribe(res => {
|
||||
this.goBack();
|
||||
this.toastService._badRequest("Processo enviado para Pendentes")
|
||||
loader.remove()
|
||||
},
|
||||
error => {
|
||||
loader.remove()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest("Processo não enviado para Pendentes")
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async openBookMeetingModal() {
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask:this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(
|
||||
()=>{},
|
||||
(error) => {
|
||||
console.log(error)
|
||||
}
|
||||
)
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async openDelegarModal() {
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: DelegarPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
if(res) {
|
||||
const data = res.data;
|
||||
if(data == 'close') {
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
|
||||
this.popoverController.dismiss();
|
||||
this.RouteService.goBack();
|
||||
this.TaskService.loadDespachos();
|
||||
}
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DKOptsExpedientePage } from './dk-opts-expediente.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DKOptsExpedientePage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class DKOptsExpedientePageRoutingModule {}
|
||||
@@ -1,20 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DKOptsExpedientePageRoutingModule } from './dk-opts-expediente-routing.module';
|
||||
|
||||
import { DKOptsExpedientePage } from './dk-opts-expediente.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DKOptsExpedientePageRoutingModule
|
||||
],
|
||||
declarations: [DKOptsExpedientePage]
|
||||
})
|
||||
export class DKOptsExpedientePageModule {}
|
||||
@@ -1,24 +0,0 @@
|
||||
<ion-content class="options-container width-100 ">
|
||||
<div class="width-100">
|
||||
<div class="d-flex width-100">
|
||||
<div class="flex-grow-1 flex-wrap d-flex">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel deskButonText" shape="round"> Enviar para o {{ environment.PR}} </button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Solicitar consideração superior</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel deskButonText" shape="round"> Solicitar revisão </button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Submeter para revisão</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel deskButonText" shape="round">Outras opções </button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<!-- <button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button> -->
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="(task.Status || '') != 'Pending'" full class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Chat.access])" (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
@@ -1,72 +0,0 @@
|
||||
@import '~src/function.scss';
|
||||
|
||||
.options-container{
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
width: 100%;
|
||||
}
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: rem(35);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.solid {
|
||||
display: none;
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel{
|
||||
//width: 50% !important;
|
||||
margin-bottom: 5px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
// display: none;
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-delete, .btn-ok{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
|
||||
|
||||
.desk{
|
||||
text-align: left;
|
||||
background-color: white;
|
||||
color: var(--profile-text-color);
|
||||
}
|
||||
|
||||
.deskButonText{
|
||||
text-align: left;
|
||||
background-color: transparent;
|
||||
color: var(--profile-text-color);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DKOptsExpedientePage } from './dk-opts-expediente.page';
|
||||
|
||||
describe('DKOptsExpedientePage', () => {
|
||||
let component: DKOptsExpedientePage;
|
||||
let fixture: ComponentFixture<DKOptsExpedientePage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DKOptsExpedientePage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DKOptsExpedientePage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,464 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { expedienteTask } from 'src/app/models/dailyworktask.model';
|
||||
import { SearchList } from 'src/app/models/search-document';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ExpedienteService } from 'src/app/Rules/expediente.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { TaskService } from 'src/app/services/task.service';
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dk-opts-expediente',
|
||||
templateUrl: './dk-opts-expediente.page.html',
|
||||
styleUrls: ['./dk-opts-expediente.page.scss'],
|
||||
})
|
||||
export class DKOptsExpedientePage implements OnInit {
|
||||
|
||||
|
||||
task: expedienteTask
|
||||
fulltask: any;
|
||||
profile:string;
|
||||
caller:string;
|
||||
|
||||
showEnviarPendentes = false
|
||||
searchDocumentPipe = new SearchDocumentPipe()
|
||||
documents:SearchList[] = [];
|
||||
|
||||
SessionStore = SessionStore;
|
||||
environment = environment
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes: ProcessesService,
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
public p: PermissionService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private RouteService: RouteService,
|
||||
private expedienteService: ExpedienteService,
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHanlde: HttpErrorHandle,
|
||||
public TaskService: TaskService,
|
||||
private dataService: DataService,
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
async openNewGroupPage() {
|
||||
|
||||
// this.dataService.set("newGroup", true);
|
||||
// this.dataService.set("task", this.task);
|
||||
// this.dataService.set("newGroupName", this.task.Folio);
|
||||
// this.dataService.set("documents", this.fulltask.Documents);
|
||||
// this.dataService.set("link", window.location.pathname);
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
name: this.task.Folio,
|
||||
task: this.task,
|
||||
documents: this.fulltask.Documents,
|
||||
},
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(
|
||||
()=>{},
|
||||
(error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
close() {
|
||||
if( window.innerWidth < 801) {
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
else{
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.TaskService.loadExpedientes()
|
||||
this.RouteService.goBack()
|
||||
}
|
||||
|
||||
attachDocument(){
|
||||
this.getDoc();
|
||||
}
|
||||
|
||||
async getDoc() {
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: SearchPage,
|
||||
cssClass: 'modal-width-100-width-background modal',
|
||||
componentProps: {
|
||||
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
||||
showSearchInput: true,
|
||||
select: true
|
||||
}
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( async (res)=>{
|
||||
if(res){
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
this.documents.forEach((element: any) =>{
|
||||
|
||||
let body = {
|
||||
"InstanceID": this.task.InstanceID,
|
||||
"WorkflowDisplayName": this.task.WorkflowName,
|
||||
"FolderID": this.task.FolderId,
|
||||
"DispatchNumber": this.task.DispatchNumber,
|
||||
"AttachmentsProcessLastInstanceID": this.task.AttachmentsProcessLastInstanceID,
|
||||
"Attachments": []
|
||||
}
|
||||
|
||||
const Attachments = this.searchDocumentPipe.transformToAttachment(element)
|
||||
body.Attachments = Attachments;
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
|
||||
this.toastService._successMessage()
|
||||
}, (error) => {
|
||||
this.httpErrorHanlde.httpStatusHandle(error)
|
||||
},()=> {
|
||||
loader.remove()
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
this.popoverController.dismiss()
|
||||
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
let classs;
|
||||
if( window.innerWidth < 801) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'add-note-modal'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
showAttachmentBtn: false,
|
||||
actionName:actionName
|
||||
},
|
||||
cssClass: classs,
|
||||
//backdropDismiss: true
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
|
||||
if(res.data){
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
if(actionName == 'Aprovar') {
|
||||
await this.approve(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Revisão') {
|
||||
await this.sendToReview(res.data.note, docs);
|
||||
}
|
||||
this.popoverController.dismiss();
|
||||
this.goBack();
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async sendToReview(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
"action": "Retificar",
|
||||
"ActionTypeId": 99999877,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.TaskService.loadExpedientes()
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
this.close();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.TaskService.loadExpedientes()
|
||||
this.goBack();
|
||||
},(error) => {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async approve(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
"action": "Aprovar",
|
||||
"ActionTypeId": 100000004 ,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.TaskService.loadExpedientes()
|
||||
this.close();
|
||||
this.httpErrorHanlde.httpsSucessMessagge('Avaliação Superiror')
|
||||
} catch(error) {
|
||||
this.httpErrorHanlde.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openBookMeetingModal() {
|
||||
this.close();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(
|
||||
()=>{},
|
||||
(error) => {
|
||||
console.log(error)
|
||||
}
|
||||
)
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
|
||||
|
||||
|
||||
this.close();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(async res=>{
|
||||
|
||||
let body = res['data'];
|
||||
if(res['data']){
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.TaskService.loadExpedientes()
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async distartExpedientModal(body:any){
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
modal.onDidDismiss().then( async (res) => {
|
||||
|
||||
|
||||
if(body == 'descartar') {
|
||||
if(res['data']== 'Yes') {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.expedienteService.discard({SerialNumber: this.task.SerialNumber}).toPromise()
|
||||
this.TaskService.loadExpedientes()
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if(res['data'] == 'No'){
|
||||
//Do nothing
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(res['data']== 'Yes') {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.TaskService.loadExpedientes()
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
this.goBack();
|
||||
}
|
||||
else if(res['data'] == 'No'){
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||
this.TaskService.loadExpedientes()
|
||||
this.toastService._successMessage();
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DKRequestOptionsPage } from './dk-request-options.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DKRequestOptionsPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class DKRequestOptionsPageRoutingModule {}
|
||||
@@ -1,20 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DKRequestOptionsPageRoutingModule } from './dk-request-options-routing.module';
|
||||
|
||||
import { DKRequestOptionsPage } from './dk-request-options.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DKRequestOptionsPageRoutingModule
|
||||
],
|
||||
declarations: [DKRequestOptionsPage]
|
||||
})
|
||||
export class DKRequestOptionsPageModule {}
|
||||
@@ -1,55 +0,0 @@
|
||||
<div class="wrapper">
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Deferimento'">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Deferimento'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Reapreciar Deferimento'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Deferimento'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<!-- <button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button> -->
|
||||
<button (click)="openAddNoteModal('Solicitar Reapreciação')" class="btn-cancel" shape="round" >Solicitar Reapreciação</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Parecer' || task.WorkflowName == 'Pedido de Parecer do Presidente' ">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Parecer'">
|
||||
<button *ngIf="checkStringInArray('Registar')" (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente' && checkStringInArray('Reencaminhar')" (click)="openForwardModal(task)" class="btn-cancel" shape="round" >Reencaminhar</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'">Iniciar Conversa</button>
|
||||
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,65 +0,0 @@
|
||||
@import '~src/function.scss';
|
||||
|
||||
.wrapper{
|
||||
width: 100% !important;
|
||||
padding-top:20px !important;
|
||||
padding-bottom:20px !important;
|
||||
}
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: rem(35);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons{
|
||||
width: 100% !important;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.solid {
|
||||
display: none;
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel{
|
||||
//width: 50% !important;
|
||||
margin-bottom: 5px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.container{
|
||||
width: 100% !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.container{
|
||||
width: 100% !important;
|
||||
|
||||
}
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-delete, .btn-ok{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DKRequestOptionsPage } from './dk-request-options.page';
|
||||
|
||||
describe('DKRequestOptionsPage', () => {
|
||||
let component: DKRequestOptionsPage;
|
||||
let fixture: ComponentFixture<DKRequestOptionsPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DKRequestOptionsPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DKRequestOptionsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,400 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DarParecerPage } from 'src/app/modals/dar-parecer/dar-parecer.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.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';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { PedidoService } from 'src/app/Rules/pedido.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
import { ForwardPage } from 'src/app/modals/forward/forward.page';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-dk-request-options',
|
||||
templateUrl: './dk-request-options.page.html',
|
||||
styleUrls: ['./dk-request-options.page.scss'],
|
||||
})
|
||||
export class DKRequestOptionsPage implements OnInit {
|
||||
|
||||
|
||||
task:any;
|
||||
fulltask: any;
|
||||
profile:string;
|
||||
serialNumber : string;
|
||||
showEnviarPendentes = false;
|
||||
taskActions = [];
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes: ProcessesService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
private pedidoService: PedidoService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.taskActions = this.navParams.get('actions');
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialNumber = params["serialNumber"];
|
||||
//
|
||||
}
|
||||
});
|
||||
|
||||
if(this.task.serialNumber) {
|
||||
this.serialNumber = this.task.serialNumber
|
||||
} else if (this.task.SerialNumber) {
|
||||
this.serialNumber = this.task.SerialNumber
|
||||
}
|
||||
|
||||
this.showEnviarPendentes = this.navParams.get('showEnviarPendentes');
|
||||
|
||||
if(!this.showEnviarPendentes) this.showEnviarPendentes = false
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.profile = "mdgpr";
|
||||
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth >= 800){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
checkStringInArray(str) {
|
||||
return this.taskActions.includes(str);
|
||||
}
|
||||
|
||||
close() {
|
||||
this.popoverController.dismiss('close')
|
||||
}
|
||||
cancel(){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
|
||||
sendExpedienteToPending() {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.close();
|
||||
loader.remove()
|
||||
}, (error)=> {
|
||||
loader.remove()
|
||||
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
this.popoverController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(
|
||||
()=>{}
|
||||
, (error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async openNewGroupPage(){
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
name: this.task.Folio,
|
||||
task: this.task,
|
||||
documents: this.fulltask.Documents,
|
||||
},
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( () => {
|
||||
this.popoverController.dismiss('close');
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async newGroup(){
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
name: this.task.Folio,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(
|
||||
()=>{},
|
||||
(error) => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
|
||||
//this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: CreateProcessPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
fulltask: this.fulltask
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(res=> {
|
||||
|
||||
if(res['data']=='openDiscart') {
|
||||
|
||||
|
||||
} else {
|
||||
this.popoverController.dismiss('close')
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async repreciar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reapreciação",
|
||||
"ActionTypeId": 100000009,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Solicitar Reapreciação')
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error);
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
showAttachmentBtn: true,
|
||||
actionName:actionName
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(async (res) => {
|
||||
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
|
||||
if(res.data) {
|
||||
if(actionName == 'Solicitar Reapreciação') {
|
||||
|
||||
await this.repreciar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar') {
|
||||
await this.arquivar(res.data.note, docs);
|
||||
this.popoverController.dismiss('close')
|
||||
}
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async arquivar(note:string, documents:any) {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.pedidoService.arquivar({serialNumber: this.serialNumber,
|
||||
documents,
|
||||
note
|
||||
}).toPromise()
|
||||
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
} catch (error) {
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async openDarParecer(task: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: DarParecerPage,
|
||||
componentProps: {
|
||||
serialNumber: this.task.SerialNumber,
|
||||
ProcessInstanceID: this.task.ProcessInstanceID,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( () => {
|
||||
this.popoverController.dismiss('close');
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
async openForwardModal(tasK: any) {
|
||||
let classs;
|
||||
if (window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: ForwardPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.popoverController.dismiss('close');
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
this.modalController.dismiss()
|
||||
const modal = await this.modalController.create({
|
||||
component: DelegarPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then( async (res)=> {
|
||||
|
||||
if(res['data']=='close') {
|
||||
this.popoverController.dismiss('close');
|
||||
}
|
||||
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -18,10 +18,11 @@ import { SocketConnectionMCRService } from "src/app/services/socket-connection-m
|
||||
import { CMAPIService } from '../../repository/CMAPI/cmapi.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { CaptureImageOptions, MediaCapture } from '@awesome-cordova-plugins/media-capture/ngx';
|
||||
import { Filesystem, FilesystemDirectory } from '@capacitor/filesystem';
|
||||
import { Directory, Filesystem, FilesystemDirectory } from '@capacitor/filesystem';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { PublicationAttachmentEntity, PublicationFormMV } from '../upload/upload-streaming.service';
|
||||
import { PublicationFormMVService } from "src/app/shared/publication/upload/publication-form-mv.service"
|
||||
import { VideoconvertService } from 'src/app/services/videoconvert.service';
|
||||
|
||||
enum ActionType {
|
||||
newRapid = "1",
|
||||
@@ -86,6 +87,7 @@ export class NewPublicationPage implements OnInit {
|
||||
private MiddlewareServiceService: MiddlewareServiceService,
|
||||
private LakefsRepositoryService: LakefsRepositoryService,
|
||||
private SocketConnectionMCRService: SocketConnectionMCRService,
|
||||
private videoconvertService: VideoconvertService
|
||||
) {
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
}
|
||||
@@ -727,29 +729,11 @@ export class NewPublicationPage implements OnInit {
|
||||
data.forEach(async element => {
|
||||
this.filesSizeSum = this.filesSizeSum + element.size
|
||||
if (this.fileSizeToMB(this.filesSizeSum) <= 20) {
|
||||
const savedFile = await Filesystem.copy({
|
||||
from: element.fullPath, // directory prop removed, Capacitor parses filename for us
|
||||
to: "video.mp4",
|
||||
toDirectory: FilesystemDirectory.Data
|
||||
});
|
||||
console.log(savedFile.uri)
|
||||
Filesystem.readFile({ path: savedFile.uri })
|
||||
|
||||
.then(async (content) => {
|
||||
this.filecontent = true;
|
||||
console.log('', content)
|
||||
let fileObject = new PublicationAttachmentEntity({
|
||||
base64: content.data,
|
||||
extension: 'mp4',
|
||||
OriginalFileName: 'record',
|
||||
FileType: 'video'
|
||||
|
||||
}
|
||||
)
|
||||
this.publicationFormMV.form.Files.push(fileObject)
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
if(this.platform.is('ios'))
|
||||
this.recordevideoIos(element.fullPath)
|
||||
} else {
|
||||
this.recordVideoPc(element.fullPath)
|
||||
|
||||
if (this.publicationFormMV.form.Files.length === 0)
|
||||
this.filesSizeSum = 0
|
||||
|
||||
@@ -771,6 +755,65 @@ export class NewPublicationPage implements OnInit {
|
||||
if (this.platform.is('desktop'))
|
||||
return true;
|
||||
}
|
||||
|
||||
async recordevideoIos(fullPath) {
|
||||
try {
|
||||
const directory = await Filesystem.getUri({
|
||||
directory: Directory.Cache,
|
||||
path: '',
|
||||
});
|
||||
|
||||
this.videoconvertService.convertVideo(fullPath,directory.uri,'mp4');
|
||||
|
||||
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
|
||||
|
||||
.then(async (content) => {
|
||||
this.filecontent = true;
|
||||
console.log('', content)
|
||||
let fileObject = new PublicationAttachmentEntity({
|
||||
base64: content.data,
|
||||
extension: 'mp4',
|
||||
OriginalFileName: 'record',
|
||||
FileType: 'video'
|
||||
|
||||
}
|
||||
)
|
||||
this.publicationFormMV.form.Files.push(fileObject)
|
||||
})
|
||||
.catch((erro) => console.error('read converted video erro ', erro));
|
||||
} catch (error) {
|
||||
console.log('record video ios erro, ', error)
|
||||
}
|
||||
}
|
||||
|
||||
async recordVideoPc(fullPath) {
|
||||
try {
|
||||
const savedFile = await Filesystem.copy({
|
||||
from: fullPath, // directory prop removed, Capacitor parses filename for us
|
||||
to: "video.mp4",
|
||||
toDirectory: FilesystemDirectory.Data
|
||||
});
|
||||
console.log(savedFile.uri)
|
||||
Filesystem.readFile({ path: savedFile.uri })
|
||||
|
||||
.then(async (content) => {
|
||||
this.filecontent = true;
|
||||
console.log('', content)
|
||||
let fileObject = new PublicationAttachmentEntity({
|
||||
base64: content.data,
|
||||
extension: 'mp4',
|
||||
OriginalFileName: 'record',
|
||||
FileType: 'video'
|
||||
|
||||
}
|
||||
)
|
||||
this.publicationFormMV.form.Files.push(fileObject)
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user