Commit 7174acae authored by ari_darmawan's avatar ari_darmawan

fix create ticket assign to team

parent 088a2f11
...@@ -50,7 +50,11 @@ ...@@ -50,7 +50,11 @@
<td>{{data.ticket_service_name}}</td> <td>{{data.ticket_service_name}}</td>
<td>{{data.ticket_servicesubcategory_name}}</td> <td>{{data.ticket_servicesubcategory_name}}</td>
<td>{{data.ticket_description}}</td> <td>{{data.ticket_description}}</td>
<td>{{data.ticket_status}}</td> <td>{{data.ticket_status}}
<div *ngIf="data.team_name == null">
( Defect )
</div>
</td>
<td>{{data.ticket_resolved_date | date: 'dd MMMM yyyy HH:mm'}}</td> <td>{{data.ticket_resolved_date | date: 'dd MMMM yyyy HH:mm'}}</td>
<td>{{data.ticket_total_days_resolved}}</td> <td>{{data.ticket_total_days_resolved}}</td>
</tr> </tr>
......
...@@ -764,7 +764,7 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -764,7 +764,7 @@ export class AdminTicketCreateComponent implements OnInit {
if(result.values.code == 0){ if(result.values.code == 0){
AratakaConfig.LoadingPage.hideLoading()
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]]
...@@ -840,7 +840,6 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -840,7 +840,6 @@ export class AdminTicketCreateComponent implements OnInit {
AratakaConfig.LoadingPage.hideLoading() AratakaConfig.LoadingPage.hideLoading()
}, },
(err: HttpErrorResponse) => { (err: HttpErrorResponse) => {
console.log(JSON.stringify(err.error));
AratakaConfig.LoadingPage.hideLoading() AratakaConfig.LoadingPage.hideLoading()
AratakaConfig.Alert.showAlert('Internal Server Error!','alert-danger',2000) AratakaConfig.Alert.showAlert('Internal Server Error!','alert-danger',2000)
}); });
...@@ -870,7 +869,7 @@ export class AdminTicketCreateComponent implements OnInit { ...@@ -870,7 +869,7 @@ export class AdminTicketCreateComponent implements OnInit {
} }
}, },
(err: HttpErrorResponse) => { (err: HttpErrorResponse) => {
console.log(JSON.stringify(err.error)); AratakaConfig.Alert.showAlert(err.error.message,'alert-danger',3000)
AratakaConfig.LoadingPage.hideLoading() AratakaConfig.LoadingPage.hideLoading()
}); });
} }
......
...@@ -191,6 +191,7 @@ ...@@ -191,6 +191,7 @@
<span *ngIf="data.status == 'escalated_ttr'"class='badge badge-pill badge-danger'>ESCALATED TTR</span> <span *ngIf="data.status == 'escalated_ttr'"class='badge badge-pill badge-danger'>ESCALATED TTR</span>
<span *ngIf="data.status == 'assigned'" class='badge badge-pill badge-primary'>ASSIGNED</span> <span *ngIf="data.status == 'assigned'" class='badge badge-pill badge-primary'>ASSIGNED</span>
<span *ngIf="data.status == 'dispatched'" class='badge badge-pill badge-danger'>DISPATCH</span> <span *ngIf="data.status == 'dispatched'" class='badge badge-pill badge-danger'>DISPATCH</span>
<span *ngIf="data.agent_id == 0" class='badge badge-pill' style="background-color: orange;">Defect</span>
<p class="m-1"><small>{{data.title}}</small></p> <p class="m-1"><small>{{data.title}}</small></p>
<p class="m-1"><small><b>{{data.start_date| date: 'dd MMMM yyyy HH:mm'}}</b></small></p> <p class="m-1"><small><b>{{data.start_date| date: 'dd MMMM yyyy HH:mm'}}</b></small></p>
<hr> <hr>
...@@ -247,6 +248,7 @@ ...@@ -247,6 +248,7 @@
<span *ngIf="StatusTicket == 'escalated_ttr'"class='badge badge-pill badge-danger'>ESCALATED TTR</span> <span *ngIf="StatusTicket == 'escalated_ttr'"class='badge badge-pill badge-danger'>ESCALATED TTR</span>
<span *ngIf="StatusTicket == 'assigned'" class='badge badge-pill badge-primary'>ASSIGNED</span> <span *ngIf="StatusTicket == 'assigned'" class='badge badge-pill badge-primary'>ASSIGNED</span>
<span *ngIf="StatusTicket == 'dispatched'" class='badge badge-pill badge-danger'>DISPATCH</span> <span *ngIf="StatusTicket == 'dispatched'" class='badge badge-pill badge-danger'>DISPATCH</span>
<span *ngIf="Agent_ID == 0" class='badge badge-pill' style="background-color: orange;">Defect</span>
&nbsp; &nbsp;
<span *ngIf="CsCabang != ''" class="text-dark"> <span *ngIf="CsCabang != ''" class="text-dark">
, ,
......
...@@ -98,6 +98,7 @@ export class AdminTicketDetailComponent implements OnInit { ...@@ -98,6 +98,7 @@ export class AdminTicketDetailComponent implements OnInit {
] ]
//Model //Model
public create_By_id = null
public CallerID = null public CallerID = null
public TickectContactID = null public TickectContactID = null
public TeamFriendlyName = null public TeamFriendlyName = null
...@@ -110,6 +111,7 @@ export class AdminTicketDetailComponent implements OnInit { ...@@ -110,6 +111,7 @@ export class AdminTicketDetailComponent implements OnInit {
public StartDate = null public StartDate = null
public Origin = null public Origin = null
public StatusTicket = null public StatusTicket = null
public Agent_ID = null
public TicketTeamID = null public TicketTeamID = null
public TicketSolution = null public TicketSolution = null
public PublicConversation = [] public PublicConversation = []
...@@ -278,11 +280,14 @@ export class AdminTicketDetailComponent implements OnInit { ...@@ -278,11 +280,14 @@ export class AdminTicketDetailComponent implements OnInit {
} }
SubmitAsDataByRole(_data){ SubmitAsDataByRole(_data){
if(_data.status == 'new' || _data.status == 'escalated_tto'){ console.log(_data)
this.SubmitAsData = [{ if(_data.status == 'new' || _data.status == "escalated_tto"){
ID : "assign", this.SubmitAsData = [
Name : "Assigned" {
}] ID : "reject",
Name : "Reject"
}
]
} }
else if(_data.status == 'escalated_ttr'){ else if(_data.status == 'escalated_ttr'){
...@@ -419,6 +424,7 @@ export class AdminTicketDetailComponent implements OnInit { ...@@ -419,6 +424,7 @@ export class AdminTicketDetailComponent implements OnInit {
this.StartDate = null this.StartDate = null
this.Origin = null this.Origin = null
this.StatusTicket = null this.StatusTicket = null
this.Agent_ID = null
this.TicketTeamID = null this.TicketTeamID = null
this.PublicConversation = [] this.PublicConversation = []
this.InternalNote = [] this.InternalNote = []
...@@ -533,9 +539,11 @@ export class AdminTicketDetailComponent implements OnInit { ...@@ -533,9 +539,11 @@ export class AdminTicketDetailComponent implements OnInit {
TicketID : this.paramTicketID, TicketID : this.paramTicketID,
TicketClass : this.FinalClass, TicketClass : this.FinalClass,
SubmitAs : this.SubmitAs, SubmitAs : this.SubmitAs,
ResolveByID : this._SP.getUserInformation.values.user_id ResolveByID : this._SP.getUserInformation.values.user_id,
status_ticket: this.StatusTicket,
createByID: this.create_By_id
} }
console.log(Request)
var that = this; var that = this;
AratakaConfig.CallDialog.showModal('Message will sent to customer by email. Are you sure?',{isConfirm : function(){ AratakaConfig.CallDialog.showModal('Message will sent to customer by email. Are you sure?',{isConfirm : function(){
if(that.PublicReplyEditor != '' && that.SubmitAs != ''){ if(that.PublicReplyEditor != '' && that.SubmitAs != ''){
...@@ -803,6 +811,7 @@ export class AdminTicketDetailComponent implements OnInit { ...@@ -803,6 +811,7 @@ export class AdminTicketDetailComponent implements OnInit {
var ObjKey = Object.keys(result.values.objects) var ObjKey = Object.keys(result.values.objects)
var data = result.values.objects[ObjKey[0]] var data = result.values.objects[ObjKey[0]]
this.create_By_id = data.fields.createdby_id;
this.CallerID = data.fields.caller_id this.CallerID = data.fields.caller_id
this.TickectContactID = data.fields.ticket_contact_id this.TickectContactID = data.fields.ticket_contact_id
this.RefNumber = data.fields.ref this.RefNumber = data.fields.ref
...@@ -811,6 +820,7 @@ export class AdminTicketDetailComponent implements OnInit { ...@@ -811,6 +820,7 @@ export class AdminTicketDetailComponent implements OnInit {
this.StartDate = data.fields.start_date this.StartDate = data.fields.start_date
this.Origin = data.fields.origin this.Origin = data.fields.origin
this.StatusTicket = data.fields.status this.StatusTicket = data.fields.status
this.Agent_ID = data.fields.agent_id
this.TicketTeamID = data.fields.team_id this.TicketTeamID = data.fields.team_id
this.TicketSolution = data.fields.solution this.TicketSolution = data.fields.solution
this.PublicConversation = data.fields.public_log.entries.reverse() this.PublicConversation = data.fields.public_log.entries.reverse()
...@@ -1664,7 +1674,7 @@ export class AdminTicketDetailComponent implements OnInit { ...@@ -1664,7 +1674,7 @@ export class AdminTicketDetailComponent implements OnInit {
this._TicketService.TicketHistory(_Request) this._TicketService.TicketHistory(_Request)
.subscribe((result: any) => { .subscribe((result: any) => {
if(result != null){ if(result != null){
//console.log(JSON.stringify(result)) console.log(result)
this.TicketListData = [] this.TicketListData = []
if(result.values != null){ if(result.values != null){
this.TicketListData = result.values.tickets this.TicketListData = result.values.tickets
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
<span style="font-size: 12px;" class="badge badge-pill badge-danger" *ngIf="data.status == 'escalated_ttr'">{{data.status}}</span> <span style="font-size: 12px;" class="badge badge-pill badge-danger" *ngIf="data.status == 'escalated_ttr'">{{data.status}}</span>
<span style="font-size: 12px;" class="badge badge-pill badge-danger" *ngIf="data.status == 'dispatched'">{{data.status}}</span> <span style="font-size: 12px;" class="badge badge-pill badge-danger" *ngIf="data.status == 'dispatched'">{{data.status}}</span>
<span style="font-size: 12px;" class="badge badge-pill badge-primary" *ngIf="data.status == 'redispatched'">{{data.status}}</span> <span style="font-size: 12px;" class="badge badge-pill badge-primary" *ngIf="data.status == 'redispatched'">{{data.status}}</span>
<span style="font-size: 12px;" class="badge badge-pill" style="background-color: orange;" *ngIf="data.agent_id == 0">Defect</span>
</td> </td>
<td>{{data.title}}</td> <td>{{data.title}}</td>
<td>{{data.start_date | date: 'dd MMMM yyyy HH:mm'}}</td> <td>{{data.start_date | date: 'dd MMMM yyyy HH:mm'}}</td>
......
...@@ -161,7 +161,65 @@ export class AdminTicketComponent implements OnInit { ...@@ -161,7 +161,65 @@ export class AdminTicketComponent implements OnInit {
this.KeyFilterStatus = "assigned,escalated_ttr"; this.KeyFilterStatus = "assigned,escalated_ttr";
}else{ } else if (this.RoleID == this.Env.PARAM_SERVICEDESK) {
this.FilterStatusDropDown = [
{
ID : "0",
Name : "All Status"
},
// {
// ID : "assigned,pending,escalated_ttr,resolved",
// Name : "All Status"
// },
{
ID : "assigned",
Name : "Assigned"
},
// {
// ID : "new",
// Name : "New"
// },
{
ID : "resolved",
Name : "Resolved"
},
// {
// ID : "Pending",
// Name : "Pending"
// },
// {
// ID : "escalated_tto",
// Name : "Escalated TTO"
// },
{
ID : "escalated_ttr",
Name : "Escalated TTR"
},
{
ID : "escalated_tto",
Name : "Defect"
},
// {
// ID : "dispatched",
// Name : "Dispatched"
// },
// {
// ID : "redispatched",
// Name : "Redispatched"
// },
{
ID : "rejected",
Name : "Rejected"
},
// {
// ID : "closed",
// Name : "Closed"
// },
]
this.KeyFilterStatus = "0";
} else {
this.FilterStatusDropDown = [ this.FilterStatusDropDown = [
{ {
......
...@@ -16,6 +16,9 @@ export const environment = { ...@@ -16,6 +16,9 @@ export const environment = {
//sit //sit
// ApiUrlBase : 'http://innodev.vnetcloud.com/nobucall-api-sit/', // ApiUrlBase : 'http://innodev.vnetcloud.com/nobucall-api-sit/',
// PROD
// ApiUrlBase : 'http://innodev.vnetcloud.com/nobucall-api-sit/',
ApiUrlBase : 'http://crm.nobubank.com/nobucall-api-v2/', ApiUrlBase : 'http://crm.nobubank.com/nobucall-api-v2/',
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",
......
...@@ -496,7 +496,7 @@ export class TicketService { ...@@ -496,7 +496,7 @@ export class TicketService {
} }
PublicReplySubmit(_data) { PublicReplySubmit(_data) {
console.log(_data)
const service = this.injector.get(ServiceProxyWeb) const service = this.injector.get(ServiceProxyWeb)
var data; var data;
...@@ -521,7 +521,11 @@ export class TicketService { ...@@ -521,7 +521,11 @@ export class TicketService {
{ {
data = { data = {
ticket_class: _data.TicketClass, ticket_class: _data.TicketClass,
solution: _data.Message solution: _data.Message,
ResolveByID: _data.ResolveByID,
UserID : _data.UserID,
status_ticket: _data.status_ticket,
createByID: _data.createByID
} }
endPoint = API_URL +'v3/ticket/reject/' + _data.TicketID endPoint = API_URL +'v3/ticket/reject/' + _data.TicketID
......
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