Commit 4e3e9a29 authored by ari_darmawan's avatar ari_darmawan

validasi resolve by agent

parent 808c4660
......@@ -318,12 +318,14 @@ export class AdminTicketCreateComponent implements OnInit {
if(this.RoleID == this._SP.PARAM_AGENT){
if(this.TeamID == this.Env.Team.CsCabangBranchAgent){
AllowedTeam = [
this.Env.Team.ServiceDesk
this.Env.Team.ServiceDesk,
Number(this.Env.category.servicesubcategory_id) == Number(this.Category_ID) ? this.Env.Team.EChanelSupportCardOpr : ''
]
}else{
AllowedTeam = [
this.Env.Team.ServiceDesk,
this.TeamID
this.TeamID,
Number(this.Env.category.servicesubcategory_id) == Number(this.Category_ID) ? this.Env.Team.EChanelSupportCardOpr : ''
]
}
}
......
......@@ -247,7 +247,6 @@ export class AdminTicketDetailComponent implements OnInit {
})
this.ConversationViewByRole()
this.ConversationReplyNoteViewByRole()
// PublicReplySubmit
......@@ -260,12 +259,14 @@ export class AdminTicketDetailComponent implements OnInit {
x.Hide = false
})
if(this.RoleID == this._SP.PARAM_SERVICEDESK){
this.ConversationReplyNote[0].Selected = true
}
if(this.RoleID != this._SP.PARAM_SERVICEDESK){
this.ConversationReplyNote[1].Selected = true
this.ConversationReplyNote[0].Hide = true
if (Number(this.itemDetailTicket.servicesubcategory_id) == Number(this.Env.category.servicesubcategory_id)) {
this.ConversationReplyNote[0].Selected = true;
this.ConversationReplyNote[0].Hide = false;
} else if (this.RoleID == this._SP.PARAM_SERVICEDESK) {
this.ConversationReplyNote[0].Selected = true;
} else if (this.RoleID != this._SP.PARAM_SERVICEDESK) {
this.ConversationReplyNote[1].Selected = true;
this.ConversationReplyNote[0].Hide = true;
}
}
......@@ -284,70 +285,65 @@ export class AdminTicketDetailComponent implements OnInit {
SubmitAsDataByRole(_data){
console.log(_data)
if(_data.status == 'new' || _data.status == "escalated_tto"){
if (Number(this.itemDetailTicket.servicesubcategory_id) == Number(this.Env.category.servicesubcategory_id)) {
this.SubmitAsData = [
{
ID : "",
Name : "No Select"
},
{
ID : "resolve",
Name : "Resolved"
}]
} else {
if (_data.status == 'new' || _data.status == "escalated_tto") {
this.SubmitAsData = [
{
ID : "reject",
Name : "Reject"
}
]
} else if (_data.status == 'escalated_ttr') {
this.SubmitAsData = [
{
ID : "assign",
Name : "Assigned"
},
{
ID : "resolve",
Name : "Resolved"
}]
} else if(_data.status == 'assigned') {
this.SubmitAsData = [{
ID : "assign",
Name : "Assigned"
},
{
ID : "resolve",
Name : "Resolved"
},
{
ID : "reject",
Name : "Reject"
}
]
}
else if(_data.status == 'escalated_ttr'){
this.SubmitAsData = [
{
ID : "assign",
Name : "Assigned"
},
{
ID : "resolve",
Name : "Resolved"
}]
// }else if(_data.status == 'assigned' || _data.status == 'escalated_ttr'){
}else if(_data.status == 'assigned'){
this.SubmitAsData = [{
ID : "assign",
Name : "Assigned"
},
{
ID : "resolve",
Name : "Resolved"
},
{
ID : "reject",
Name : "Reject"
}]
}
else if(_data.status == 'resolved'){
// this.SubmitAsData = [{
// ID : "close",
// Name : "Closed"
// }]
this.SubmitAsData = [{
ID : "",
Name : "No Select"
}]
}
else if(_data.status == 'closed'){
// this.SubmitAsData = [{
// ID : "reopen",
// Name : "Re-open"
// }]
this.SubmitAsData = [{
ID : "",
Name : "No Select"
}]
}else{
this.SubmitAsData = [{
ID : "",
Name : "Nothing to Select"
}]
}]
} else if(_data.status == 'resolved') {
this.SubmitAsData = [{
ID : "",
Name : "No Select"
}]
} else if(_data.status == 'closed') {
this.SubmitAsData = [{
ID : "",
Name : "No Select"
}]
} else {
this.SubmitAsData = [{
ID : "",
Name : "Nothing to Select"
}]
}
}
this.SubmitAs = this.SubmitAsData[0].ID
}
AssigneeTeamChange(){
......@@ -791,6 +787,7 @@ export class AdminTicketDetailComponent implements OnInit {
}
//API Function -------------------------------------------------------------------------
private itemDetailTicket: any = {};
GettingTicketDetailAPI(_Request){
console.log(_Request)
AratakaConfig.LoadingPage.showLoading('Retrieving data...')
......@@ -813,7 +810,7 @@ export class AdminTicketDetailComponent implements OnInit {
var ObjKey = Object.keys(result.values.objects)
var data = result.values.objects[ObjKey[0]]
this.itemDetailTicket = {...data.fields};
this.create_By_id = data.fields.createdby_id;
this.CallerID = data.fields.caller_id
this.TickectContactID = data.fields.ticket_contact_id
......@@ -843,7 +840,7 @@ export class AdminTicketDetailComponent implements OnInit {
//ServiceDeskLogsID must be null first at get detail ticket
this.ServiceDeskLogsID = null
this.ChangeAgentViewAssginee(data)
this.ConversationReplyNoteViewByRole()
this._TicketService.GetTopicDetail({ServiceID : data.fields.service_id})
......@@ -1791,7 +1788,9 @@ export class AdminTicketDetailComponent implements OnInit {
subject : result.values[i].subject,
attachments : objAttachment,
status : result.values[i].status,
body : result.values[i].body
body : result.values[i].body,
trigger_id_friendlyname : result.values[i].trigger_id_friendlyname,
action_id_friendlyname : result.values[i].action_id_friendlyname
})
}
......
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