Commit bf20476c authored by ari_darmawan's avatar ari_darmawan

update for tender

parent b641a92c
This diff is collapsed.
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
"ckeditor4-angular": "^1.3.0", "ckeditor4-angular": "^1.3.0",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"jquery": "^3.3.1", "jquery": "^3.3.1",
"jspdf": "^2.5.1",
"moment": "^2.29.3", "moment": "^2.29.3",
"ngx-ckeditor": "^0.4.0", "ngx-ckeditor": "^0.4.0",
"popper.js": "^1.15.0", "popper.js": "^1.15.0",
......
...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../shared/serviceproxy/service-proxy.ser ...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../shared/serviceproxy/service-proxy.ser
import { ServiceProxyWeb } from '../../../shared/serviceproxy/service-proxy.service'; import { ServiceProxyWeb } from '../../../shared/serviceproxy/service-proxy.service';
import { Data, Router } from '@angular/router'; import { Data, Router } from '@angular/router';
import { ChangeDetectorRef } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core';
import { environment } from '../../../environments/environment.prod'; import { environment } from '../../../environments/environment';
import { Http, ResponseContentType, RequestOptions } from '@angular/http'; import { Http, ResponseContentType, RequestOptions } from '@angular/http';
import * as $ from 'jquery'; import * as $ from 'jquery';
import { resolve } from 'url'; import { resolve } from 'url';
......
...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../../shared/serviceproxy/service-proxy. ...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../../shared/serviceproxy/service-proxy.
import { ServiceProxyWeb } from '../../../../shared/serviceproxy/service-proxy.service'; import { ServiceProxyWeb } from '../../../../shared/serviceproxy/service-proxy.service';
import { Data, Router } from '@angular/router'; import { Data, Router } from '@angular/router';
import { ChangeDetectorRef } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core';
import { environment } from '../../../../environments/environment.prod'; import { environment } from '../../../../environments/environment';
import { Http, ResponseContentType, RequestOptions } from '@angular/http'; import { Http, ResponseContentType, RequestOptions } from '@angular/http';
import * as $ from 'jquery'; import * as $ from 'jquery';
import { resolve } from 'url'; import { resolve } from 'url';
......
...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../../shared/serviceproxy/service-proxy. ...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../../shared/serviceproxy/service-proxy.
import { ServiceProxyWeb } from '../../../../shared/serviceproxy/service-proxy.service'; import { ServiceProxyWeb } from '../../../../shared/serviceproxy/service-proxy.service';
import { Data, Router } from '@angular/router'; import { Data, Router } from '@angular/router';
import { ChangeDetectorRef } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core';
import { environment } from '../../../../environments/environment.prod'; import { environment } from '../../../../environments/environment';
import { Http, ResponseContentType, RequestOptions } from '@angular/http'; import { Http, ResponseContentType, RequestOptions } from '@angular/http';
import * as $ from 'jquery'; import * as $ from 'jquery';
import { resolve } from 'url'; import { resolve } from 'url';
......
...@@ -11,7 +11,7 @@ import { Router } from '@angular/router'; ...@@ -11,7 +11,7 @@ import { Router } from '@angular/router';
import { ChangeDetectorRef } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core';
import { environment } from '../../../../environments/environment.prod'; import { environment } from '../../../../environments/environment';
import { Http, ResponseContentType, RequestOptions } from '@angular/http'; import { Http, ResponseContentType, RequestOptions } from '@angular/http';
......
...@@ -11,7 +11,7 @@ import { Data, Router } from '@angular/router'; ...@@ -11,7 +11,7 @@ import { Data, Router } from '@angular/router';
import { ChangeDetectorRef } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core';
import { environment } from '../../../../environments/environment.prod'; import { environment } from '../../../../environments/environment';
import { Http, ResponseContentType, RequestOptions } from '@angular/http'; import { Http, ResponseContentType, RequestOptions } from '@angular/http';
......
...@@ -11,7 +11,7 @@ import { Data, Router } from '@angular/router'; ...@@ -11,7 +11,7 @@ import { Data, Router } from '@angular/router';
import { ChangeDetectorRef } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core';
import { environment } from '../../../environments/environment.prod'; import { environment } from '../../../environments/environment';
import { Http, ResponseContentType, RequestOptions } from '@angular/http'; import { Http, ResponseContentType, RequestOptions } from '@angular/http';
......
...@@ -10,7 +10,7 @@ import { ServiceProxyWeb } from '../../../shared/serviceproxy/service-proxy.serv ...@@ -10,7 +10,7 @@ import { ServiceProxyWeb } from '../../../shared/serviceproxy/service-proxy.serv
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { environment } from '../../../environments/environment.prod'; import { environment } from '../../../environments/environment';
import { Http, ResponseContentType, RequestOptions } from '@angular/http'; import { Http, ResponseContentType, RequestOptions } from '@angular/http';
......
...@@ -12,7 +12,7 @@ import * as $ from 'jquery'; ...@@ -12,7 +12,7 @@ import * as $ from 'jquery';
declare const AratakaConfig : any; declare const AratakaConfig : any;
import { environment } from '../../../environments/environment.prod'; import { environment } from '../../../environments/environment';
@Component({ @Component({
selector: 'app-admin-macro', selector: 'app-admin-macro',
......
...@@ -15,7 +15,7 @@ import { ActivatedRoute } from '@angular/router'; ...@@ -15,7 +15,7 @@ import { ActivatedRoute } from '@angular/router';
import { AdminSelectfiletemplateComponent } from '../../admin-selectfiletemplate/admin-selectfiletemplate.component'; import { AdminSelectfiletemplateComponent } from '../../admin-selectfiletemplate/admin-selectfiletemplate.component';
import { environment } from '../../../../environments/environment.prod'; import { environment } from '../../../../environments/environment';
import * as $ from 'jquery'; import * as $ from 'jquery';
declare const AratakaConfig : any; declare const AratakaConfig : any;
......
...@@ -12,7 +12,7 @@ import * as $ from 'jquery'; ...@@ -12,7 +12,7 @@ import * as $ from 'jquery';
declare const AratakaConfig : any; declare const AratakaConfig : any;
import { environment } from '../../../environments/environment.prod'; import { environment } from '../../../environments/environment';
@Component({ @Component({
selector: 'app-admin-ticket-onpic', selector: 'app-admin-ticket-onpic',
......
...@@ -36,3 +36,39 @@ ...@@ -36,3 +36,39 @@
border: 1px solid #D50000; border: 1px solid #D50000;
color: #fff; color: #fff;
} }
.arataka-custom-autocomplete{
border: 1px solid #cccccc;
padding: 5px;
border-radius: 5px;
margin-top: -5px;
position: absolute;
background: #ffffff !important;
z-index: 999;
max-height: 260px;
overflow-y: auto;
}
.arataka-chevron-autocomplete{
position: absolute;
z-index: 999;
right: 0;
top: 0;
margin-top: 33px !important;
margin-right: 25px !important;
color: #9E9E9E;
}
.arataka-custom-autocomplete-itemlist{
font-size: 11px;
color: #222;
margin: 7px 0;
cursor: pointer;
padding: 3px 3px;
}
.arataka-custom-autocomplete-itemlist:hover{
background: #1976D2;
border-radius: 3px;
color: #ffffff;
}
\ No newline at end of file
...@@ -50,33 +50,6 @@ ...@@ -50,33 +50,6 @@
<input type="text" placeholder="Input Channel ..." #inputRequired class="form-control form-control-sm" [(ngModel)]="channel" maxlength="30"> <input type="text" placeholder="Input Channel ..." #inputRequired class="form-control form-control-sm" [(ngModel)]="channel" maxlength="30">
</div> --> </div> -->
<!-- <hr> --> <!-- <hr> -->
<p>
<b>Assignee</b>
</p>
<div class="form-group">
<label class="text-muted">Assignee Team <span class="text-danger">*</span></label>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="AssigneeTeam_ID"
(change)="AssigneeTeamChange()">
<ng-container *ngFor="let AssigneeTeam of AssigneeTeamData; let i = index">
<option value="{{AssigneeTeam.ID}}">{{AssigneeTeam.Name}}</option>
</ng-container>
</select>
</div>
<div class="form-group">
<label class="text-muted">Assignee Agent <span class="text-danger">*</span></label>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="AssigneeTeamAgent_ID">
<ng-container *ngFor="let AssigneeTeamAgent of AssigneeTeamAgentData; let i = index">
<option value="{{AssigneeTeamAgent.ID}}">{{AssigneeTeamAgent.Name}}</option>
</ng-container>
</select>
</div>
<hr>
<p> <p>
<b>Topic & Category</b> <b>Topic & Category</b>
</p> </p>
...@@ -109,12 +82,42 @@ ...@@ -109,12 +82,42 @@
<select type="text" <select type="text"
#inputRequired #inputRequired
class="form-control form-control-sm select-style" class="form-control form-control-sm select-style"
[(ngModel)]="Category_ID"> [(ngModel)]="Category_ID"
(change)="onChangeCategoryTeam()">
<ng-container *ngFor="let Category of CategoryData; let i = index"> <ng-container *ngFor="let Category of CategoryData; let i = index">
<option value="{{Category.ID}}">{{Category.Name}}</option> <option value="{{Category.ID}}">{{Category.Name}}</option>
</ng-container> </ng-container>
</select> </select>
</div> </div>
<hr>
<p>
<b>Assignee</b>
</p>
<div class="form-group">
<label class="text-muted">Assignee Team <span class="text-danger">*</span></label>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="AssigneeTeam_ID"
(change)="AssigneeTeamChange()"
[disabled]="isDisableTeam">
<ng-container *ngFor="let AssigneeTeam of AssigneeTeamData; let i = index">
<option value="{{AssigneeTeam.ID}}">{{AssigneeTeam.Name}}</option>
</ng-container>
</select>
</div>
<div class="form-group">
<label class="text-muted">Assignee Agent <span class="text-danger">*</span></label>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="AssigneeTeamAgent_ID"
[disabled]="isDisableTeam">
<ng-container *ngFor="let AssigneeTeamAgent of AssigneeTeamAgentData; let i = index">
<option value="{{AssigneeTeamAgent.ID}}">{{AssigneeTeamAgent.Name}}</option>
</ng-container>
</select>
</div>
<ng-container *ngIf="Topic_ID == Env.Topic.Keluhan.toString() || Topic_ID == Env.Topic.PermintaanKeServiceDesk.toString()"> <ng-container *ngIf="Topic_ID == Env.Topic.Keluhan.toString() || Topic_ID == Env.Topic.PermintaanKeServiceDesk.toString()">
<hr> <hr>
<p>Complaint</p> <p>Complaint</p>
...@@ -130,6 +133,27 @@ ...@@ -130,6 +133,27 @@
</select> </select>
</div> </div>
</ng-container> </ng-container>
<div class="form-group">
<label class="text-muted">List ATM <span class="text-danger">*</span></label>
<div [ngClass]="{'arataka-custom-autocomplete': Key_Destination_KeyUp}">
<input
type="text"
class="form-control form-control-sm"
[(ngModel)]="Key_Destination"
(click)="Key_DestinationClick()"
(keyup)="Key_DestinationKeyUp()"
(blur)="Key_DestinationBlur()"
placeholder="Search ATM"/>
<span class="arataka-chevron-autocomplete" *ngIf="!Key_Destination_KeyUp"><i class="fas fa-chevron-down"></i></span>
<ng-container *ngFor="let data of ModelData_Key_Destination; let i = index">
<p
class="arataka-custom-autocomplete-itemlist"
*ngIf="Key_Destination_KeyUp"
(click)="Key_Destination_Click(i)"
>{{data.Name}}</p>
</ng-container>
</div>
</div>
</div> </div>
<div class="col-12 col-sm-8 col-md-8 col-lg-9"> <div class="col-12 col-sm-8 col-md-8 col-lg-9">
<div class="row"> <div class="row">
......
...@@ -14,7 +14,7 @@ declare const AratakaConfig : any; ...@@ -14,7 +14,7 @@ declare const AratakaConfig : any;
import { AdminTicketCustomerMdComponent } from '../admin-ticket-customer-md/admin-ticket-customer-md.component'; import { AdminTicketCustomerMdComponent } from '../admin-ticket-customer-md/admin-ticket-customer-md.component';
import { AdminSelectfiletemplateComponent } from '../../admin-selectfiletemplate/admin-selectfiletemplate.component'; import { AdminSelectfiletemplateComponent } from '../../admin-selectfiletemplate/admin-selectfiletemplate.component';
import { environment } from '../../../../environments/environment.prod'; import { environment } from '../../../../environments/environment';
@Component({ @Component({
selector: 'app-admin-ticket-create', selector: 'app-admin-ticket-create',
...@@ -97,6 +97,10 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -97,6 +97,10 @@ export class AdminTicketCreateComponent implements OnInit {
public extAgent: string = ""; public extAgent: string = "";
public channel: string = ""; public channel: string = "";
listAgent: any[] = []; listAgent: any[] = [];
ModelData_Key_Destination = []
ModelData_Key_Destination_Full = []
Key_Destination = "";
Key_Destination_KeyUp = false
constructor(injector: Injector, constructor(injector: Injector,
private router: Router, private router: Router,
...@@ -175,6 +179,7 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -175,6 +179,7 @@ export class AdminTicketCreateComponent implements OnInit {
this.GettingTeamsListAPI() this.GettingTeamsListAPI()
this.GettingTopicListAPI() this.GettingTopicListAPI()
this.GettingComplaintmentListAPI() this.GettingComplaintmentListAPI()
this.getListATM()
// this.requestAgent(); // this.requestAgent();
} }
...@@ -215,6 +220,26 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -215,6 +220,26 @@ export class AdminTicketCreateComponent implements OnInit {
} }
} }
public isDisableTeam: boolean = false;
onChangeCategoryTeam() {
this._SP.getTeamCategory(this.Category_ID) ? this.isDisableTeam = true : this.isDisableTeam = false
if (this._SP.getTeamCategory(this.Category_ID)) {
this.AssigneeTeamData.push({
ID: this.Env.Team.DigitalLoan.toString(),
Name: "Digital Loan"
})
this.AssigneeTeamAgentData.push({
ID: "143891",
Name: "lishiera iren"
})
this.AssigneeTeam_ID = this._SP.getTeamCategory(this.Category_ID).toString()
this.AssigneeTeamAgent_ID = this._SP.getTeamAgentCategory(this.Category_ID).toString();
} else {
this.AssigneeTeam_ID = "";
this.AssigneeTeamAgent_ID = "";
}
}
SubTopicChange(){ SubTopicChange(){
if(this.SubTopic_ID != ""){ if(this.SubTopic_ID != ""){
this.GettingCategoryListAPI({ID : parseInt(this.SubTopic_ID)}) this.GettingCategoryListAPI({ID : parseInt(this.SubTopic_ID)})
...@@ -277,6 +302,56 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -277,6 +302,56 @@ export class AdminTicketCreateComponent implements OnInit {
AratakaConfig.BootstrapModal({ ID: '#SelectFile-MD', Open: false, Static: null }); AratakaConfig.BootstrapModal({ ID: '#SelectFile-MD', Open: false, Static: null });
} }
delay = (()=>{
let timer = undefined;
return function(callback, ms){
clearTimeout (timer);
timer = setTimeout(callback, ms);
};
})();
Key_DestinationClick() {
this.Key_Destination_KeyUp = true;
this.ModelData_Key_Destination = [{
ID : null,
Name : "Please Wait.."
}]
let that = this
this.delay(function(){
that.ModelData_Key_Destination = [];
that.ModelData_Key_Destination = that.ModelData_Key_Destination_Full
}, 250 );
}
Key_DestinationKeyUp() {
this.Key_Destination_KeyUp = true;
this.ModelData_Key_Destination = [{
ID : null,
Name : "Please Wait.."
}]
let that = this;
this.delay(function() {
that.ModelData_Key_Destination = [];
if (that.Key_Destination != "") {
that.ModelData_Key_Destination = that.ModelData_Key_Destination_Full.filter(entry => {
return entry.Name.toLowerCase().includes(that.Key_Destination.toLowerCase())
})
} else {
that.ModelData_Key_Destination = that.ModelData_Key_Destination_Full
}
}, 250 );
}
Key_DestinationBlur(){
let that = this;
setTimeout(() => {
that.Key_Destination_KeyUp = false;
}, 250);
}
Key_Destination_Click(_i){
this.Key_Destination = this.ModelData_Key_Destination[_i].Name;
}
SubmitClick(){ SubmitClick(){
var valid = true; var valid = true;
...@@ -328,6 +403,56 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -328,6 +403,56 @@ export class AdminTicketCreateComponent implements OnInit {
//API Function ------------------------------------------------------------------------- //API Function -------------------------------------------------------------------------
getListATM() {
this.ModelData_Key_Destination = [
{
ID : null,
Name : "Searcing.."
}
]
this.ModelData_Key_Destination_Full = [
{
ID : null,
Name : "Searcing.."
}
]
this.API.intergrasiListATM()
.subscribe((obj: any) => {
this.ModelData_Key_Destination = [];
this.ModelData_Key_Destination_Full = [];
this.Key_Destination = "";
if (obj.success) {
if (obj.data.length != 0 && obj.data != null) {
let that = this;
obj.data.map( function(x, index) {
that.ModelData_Key_Destination_Full.push({
ID : x.DestinationId,
Name : x.Code + ' - ' + x.Name
})
})
} else {
this.ModelData_Key_Destination = [{
ID : null,
Name : "Empty ATM List"
}]
}
} else {
this.ModelData_Key_Destination = [{
ID : null,
Name : "Empty ATM List"
}]
}
}, (err: HttpErrorResponse) => {
this.Key_Destination = ""
this.ModelData_Key_Destination = [{
ID : null,
Name : "Internal Server Error"
}]
})
}
GettingTeamsListAPI(){ GettingTeamsListAPI(){
this.AssigneeTeamData = [{ this.AssigneeTeamData = [{
...@@ -878,7 +1003,7 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -878,7 +1003,7 @@ export class AdminTicketCreateComponent implements OnInit {
ticket_assign : _Request.ticket_id, ticket_assign : _Request.ticket_id,
ticket_class : _Request.ticket_class, ticket_class : _Request.ticket_class,
team_id : this.AssigneeTeam_ID, team_id : this.AssigneeTeam_ID,
agent_id : this.AssigneeTeamAgent_ID agent_id : this.AssigneeTeamAgent_ID,
}) })
}else{ }else{
......
...@@ -12,7 +12,7 @@ import { Router } from '@angular/router'; ...@@ -12,7 +12,7 @@ import { Router } from '@angular/router';
import * as $ from 'jquery'; import * as $ from 'jquery';
declare const AratakaConfig : any; declare const AratakaConfig : any;
import { environment } from '../../../../environments/environment.prod'; import { environment } from '../../../../environments/environment';
@Component({ @Component({
selector: 'app-admin-ticket-customer-md', selector: 'app-admin-ticket-customer-md',
......
...@@ -8,14 +8,11 @@ ...@@ -8,14 +8,11 @@
</button> </button>
</div> </div>
<div class="col-12 col-sm-12 col-md-3 col-lg-3 mb-1"></div> <div class="col-12 col-sm-12 col-md-3 col-lg-3 mb-1"></div>
<div class="col-12 col-sm-12 col-md-3 col-lg-3 mb-1"></div> <div class="col-12 col-sm-12 col-md-3 col-lg-3 mb-1">
<div class="col-12 col-sm-12 col-md-3 col-lg-3 mb-1"> <ng-container *ngIf="(Topic_ID == Env.Topic.Informasi.toString() || Topic_ID == Env.Topic.TelponTerputus.toString() && TeamID != Env.Team.ServiceReport
<!-- Topic_ID == '4' To Topic_ID == '6' Topic_ID == Env.Topic.PermintaanKeNobuCall.toString() --> || Topic_ID == Env.Topic.PermintaanKeNobuCall.toString()) && (TeamID == Env.Team.AgentCallCenter
<ng-container || TeamID == Env.Team.SociomileStaff) && (StatusTicket == 'new' || StatusTicket == 'assigned'
*ngIf="(Topic_ID == Env.Topic.Informasi.toString() || Topic_ID == Env.Topic.TelponTerputus.toString() && TeamID != Env.Team.ServiceReport || StatusTicket == 'escalated_ttr')">
|| Topic_ID == Env.Topic.PermintaanKeNobuCall.toString()) && (TeamID == Env.Team.AgentCallCenter
|| TeamID == Env.Team.SociomileStaff) && (StatusTicket == 'new' || StatusTicket == 'assigned'
|| StatusTicket == 'escalated_ttr')">
<button class="btn btn-sm btn-block arataka-btn-primary" (click)="ResolveTicketClick()"> <button class="btn btn-sm btn-block arataka-btn-primary" (click)="ResolveTicketClick()">
<i class="far fa-check-circle"></i> <i class="far fa-check-circle"></i>
&nbsp; &nbsp;
...@@ -23,9 +20,14 @@ ...@@ -23,9 +20,14 @@
</button> </button>
</ng-container> </ng-container>
</div> </div>
<div class="col-12 col-sm-12 col-md-3 col-lg-3 mb-1" style="text-align: right;">
<button class="btn btn-sm btn-block arataka-btn-primary" (click)="exportPDF()">
Export PDF
</button>
</div>
</div> </div>
<br> <br>
<div class="row"> <div class="row" id="pdfDashboard" #pdfDashboard>
<div class="col-12 col-sm-4 col-md-4 col-lg-3 mb-3"> <div class="col-12 col-sm-4 col-md-4 col-lg-3 mb-3">
<!-- <p> <!-- <p>
<b>Agent</b> <b>Agent</b>
......
import { Component, OnInit,Injector, ViewChildren, ViewChild, Input } from '@angular/core'; import { Component, OnInit,Injector, ViewChildren, ViewChild, Input, ElementRef } from '@angular/core';
import { HttpErrorResponse } from '@angular/common/http'; import { HttpErrorResponse } from '@angular/common/http';
import { FormBuilder, FormGroup } from '@angular/forms'; import { FormBuilder, FormGroup } from '@angular/forms';
...@@ -14,8 +14,9 @@ import { Router } from '@angular/router'; ...@@ -14,8 +14,9 @@ import { Router } from '@angular/router';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { AdminSelectfiletemplateComponent } from '../../admin-selectfiletemplate/admin-selectfiletemplate.component'; import { AdminSelectfiletemplateComponent } from '../../admin-selectfiletemplate/admin-selectfiletemplate.component';
import jsPDF from 'jspdf';
import { environment } from '../../../../environments/environment.prod'; import html2canvas from 'html2canvas';
import { environment } from '../../../../environments/environment';
import * as $ from 'jquery'; import * as $ from 'jquery';
declare const AratakaConfig : any; declare const AratakaConfig : any;
...@@ -28,7 +29,7 @@ declare const AratakaConfig : any; ...@@ -28,7 +29,7 @@ declare const AratakaConfig : any;
export class AdminTicketDetailComponent implements OnInit { export class AdminTicketDetailComponent implements OnInit {
public Env = environment; public Env = environment;
@ViewChild('pdfDashboard') pdfDashboard!: ElementRef;
@ViewChild('CallViewChildSelectFileMd') CallViewChildSelectFileMd: AdminSelectfiletemplateComponent; @ViewChild('CallViewChildSelectFileMd') CallViewChildSelectFileMd: AdminSelectfiletemplateComponent;
public TeamID = this._SP.getUserInformation.values.team_id public TeamID = this._SP.getUserInformation.values.team_id
...@@ -264,6 +265,24 @@ export class AdminTicketDetailComponent implements OnInit { ...@@ -264,6 +265,24 @@ export class AdminTicketDetailComponent implements OnInit {
} }
exportPDF() {
AratakaConfig.LoadingPage.showLoading('Export PDF ....')
var data = document.getElementById('pdfDashboard');
html2canvas(data, { scale: 5 }).then((canvas) => {
const imageGeneratedFromTemplate = canvas.toDataURL('image/png');
const fileWidth = 190;
const generatedImageHeight = 210;
let PDF = new jsPDF('p', 'mm', 'a4',);
PDF.addImage(imageGeneratedFromTemplate, 'PNG', 10, 10, fileWidth, generatedImageHeight,);
PDF.save('dashboard.pdf');
AratakaConfig.LoadingPage.hideLoading()
}).catch((error) => {
console.log(error)
AratakaConfig.LoadingPage.hideLoading()
AratakaConfig.Alert.showAlert('Export PDF Error!','alert-danger',2000)
});
}
//Take By User ------------------------------------------------------------------------ //Take By User ------------------------------------------------------------------------
ConversationReplyNoteViewByRole(){ ConversationReplyNoteViewByRole(){
this.ConversationReplyNote.map(function(x,index){ this.ConversationReplyNote.map(function(x,index){
......
...@@ -4,7 +4,7 @@ import { FormBuilder, FormGroup } from '@angular/forms'; ...@@ -4,7 +4,7 @@ import { FormBuilder, FormGroup } from '@angular/forms';
import { TicketService } from '../../../shared/serviceproxy/service-proxy.service'; import { TicketService } from '../../../shared/serviceproxy/service-proxy.service';
import { ServiceProxyWeb } from '../../../shared/serviceproxy/service-proxy.service'; import { ServiceProxyWeb } from '../../../shared/serviceproxy/service-proxy.service';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { environment } from '../../../environments/environment.prod'; import { environment } from '../../../environments/environment';
declare const AratakaConfig : any; declare const AratakaConfig : any;
@Component({ @Component({
......
...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../shared/serviceproxy/service-proxy.ser ...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../shared/serviceproxy/service-proxy.ser
import { ServiceProxyWeb } from '../../../shared/serviceproxy/service-proxy.service'; import { ServiceProxyWeb } from '../../../shared/serviceproxy/service-proxy.service';
import { Data, Router } from '@angular/router'; import { Data, Router } from '@angular/router';
import { ChangeDetectorRef } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core';
import { environment } from '../../../environments/environment.prod'; import { environment } from '../../../environments/environment';
declare const AratakaConfig : any; declare const AratakaConfig : any;
@Component({ @Component({
......
...@@ -18,6 +18,11 @@ ...@@ -18,6 +18,11 @@
(click)="GettingExcelForReportDataAPI()"> (click)="GettingExcelForReportDataAPI()">
Download Excel <i class="fas fa-download"></i> Download Excel <i class="fas fa-download"></i>
</span> </span>
<span
class="downloadExportReport"
(click)="onSaveTemplateReport()">
Save Template Report
</span>
<div class="table-responsive mt-4"> <div class="table-responsive mt-4">
<table class="table table-bordered table-striped table-sm"> <table class="table table-bordered table-striped table-sm">
<thead> <thead>
......
...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../../shared/serviceproxy/service-proxy. ...@@ -5,7 +5,7 @@ import { DashboardService } from '../../../../shared/serviceproxy/service-proxy.
import { ServiceProxyWeb } from '../../../../shared/serviceproxy/service-proxy.service'; import { ServiceProxyWeb } from '../../../../shared/serviceproxy/service-proxy.service';
import { Data, Router } from '@angular/router'; import { Data, Router } from '@angular/router';
import { ChangeDetectorRef } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core';
import { environment } from '../../../../environments/environment.prod'; import { environment } from '../../../../environments/environment';
declare const AratakaConfig : any; declare const AratakaConfig : any;
@Component({ @Component({
...@@ -324,6 +324,12 @@ export class TabsLogbookComponent implements OnInit, OnChanges { ...@@ -324,6 +324,12 @@ export class TabsLogbookComponent implements OnInit, OnChanges {
} }
} }
onSaveTemplateReport() {
AratakaConfig.Alert.showAlert('Save Template Success','alert-success',2000)
const fieldTemplate = JSON.stringify(this.fieldExport);
localStorage.setItem(this.listRequest.servicefamily_name, fieldTemplate);
}
onChangeFieldReport(i: number, evt: any) { onChangeFieldReport(i: number, evt: any) {
this.fieldExport[i]['value'] = evt.target.checked; this.fieldExport[i]['value'] = evt.target.checked;
} }
...@@ -347,6 +353,11 @@ export class TabsLogbookComponent implements OnInit, OnChanges { ...@@ -347,6 +353,11 @@ export class TabsLogbookComponent implements OnInit, OnChanges {
} }
GettingTicketReportDataAPI(){ GettingTicketReportDataAPI(){
const jsonStringIf = localStorage.getItem(this.listRequest.servicefamily_name)
const fieldTemplate = JSON.parse(jsonStringIf);
console.log(fieldTemplate)
this.fieldExport = fieldTemplate ? fieldTemplate : this.fieldExport;
console.log(this.fieldExport)
this.isDisabledButtonSearch = true; this.isDisabledButtonSearch = true;
this.listRequest.team_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.TeamID; this.listRequest.team_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.TeamID;
this.listRequest.user_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.listRequest.user_id; this.listRequest.user_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.listRequest.user_id;
......
import { Component, OnInit,Injector, Input, Output, EventEmitter } from '@angular/core'; import { Component, OnInit,Injector, Input, Output, EventEmitter } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { ServiceProxyWeb } from '../shared/serviceproxy/service-proxy.service'
import { MicroService } from '../shared/serviceproxy/service-proxy.service'; import { MicroService } from '../shared/serviceproxy/service-proxy.service';
import { environment } from '../environments/environment.prod'; import { environment } from '../environments/environment';
import * as $ from 'jquery'; import * as $ from 'jquery';
declare const AratakaConfig : any; declare const AratakaConfig : any;
...@@ -22,9 +22,10 @@ export class AppComponent implements OnInit{ ...@@ -22,9 +22,10 @@ export class AppComponent implements OnInit{
constructor( constructor(
private router: Router, private router: Router,
// private _ServiceProxyWeb : ServiceProxyWeb, private _SP : ServiceProxyWeb,
private MicroService: MicroService private MicroService: MicroService
) { } ) {
}
public href: string = ""; public href: string = "";
...@@ -40,6 +41,13 @@ export class AppComponent implements OnInit{ ...@@ -40,6 +41,13 @@ export class AppComponent implements OnInit{
}else{ }else{
this.isMenu = true this.isMenu = true
}*/ }*/
fetch('assets/configAPI.json')
.then(res => res.json())
.then(data => {
this._SP.setTokenMicroService(data.token)
})
.catch(err => console.error(err));
this.route = this.router.url this.route = this.router.url
if(this.route.split("/")[1] == "auth"){ if(this.route.split("/")[1] == "auth"){
this.isMenu = false this.isMenu = false
......
...@@ -5,7 +5,7 @@ import { Router } from '@angular/router'; ...@@ -5,7 +5,7 @@ import { Router } from '@angular/router';
declare const AratakaConfig : any; declare const AratakaConfig : any;
import { environment } from '../../../environments/environment.prod'; import { environment } from '../../../environments/environment';
@Component({ @Component({
selector: 'app-side-bar-menu', selector: 'app-side-bar-menu',
...@@ -84,7 +84,7 @@ export class SideBarMenuComponent implements OnInit { ...@@ -84,7 +84,7 @@ export class SideBarMenuComponent implements OnInit {
RouteIcon : 'fas fa-ticket-alt', RouteIcon : 'fas fa-ticket-alt',
RouteAddress : '/admin/user-agent', RouteAddress : '/admin/user-agent',
RouteActive : '', RouteActive : '',
Show : true, Show : false,
Child : [] Child : []
} }
] ]
......
...@@ -56,5 +56,6 @@ ...@@ -56,5 +56,6 @@
}, },
"ckeConfig" : { "ckeConfig" : {
"extraPlugins":"easyimage, bidi, blockquote, clipboard button, panelbutton, panel, floatpanel, menu indentblock, indentlist, justify, link, list, liststyle, magicline newpage, pagebreak, pastefromword, pastetext" "extraPlugins":"easyimage, bidi, blockquote, clipboard button, panelbutton, panel, floatpanel, menu indentblock, indentlist, justify, link, list, liststyle, magicline newpage, pagebreak, pastefromword, pastetext"
} },
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOjMsIlJvbGVJZCI6WzRdLCJSb2xlQ29kZSI6IkFETSIsIlBvc2l0aW9uIjpudWxsLCJGZWF0dXJlSWQiOlsxLDNdLCJUZW5hbnRJZCI6MiwiRnVsbE5hbWUiOiJBZG1pbiBDSU1CIiwiVXNlck5hbWUiOiJhZG1pbmNpbWIiLCJFbWFpbCI6ImFkbWluLmNpbWJAY2ltYi5jby5pZCIsIlBob25lIjoiMDgxMjM0NTY3ODkzIiwiVmVuZG9ySWQiOm51bGwsImlhdCI6MTY4MTM2ODkxNSwiZXhwIjoxNjgyMDYwMTE1fQ.ab-erK48BWvwOyp5ql6VVgQERtW3_NRneHgJNP_KjHA"
} }
\ No newline at end of file
export const environment = { export const environment = {
production: true, production: true,
"APIBASEURL" : "http://crm.nobubank.com/nobucall-api-v2/", "APIBASEURL" : "http://innodev.vnetcloud.com/nobucall-api-v2/",
"MICROSERVICEURL" : "http://crm.nobubank.com/nobucall-api-log/api/v1/", "MICROSERVICEURL" : "http://crm.nobubank.com/nobucall-api-log/api/v1/",
"SITE_NAME" : "Visionet Helpdesk System", "SITE_NAME" : "Visionet Helpdesk System",
"SITE_LOGO" : "https://i0.wp.com/jogorogo.info/wp-content/uploads/2017/07/logo_visionet.png?fit=879%2C227", "SITE_LOGO" : "https://i0.wp.com/jogorogo.info/wp-content/uploads/2017/07/logo_visionet.png?fit=879%2C227",
...@@ -24,7 +24,7 @@ export const environment = { ...@@ -24,7 +24,7 @@ export const environment = {
"TelponTerputus" : 7 "TelponTerputus" : 7
}, },
"category": { "category": {
"servicesubcategory_id": 7133333 "servicesubcategory_id": 204
}, },
"Team" : { "Team" : {
"EChanelSupportCardOpr" : 26, "EChanelSupportCardOpr" : 26,
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
export const environment = { export const environment = {
production: false, production: false,
"APIBASEURL" : "http://crm.nobubank.com/nobucall-api-v2/", "APIBASEURL" : "http://innodev.vnetcloud.com/nobucall-api-v2/",
"MICROSERVICEURL" : "http://crm.nobubank.com/nobucall-api-log/api/v1/", "MICROSERVICEURL" : "http://innodev.vnetcloud.com/nobucall-history-login/api/v1/",
"SITE_NAME" : "Visionet Helpdesk System", "SITE_NAME" : "Visionet Helpdesk System",
"SITE_LOGO" : "https://i0.wp.com/jogorogo.info/wp-content/uploads/2017/07/logo_visionet.png?fit=879%2C227", "SITE_LOGO" : "https://i0.wp.com/jogorogo.info/wp-content/uploads/2017/07/logo_visionet.png?fit=879%2C227",
"COMPANY_NAME" : "PT. Visionet Data Internasional", "COMPANY_NAME" : "PT. Visionet Data Internasional",
...@@ -28,7 +28,7 @@ export const environment = { ...@@ -28,7 +28,7 @@ export const environment = {
"TelponTerputus" : 7 "TelponTerputus" : 7
}, },
"category": { "category": {
"servicesubcategory_id": 7133333 "servicesubcategory_id": 716
}, },
"Team" : { "Team" : {
"EChanelSupportCardOpr" : 26, "EChanelSupportCardOpr" : 26,
......
...@@ -49,6 +49,16 @@ export class MicroService { ...@@ -49,6 +49,16 @@ export class MicroService {
constructor(private injector: Injector, private http : HttpClient) { } constructor(private injector: Injector, private http : HttpClient) { }
intergrasiListATM() {
const service = this.injector.get(ServiceProxyWeb)
let headers = new HttpHeaders({
'Content-Type': 'application/json',
'access-token' : service.getTokenMicroService
});
let options = { headers: headers };
return this.http.get('http://innodev.vnetcloud.com/metaforce-api-report/v1/report/destination/getDestinationByUserAccess?isActive=false', options);
}
post(url: string, request: object) { post(url: string, request: object) {
var service = this.injector.get(ServiceProxyWeb) var service = this.injector.get(ServiceProxyWeb)
var headers = new HttpHeaders({ var headers = new HttpHeaders({
...@@ -1299,5 +1309,24 @@ export class ServiceProxyWeb { ...@@ -1299,5 +1309,24 @@ export class ServiceProxyWeb {
return this.UserAccessTime; return this.UserAccessTime;
} }
getTeamCategory(categoryID) {
if (Number(categoryID) === Number(CATEGORY)) return 143888;
else null;
}
getTeamAgentCategory(categoryID) {
if (Number(categoryID) === Number(CATEGORY)) return 143891;
else null;
}
_tokenMicroService: string;
setTokenMicroService(token: string) {
this._tokenMicroService = token;
}
get getTokenMicroService() {
return this._tokenMicroService
}
constructor() { } constructor() { }
} }
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment