Commit 4abfb1fb authored by ari_darmawan's avatar ari_darmawan

dropdown search

parent 36437990
......@@ -11,6 +11,43 @@
text-transform: uppercase;
}
.arataka-custom-autocomplete{
border: 1px solid #cccccc;
padding: 0px;
border-radius: 5px;
margin-top: -5px;
position: absolute;
background: #ffffff !important;
z-index: 999;
width: 90%;
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;
}
.TabsCustom:hover{
color: #222;
border-bottom: 3px solid #d18b5d;
......
......@@ -46,11 +46,24 @@
</div>
<div class="form-group">
<label class="text-muted">Assignee Agent <span class="text-danger">*</span></label>
<div [ngClass]="{'arataka-custom-autocomplete': search.isAgent}" *ngIf="search.isAgent">
<input type="text" class="form-control form-control-sm" [(ngModel)]="AssigneeTeamAgent_Name"
placeholder="All Agent : Type to search" (blur)="onBlur()"
(keyup)="onSeacrhSelectAgent($event)"/>
<span class="arataka-chevron-autocomplete"></span>
<ng-container *ngFor="let data of AssigneeTeamAgentData; let i = index">
<p (click)="AssigneeTeamAgent_ID = data.ID; search.isAgent=false; AssigneeTeamAgent_Name = data.Name"
class="arataka-custom-autocomplete-itemlist"
>{{data.Name}}</p>
</ng-container>
</div>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="AssigneeTeamAgent_ID"
[disabled]="IsFormTeamAgentDisabled">
[disabled]="IsFormTeamAgentDisabled"
*ngIf="!search.isAgent"
(click)="search.isAgent = true">
<ng-container *ngFor="let AssigneeTeamAgent of AssigneeTeamAgentData; let i = index">
<option value="{{AssigneeTeamAgent.ID}}">{{AssigneeTeamAgent.Name}}</option>
</ng-container>
......@@ -82,7 +95,7 @@
class="form-control form-control-sm select-style"
[(ngModel)]="Topic_ID"
[disabled]="IsFormTeamAgentDisabled"
(change)="TopicChange()">
(change)="TopicChange(); Category_Name = ''; Category_ID = ''; SubTopic_Name= ''; SubTopic_ID = '';">
<ng-container *ngFor="let Topic of TopicData; let i = index">
<option value="{{Topic.ID}}">{{Topic.Name}}</option>
</ng-container>
......@@ -90,12 +103,25 @@
</div>
<div class="form-group">
<label class="text-muted">Sub Topic <span class="text-danger">*</span></label>
<div [ngClass]="{'arataka-custom-autocomplete': search.isSubTopic}" *ngIf="search.isSubTopic">
<input type="text" class="form-control form-control-sm" [(ngModel)]="SubTopic_Name"
placeholder="All Sub Topic : Type to search" (blur)="onBlur()"
(keyup)="onSeacrhSelectSubTopic($event)"/>
<span class="arataka-chevron-autocomplete"></span>
<ng-container *ngFor="let data of SubTopicData; let i = index">
<p (click)="SubTopic_ID = data.ID; search.isSubTopic=false; SubTopic_Name = data.Name; SubTopicChange(); Category_Name = ''; Category_ID = '';"
class="arataka-custom-autocomplete-itemlist"
>{{data.Name}}</p>
</ng-container>
</div>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="SubTopic_ID"
[disabled]="IsFormSubTopicDisabled"
(change)="SubTopicChange()">
(change)="SubTopicChange()"
*ngIf="!search.isSubTopic"
(click)="search.isSubTopic = true">
<ng-container *ngFor="let SubTopic of SubTopicData; let i = index">
<option value="{{SubTopic.ID}}">{{SubTopic.Name}}</option>
</ng-container>
......@@ -103,11 +129,24 @@
</div>
<div class="form-group">
<label class="text-muted">Category <span class="text-danger">*</span></label>
<div [ngClass]="{'arataka-custom-autocomplete': search.isCategory}" *ngIf="search.isCategory">
<input type="text" class="form-control form-control-sm" [(ngModel)]="Category_Name"
placeholder="All Category : Type to search" (blur)="onBlur()"
(keyup)="onSeacrhSelectCategory($event)"/>
<span class="arataka-chevron-autocomplete"></span>
<ng-container *ngFor="let data of CategoryData; let i = index">
<p (click)="Category_ID = data.ID; search.isCategory=false; Category_Name = data.Name"
class="arataka-custom-autocomplete-itemlist"
>{{data.Name}}</p>
</ng-container>
</div>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="Category_ID"
[disabled]="IsFormCategoryDisabled">
[disabled]="IsFormCategoryDisabled"
*ngIf="!search.isCategory"
(click)="search.isCategory = true">
<ng-container *ngFor="let Category of CategoryData; let i = index">
<option value="{{Category.ID}}">{{Category.Name}}</option>
</ng-container>
......
......@@ -153,7 +153,9 @@ export class AdminTicketOnpicDetailComponent implements OnInit {
public ChildTicket = []
public TicketEvent = []
public Category_Name : string = ""
public SubTopic_Name : string = ""
public AssigneeTeamAgent_Name: string = ""
public EmailLogsData = []
public EmailLogsDetail = undefined
......@@ -219,6 +221,13 @@ export class AdminTicketOnpicDetailComponent implements OnInit {
}]
public MacroValue = ""
search = {
isAgent: false,
isSubTopic: false,
isCategory: false
}
constructor(injector: Injector,
private router: Router,
private route: ActivatedRoute,
......@@ -276,6 +285,53 @@ export class AdminTicketOnpicDetailComponent implements OnInit {
}
}
private tempAgent = [];
onSeacrhSelectAgent(evt: any) {
const searchTerm = evt.srcElement.value.toLowerCase();
if (searchTerm == "") {
this.AssigneeTeamAgentData = this.tempAgent;
} else {
const cloneObj = this.tempAgent;
this.AssigneeTeamAgentData = cloneObj.filter((item) => {
return item['Name'].toLowerCase().includes(searchTerm);
})
}
}
private tempSubTopic = [];
onSeacrhSelectSubTopic(evt: any) {
const searchTerm = evt.srcElement.value.toLowerCase();
if (searchTerm == "") {
this.SubTopicData = this.tempSubTopic;
} else {
const cloneObj = this.tempSubTopic;
this.SubTopicData = cloneObj.filter((item) => {
return item['Name'].toLowerCase().includes(searchTerm);
})
}
}
private tempCategory = [];
onSeacrhSelectCategory(evt: any) {
const searchTerm = evt.srcElement.value.toLowerCase();
if (searchTerm == "") {
this.CategoryData = this.tempCategory;
} else {
const cloneObj = this.tempCategory;
this.CategoryData = cloneObj.filter((item) => {
return item['Name'].toLowerCase().includes(searchTerm);
})
}
}
onBlur() {
setTimeout(() => {
this.search.isAgent = false;
this.search.isSubTopic = false;
this.search.isCategory = false;
}, 200);
}
SubmitAsDataByRole(_data){
if(_data.status == 'new' || _data.status == 'escalated_tto'){
this.SubmitAsData = [{
......@@ -1203,7 +1259,10 @@ export class AdminTicketOnpicDetailComponent implements OnInit {
}
}
this.AssigneeTeamAgentData.sort((a: any, b: any) => a.Name.localeCompare(b.Name))
this.AssigneeTeamAgentData.unshift({ID: '', Name: 'No Select'})
this.tempAgent = this.AssigneeTeamAgentData;
this.IsFormTeamDisabled = false
this.IsFormTeamAgentDisabled = false
......@@ -1449,22 +1508,23 @@ export class AdminTicketOnpicDetailComponent implements OnInit {
this._TicketService.GetSubTopic(_Request)
.subscribe((result: any) => {
if(result != null){
this.SubTopicData = []
this.SubTopicData = [];
this.tempSubTopic = [];
//console.log(JSON.stringify(result))
if(result.values != null){
this.SubTopicData.push({
ID: "",
Name: "No Select"
})
this.SubTopic_ID = ""
// this.SubTopicData.push({
// ID: "",
// Name: "No Select"
// })
// this.SubTopic_ID = ""
this.CategoryData = [{
ID: "",
Name: "No Select"
}]
this.Category_ID = ""
// this.CategoryData = [{
// ID: "",
// Name: "No Select"
// }]
// this.Category_ID = ""
for(var i=0; i < result.values.length; i++){
this.SubTopicData.push({
......@@ -1472,6 +1532,9 @@ export class AdminTicketOnpicDetailComponent implements OnInit {
Name: result.values[i].name
})
}
this.SubTopicData.sort((a: any, b: any) => a.Name.localeCompare(b.Name))
this.SubTopicData.unshift({ID: '', Name: 'No Select'})
this.tempSubTopic = this.SubTopicData;
this.IsFormTopicDisabled = false
this.IsFormSubTopicDisabled = false
......@@ -1512,16 +1575,17 @@ export class AdminTicketOnpicDetailComponent implements OnInit {
this._TicketService.GetCategory(_Request)
.subscribe((result: any) => {
if(result != null){
this.CategoryData = []
this.CategoryData = [];
this.tempCategory = [];
//console.log(JSON.stringify(result))
if(result.values != null){
this.CategoryData.push({
ID: "",
Name: "No Select"
})
this.Category_ID = ""
// this.CategoryData.push({
// ID: "",
// Name: "No Select"
// })
// this.Category_ID = ""
for(var i=0; i < result.values.length; i++){
this.CategoryData.push({
......@@ -1529,7 +1593,9 @@ export class AdminTicketOnpicDetailComponent implements OnInit {
Name: result.values[i].name
})
}
this.CategoryData.sort((a: any, b: any) => a.Name.localeCompare(b.Name))
this.CategoryData.unshift({ID: '', Name: 'No Select'})
this.tempCategory = this.CategoryData;
// this.Category_ID = this.CategoryData[0].ID
this.IsFormTopicDisabled = false
......
......@@ -9,6 +9,43 @@
background: #FAFAFA;
}
.arataka-custom-autocomplete{
border: 1px solid #cccccc;
padding: 0px;
border-radius: 5px;
margin-top: -5px;
position: absolute;
background: #ffffff !important;
z-index: 999;
width: 90%;
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;
}
.custom-minus-date{
position: absolute;
z-index: 99;
......
......@@ -88,16 +88,23 @@ export class AdminTicketCreateComponent implements OnInit {
public AssigneeTeam_ID : string = ""
public AssigneeTeamAgent_ID : string = ""
public AssigneeTeamAgent_Name: string = ""
public Topic_ID : string = ""
public SubTopic_ID : string = ""
public SubTopic_Name : string = ""
public Category_ID : string = ""
public Category_Name : string = ""
public Complaintment_ID : string = ""
public idAgent: string = "";
public extAgent: string = "";
public channel: string = "";
listAgent: any[] = [];
search = {
isAgent: false,
isSubTopic: false,
isCategory: false
}
constructor(injector: Injector,
private router: Router,
private FormBuilder : FormBuilder,
......@@ -178,6 +185,53 @@ export class AdminTicketCreateComponent implements OnInit {
// this.requestAgent();
}
private tempAgent = [];
onSeacrhSelectAgent(evt: any) {
const searchTerm = evt.srcElement.value.toLowerCase();
if (searchTerm == "") {
this.AssigneeTeamAgentData = this.tempAgent;
} else {
const cloneObj = this.tempAgent;
this.AssigneeTeamAgentData = cloneObj.filter((item) => {
return item['Name'].toLowerCase().includes(searchTerm);
})
}
}
private tempSubTopic = [];
onSeacrhSelectSubTopic(evt: any) {
const searchTerm = evt.srcElement.value.toLowerCase();
if (searchTerm == "") {
this.SubTopicData = this.tempSubTopic;
} else {
const cloneObj = this.tempSubTopic;
this.SubTopicData = cloneObj.filter((item) => {
return item['Name'].toLowerCase().includes(searchTerm);
})
}
}
private tempCategory = [];
onSeacrhSelectCategory(evt: any) {
const searchTerm = evt.srcElement.value.toLowerCase();
if (searchTerm == "") {
this.CategoryData = this.tempCategory;
} else {
const cloneObj = this.tempCategory;
this.CategoryData = cloneObj.filter((item) => {
return item['Name'].toLowerCase().includes(searchTerm);
})
}
}
onBlur() {
setTimeout(() => {
this.search.isAgent = false;
this.search.isSubTopic = false;
this.search.isCategory = false;
}, 200);
}
//Take By User ------------------------------------------------------------------------
replaceAtPosition(number,index,replacement){
number += '';//to string
......@@ -477,10 +531,10 @@ export class AdminTicketCreateComponent implements OnInit {
if(result.values != null){
this.AssigneeTeamAgentData.push({
ID: "",
Name: "No Select"
})
// this.AssigneeTeamAgentData.push({
// ID: "",
// Name: "No Select"
// })
this.AssigneeTeamAgent_ID = ""
......@@ -496,7 +550,9 @@ export class AdminTicketCreateComponent implements OnInit {
}
}
this.AssigneeTeamAgentData.sort((a: any, b: any) => a.Name.localeCompare(b.Name))
this.AssigneeTeamAgentData.unshift({ID: '', Name: "No Select"})
this.tempAgent = this.AssigneeTeamAgentData;
//this.AssigneeTeamAgent_ID = this.AssigneeTeamAgentData[0].ID
}else{
......@@ -591,7 +647,6 @@ export class AdminTicketCreateComponent implements OnInit {
})
}
}
// this.Topic_ID = this.TopicData[0].ID
// this.GettingSubTopicListAPI({ID : this.TopicData[0].ID})
......@@ -618,31 +673,32 @@ export class AdminTicketCreateComponent implements OnInit {
}
GettingSubTopicListAPI(_Request){
this.SubTopicData = [{
ID : "",
Name : "Retrieving.."
}]
// this.SubTopicData = [{
// ID : "",
// Name : "Retrieving.."
// }]
this.SubTopic_ID = ""
this._TicketService.GetSubTopic(_Request)
.subscribe((result: any) => {
if(result != null){
this.SubTopicData = []
this.SubTopicData = [];
this.tempSubTopic = [];
//console.log(JSON.stringify(result))
if(result.values != null){
this.SubTopicData.push({
ID: "",
Name: "No Select"
})
this.SubTopic_ID = ""
// this.SubTopicData.push({
// ID: "",
// Name: "No Select"
// })
// this.SubTopic_ID = ""
this.CategoryData = [{
ID: "",
Name: "No Select"
}]
this.Category_ID = ""
// this.CategoryData = [{
// ID: "",
// Name: "No Select"
// }]
// this.Category_ID = ""
for(var i=0; i < result.values.length; i++){
this.SubTopicData.push({
......@@ -650,7 +706,9 @@ export class AdminTicketCreateComponent implements OnInit {
Name: result.values[i].name
})
}
this.SubTopicData.sort((a: any, b: any) => a.Name.localeCompare(b.Name))
this.SubTopicData.unshift({ID: '', Name: "No Select"})
this.tempSubTopic = this.SubTopicData
// this.SubTopic_ID = this.SubTopicData[0].ID
// this.GettingCategoryListAPI({ID : this.SubTopicData[0].ID})
......@@ -686,15 +744,16 @@ export class AdminTicketCreateComponent implements OnInit {
this._TicketService.GetCategory(_Request)
.subscribe((result: any) => {
if(result != null){
this.CategoryData = []
this.CategoryData = [];
this.tempCategory = [];
//console.log(JSON.stringify(result))
if(result.values != null){
this.CategoryData.push({
ID: "",
Name: "No Select"
})
// this.CategoryData.push({
// ID: "",
// Name: "No Select"
// })
this.Category_ID = ""
for(var i=0; i < result.values.length; i++){
......@@ -703,7 +762,9 @@ export class AdminTicketCreateComponent implements OnInit {
Name: result.values[i].name
})
}
this.CategoryData.sort((a: any, b: any) => a.Name.localeCompare(b.Name))
this.CategoryData.unshift({ID: '', Name: "No Select"})
this.tempCategory = this.CategoryData;
// this.Category_ID = this.CategoryData[0].ID
}else{
......
......@@ -11,6 +11,44 @@
text-transform: uppercase;
}
.arataka-custom-autocomplete{
border: 1px solid #cccccc;
padding: 0px;
border-radius: 5px;
margin-top: -5px;
position: absolute;
background: #ffffff !important;
z-index: 999;
width: 90%;
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;
}
.TabsCustom:hover{
color: #222;
border-bottom: 3px solid #d18b5d;
......
......@@ -104,11 +104,24 @@
</div>
<div class="form-group">
<label class="text-muted">Assignee Agent <span class="text-danger">*</span></label>
<div [ngClass]="{'arataka-custom-autocomplete': search.isAgent}" *ngIf="search.isAgent">
<input type="text" class="form-control form-control-sm" [(ngModel)]="AssigneeTeamAgent_Name"
placeholder="All Agent : Type to search" (blur)="onBlur()"
(keyup)="onSeacrhSelectAgent($event)"/>
<span class="arataka-chevron-autocomplete"></span>
<ng-container *ngFor="let data of AssigneeTeamAgentData; let i = index">
<p (click)="AssigneeTeamAgent_ID = data.ID; search.isAgent=false; AssigneeTeamAgent_Name = data.Name"
class="arataka-custom-autocomplete-itemlist"
>{{data.Name}}</p>
</ng-container>
</div>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="AssigneeTeamAgent_ID"
[disabled]="IsFormTeamAgentDisabled">
[disabled]="IsFormTeamAgentDisabled"
*ngIf="!search.isAgent"
(click)="search.isAgent = true">
<ng-container *ngFor="let AssigneeTeamAgent of AssigneeTeamAgentData; let i = index">
<option value="{{AssigneeTeamAgent.ID}}">{{AssigneeTeamAgent.Name}}</option>
</ng-container>
......@@ -144,7 +157,7 @@
class="form-control form-control-sm select-style"
[(ngModel)]="Topic_ID"
[disabled]="IsFormTeamAgentDisabled"
(change)="TopicChange()">
(change)="TopicChange(); Category_Name = ''; Category_ID = ''; SubTopic_Name= ''; SubTopic_ID = '';">
<ng-container *ngFor="let Topic of TopicData; let i = index">
<option value="{{Topic.ID}}">{{Topic.Name}}</option>
</ng-container>
......@@ -152,12 +165,25 @@
</div>
<div class="form-group">
<label class="text-muted">Sub Topic <span class="text-danger">*</span></label>
<div [ngClass]="{'arataka-custom-autocomplete': search.isSubTopic}" *ngIf="search.isSubTopic">
<input type="text" class="form-control form-control-sm" [(ngModel)]="SubTopic_Name"
placeholder="All Sub Topic : Type to search" (blur)="onBlur()"
(keyup)="onSeacrhSelectSubTopic($event)"/>
<span class="arataka-chevron-autocomplete"></span>
<ng-container *ngFor="let data of SubTopicData; let i = index">
<p (click)="SubTopic_ID = data.ID; search.isSubTopic=false; SubTopic_Name = data.Name; SubTopicChange(); Category_Name = ''; Category_ID = '';"
class="arataka-custom-autocomplete-itemlist"
>{{data.Name}}</p>
</ng-container>
</div>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="SubTopic_ID"
[disabled]="IsFormSubTopicDisabled"
(change)="SubTopicChange()">
(change)="SubTopicChange()"
*ngIf="!search.isSubTopic"
(click)="search.isSubTopic = true">
<ng-container *ngFor="let SubTopic of SubTopicData; let i = index">
<option value="{{SubTopic.ID}}">{{SubTopic.Name}}</option>
</ng-container>
......@@ -165,11 +191,24 @@
</div>
<div class="form-group">
<label class="text-muted">Category <span class="text-danger">*</span></label>
<div [ngClass]="{'arataka-custom-autocomplete': search.isCategory}" *ngIf="search.isCategory">
<input type="text" class="form-control form-control-sm" [(ngModel)]="Category_Name"
placeholder="All Category : Type to search" (blur)="onBlur()"
(keyup)="onSeacrhSelectCategory($event)"/>
<span class="arataka-chevron-autocomplete"></span>
<ng-container *ngFor="let data of CategoryData; let i = index">
<p (click)="Category_ID = data.ID; search.isCategory=false; Category_Name = data.Name"
class="arataka-custom-autocomplete-itemlist"
>{{data.Name}}</p>
</ng-container>
</div>
<select type="text"
#inputRequired
class="form-control form-control-sm select-style"
[(ngModel)]="Category_ID"
[disabled]="IsFormCategoryDisabled">
[disabled]="IsFormCategoryDisabled"
*ngIf="!search.isCategory"
(click)="search.isCategory = true">
<ng-container *ngFor="let Category of CategoryData; let i = index">
<option value="{{Category.ID}}">{{Category.Name}}</option>
</ng-container>
......
......@@ -142,13 +142,16 @@ export class AdminTicketDetailComponent implements OnInit {
public AssigneeTeam_ID : string = ""
public AssigneeTeamAgent_ID : string = ""
public AssigneeTeamAgent_Name: string = ""
public AssigneeTeamDestionationID : string = ""
public AssigneeTeamAgentDestionationID : string = ""
public Topic_ID : string = ""
public SubTopic_ID : string = ""
public SubTopic_Name : string = ""
public Category_ID : string = ""
public Category_Name : string = ""
public Complaintment_ID : string = ""
public TicketListData = []
......@@ -229,6 +232,12 @@ export class AdminTicketDetailComponent implements OnInit {
detailBodyEmail: any = {};
search = {
isAgent: false,
isSubTopic: false,
isCategory: false
}
constructor(injector: Injector,
private router: Router,
private route: ActivatedRoute,
......@@ -358,6 +367,53 @@ export class AdminTicketDetailComponent implements OnInit {
this.SubmitAs = this.SubmitAsData[0].ID
}
private tempAgent = [];
onSeacrhSelectAgent(evt: any) {
const searchTerm = evt.srcElement.value.toLowerCase();
if (searchTerm == "") {
this.AssigneeTeamAgentData = this.tempAgent;
} else {
const cloneObj = this.tempAgent;
this.AssigneeTeamAgentData = cloneObj.filter((item) => {
return item['Name'].toLowerCase().includes(searchTerm);
})
}
}
private tempSubTopic = [];
onSeacrhSelectSubTopic(evt: any) {
const searchTerm = evt.srcElement.value.toLowerCase();
if (searchTerm == "") {
this.SubTopicData = this.tempSubTopic;
} else {
const cloneObj = this.tempSubTopic;
this.SubTopicData = cloneObj.filter((item) => {
return item['Name'].toLowerCase().includes(searchTerm);
})
}
}
private tempCategory = [];
onSeacrhSelectCategory(evt: any) {
const searchTerm = evt.srcElement.value.toLowerCase();
if (searchTerm == "") {
this.CategoryData = this.tempCategory;
} else {
const cloneObj = this.tempCategory;
this.CategoryData = cloneObj.filter((item) => {
return item['Name'].toLowerCase().includes(searchTerm);
})
}
}
onBlur() {
setTimeout(() => {
this.search.isAgent = false;
this.search.isSubTopic = false;
this.search.isCategory = false;
}, 200);
}
AssigneeTeamChange(){
if(this.AssigneeTeam_ID != ""){
this.GettingTeamAgentListAPI({ID : parseInt(this.AssigneeTeam_ID)})
......@@ -1302,6 +1358,9 @@ export class AdminTicketDetailComponent implements OnInit {
}
}
this.AssigneeTeamAgentData.sort((a: any, b: any) => a.Name.localeCompare(b.Name))
this.AssigneeTeamAgentData.unshift({ID: '', Name: 'No Select'})
this.tempAgent = this.AssigneeTeamAgentData;
this.IsFormTeamDisabled = false
this.IsFormTeamAgentDisabled = false
......@@ -1548,22 +1607,23 @@ export class AdminTicketDetailComponent implements OnInit {
this._TicketService.GetSubTopic(_Request)
.subscribe((result: any) => {
if(result != null){
this.SubTopicData = []
this.SubTopicData = [];
this.tempSubTopic = [];
//console.log(JSON.stringify(result))
if(result.values != null){
this.SubTopicData.push({
ID: "",
Name: "No Select"
})
this.SubTopic_ID = ""
// this.SubTopicData.push({
// ID: "",
// Name: "No Select"
// })
// this.SubTopic_ID = ""
this.CategoryData = [{
ID: "",
Name: "No Select"
}]
this.Category_ID = ""
// this.CategoryData = [{
// ID: "",
// Name: "No Select"
// }]
// this.Category_ID = ""
for(var i=0; i < result.values.length; i++){
this.SubTopicData.push({
......@@ -1571,6 +1631,9 @@ export class AdminTicketDetailComponent implements OnInit {
Name: result.values[i].name
})
}
this.SubTopicData.sort((a: any, b: any) => a.Name.localeCompare(b.Name))
this.SubTopicData.unshift({ID: '', Name: 'No Select'})
this.tempSubTopic = this.SubTopicData;
this.IsFormTopicDisabled = false
this.IsFormSubTopicDisabled = false
......@@ -1611,15 +1674,16 @@ export class AdminTicketDetailComponent implements OnInit {
this._TicketService.GetCategory(_Request)
.subscribe((result: any) => {
if(result != null){
this.CategoryData = []
this.CategoryData = [];
this.tempCategory = [];
//console.log(JSON.stringify(result))
if(result.values != null){
this.CategoryData.push({
ID: "",
Name: "No Select"
})
// this.CategoryData.push({
// ID: "",
// Name: "No Select"
// })
this.Category_ID = ""
for(var i=0; i < result.values.length; i++){
......@@ -1628,7 +1692,9 @@ export class AdminTicketDetailComponent implements OnInit {
Name: result.values[i].name
})
}
this.CategoryData.sort((a: any, b: any) => a.Name.localeCompare(b.Name))
this.CategoryData.unshift({ID: '', Name: 'No Select'})
this.tempCategory = this.CategoryData;
// this.Category_ID = this.CategoryData[0].ID
this.IsFormTopicDisabled = false
......
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