Commit b69829bb authored by ari_darmawan's avatar ari_darmawan

release fix dropdown category

parent 4ff55834
{ {
"name": "smart-city", "name": "smart-city",
"version": "0.0.0", "version": "2.1.2",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "smart-city", "name": "smart-city",
"version": "0.0.0", "version": "2.1.2",
"dependencies": { "dependencies": {
"@angular/animations": "~7.1.0", "@angular/animations": "~7.1.0",
"@angular/common": "~7.1.0", "@angular/common": "~7.1.0",
......
...@@ -15,7 +15,8 @@ import { AdminTicketCustomerMdComponent } from '../admin-ticket-customer-md/admi ...@@ -15,7 +15,8 @@ import { AdminTicketCustomerMdComponent } from '../admin-ticket-customer-md/admi
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.prod';
import { NzNotificationService } from 'ng-zorro-antd';
import { NzModalService } from 'ng-zorro-antd';
@Component({ @Component({
selector: 'app-admin-ticket-create', selector: 'app-admin-ticket-create',
templateUrl: './admin-ticket-create.component.html', templateUrl: './admin-ticket-create.component.html',
...@@ -99,6 +100,7 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -99,6 +100,7 @@ export class AdminTicketCreateComponent implements OnInit {
public extAgent: string = ""; public extAgent: string = "";
public channel: string = ""; public channel: string = "";
listAgent: any[] = []; listAgent: any[] = [];
private create_date;
search = { search = {
isAgent: false, isAgent: false,
...@@ -111,6 +113,8 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -111,6 +113,8 @@ export class AdminTicketCreateComponent implements OnInit {
private _TicketService : TicketService, private _TicketService : TicketService,
public _SP : ServiceProxyWeb, public _SP : ServiceProxyWeb,
private API: MicroService, private API: MicroService,
private notification: NzNotificationService,
private modalService: NzModalService,
private activatedRoute: ActivatedRoute) { private activatedRoute: ActivatedRoute) {
this.activatedRoute.queryParams.subscribe(params => { this.activatedRoute.queryParams.subscribe(params => {
...@@ -157,7 +161,6 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -157,7 +161,6 @@ export class AdminTicketCreateComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
if(this.RoleID != this._SP.PARAM_AGENT){ if(this.RoleID != this._SP.PARAM_AGENT){
this.router.navigate(['admin']); this.router.navigate(['admin']);
} }
...@@ -336,7 +339,7 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -336,7 +339,7 @@ export class AdminTicketCreateComponent implements OnInit {
var valid = true; var valid = true;
this.inputRequired.forEach(element => { this.inputRequired.forEach(element => {
//console.log(element.nativeElement.value) //console.log(element.nativeElement.value)
if(element.nativeElement.value == ""){ if(element.nativeElement.value == "" || this.SubTopic_ID == '' || this.Category_ID == '' || !this.Category_ID){
valid = false; valid = false;
return false; return false;
} }
...@@ -344,8 +347,8 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -344,8 +347,8 @@ export class AdminTicketCreateComponent implements OnInit {
var Request = { var Request = {
caller_id : this.CustomerMdData.ID, caller_id : this.CustomerMdData.ID,
service_id : Number(this.SubTopic_ID), service_id : this.SubTopic_ID == '' ? '' : Number(this.SubTopic_ID),
servicesubcategory_id : Number(this.Category_ID), servicesubcategory_id : this.Category_ID == '' ? '' : Number(this.Category_ID),
title : this.Subject, title : this.Subject,
description : this.Description, description : this.Description,
cscabang : this.CSCabang, cscabang : this.CSCabang,
...@@ -847,16 +850,17 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -847,16 +850,17 @@ export class AdminTicketCreateComponent implements OnInit {
}); });
} }
private json_log_response_query
InsertNewTicketAPI(_Request){ InsertNewTicketAPI(_Request){
//console.log("Request Create",JSON.stringify(_Request)) //console.log("Request Create",JSON.stringify(_Request))
// this.create_date = moment()
AratakaConfig.LoadingPage.showLoading('Creating Ticket') AratakaConfig.LoadingPage.showLoading('Creating Ticket')
this._TicketService.CreateTicketWithContact(_Request) this._TicketService.CreateTicketWithContact(_Request)
.subscribe((result: any) => { .subscribe((result: any) => {
if(result != null){ if(result != null){
if(result.values.code == 0){ if(result.values.code == 0){
// AratakaConfig.LoadingPage.hideLoading() // AratakaConfig.LoadingPage.hideLoading()
// this.json_log_response_query = result.values.log_query;
var ObjKey = Object.keys(result.values.objects) var ObjKey = Object.keys(result.values.objects)
var created = result.values.objects[ObjKey[0]] var created = result.values.objects[ObjKey[0]]
const params = { const params = {
...@@ -969,11 +973,42 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -969,11 +973,42 @@ export class AdminTicketCreateComponent implements OnInit {
.subscribe((result: any) => { .subscribe((result: any) => {
if(result != null){ if(result != null){
if(result.values != undefined){ if(result.values != undefined){
// const diffInSeconds = moment().diff(moment(this.create_date), 'seconds');
// console.log('diffInSeconds',diffInSeconds)
// if (diffInSeconds > 20) {
// this.modalService.create({
// nzTitle: 'Log Query',
// nzClosable: false,
// nzContent: `<b>Log Response Query Create Ticket</b>
// <p></p>
// <p></p>
// <p></p>
// <p>create person: <b>${this.json_log_response_query.message_create_person}</b></p>
// <p>get person: <b>${this.json_log_response_query.message_get_person}</b></p>
// <p>get Contact List: <b>${this.json_log_response_query.message_get_contact_list}</b></p>
// <p>request Type: <b>${this.json_log_response_query.message_request_type}</b></p>
// <p>create Ticket: <b>${this.json_log_response_query.message_create_ticket}</b></p>
// <p>get Ticket: <b>${this.json_log_response_query.message_get_ticket}</b></p>
// <p></p>
// <p></p>
// <p></p>
// <b>Log Response Query Assigned Ticket</b>
// <p>get Ticket: <b>${result.values.log_query.ticket}</b></p>
// <p>Query lnkcontacttoticket: <b>${result.values.log_query.lnkcontacttoticket}</b></p>
// <p>Assigned Ticket: <b>${result.values.log_query.assigned_ticket}</b></p>`,
// nzFooter: null
// });
// setTimeout(() => {
// this.modalService.closeAll()
// this.router.navigate(['admin/ticket/detail/' + _Request.ticket_assign]);
// }, 2500);
// } else {
setTimeout(() => { setTimeout(() => {
this.router.navigate(['admin/ticket/detail/' + _Request.ticket_assign]); this.router.navigate(['admin/ticket/detail/' + _Request.ticket_assign])
AratakaConfig.LoadingPage.hideLoading() AratakaConfig.LoadingPage.hideLoading()
}, 2000); }, 1000);
// }
}else{ }else{
......
...@@ -38,7 +38,7 @@ import { PipeEncryptoJs } from '../pipe/pipe-global.pipe'; ...@@ -38,7 +38,7 @@ import { PipeEncryptoJs } from '../pipe/pipe-global.pipe';
import { PipeDencryptoJs } from '../pipe/pipe-global.pipe'; import { PipeDencryptoJs } from '../pipe/pipe-global.pipe';
*/ */
import { NzSelectModule } from 'ng-zorro-antd'; import { NzSelectModule } from 'ng-zorro-antd';
import { NgZorroAntdModule, NzPopoverModule, NzToolTipModule } from 'ng-zorro-antd'; import { NgZorroAntdModule, NzPopoverModule, NzToolTipModule, NzNotificationModule, NzModalModule } from 'ng-zorro-antd';
import { AdminTestPingComponent } from './admin-test-ping/admin-test-ping.component'; import { AdminTestPingComponent } from './admin-test-ping/admin-test-ping.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -83,7 +83,9 @@ import { AdminTestPingComponent } from './admin-test-ping/admin-test-ping.compon ...@@ -83,7 +83,9 @@ import { AdminTestPingComponent } from './admin-test-ping/admin-test-ping.compon
NzSelectModule, NzSelectModule,
NgZorroAntdModule, NgZorroAntdModule,
NzPopoverModule, NzPopoverModule,
NzToolTipModule NzToolTipModule,
NzNotificationModule,
NzModalModule
] ]
}) })
export class AdminModule { } export class AdminModule { }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
export const environment = { export const environment = {
production: false, production: false,
"APIBASEURL" : "http://localhost:9825/", "APIBASEURL" : "http://crm.nobubank.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",
......
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