| { | { | ||||
| "render": function ( data, type, row ) { | "render": function ( data, type, row ) { | ||||
| if(data != ''){ | if(data != ''){ | ||||
| if (row.formT.indexOf("B") >= 0){ | |||||
| var link1 = "{{ url('/customer-service/work-order/add/schedule') }}"+"/non-prelaid/"+data; | |||||
| var link2 = "{{ url('/customer-service/work-order/add/schedule') }}"+"/prelaid/"+data; | |||||
| return '<div class="btn-group"><a href="" class="tablectrl_medium bPurple tipS" data-toggle="dropdown" original-title="Work Order"><span>W/O</span></a> <ul class="dropdown-menu pull-right"><li><a href="'+link1+'">Non Prelaid W/O</a></li><li><a href="'+link2+'"> Prelaid W/O</a></li></ul></div>'; | |||||
| }else { | |||||
| if (data.indexOf("Non/") >= 0) { | if (data.indexOf("Non/") >= 0) { | ||||
| var split = data.split('Non/'); | var split = data.split('Non/'); | ||||
| var link = "{{ url('/customer-service/work-order/add/schedule') }}"+"/non-prelaid/"+split[1]; | var link = "{{ url('/customer-service/work-order/add/schedule') }}"+"/non-prelaid/"+split[1]; | ||||
| var link = "{{ url('/customer-service/work-order/add/schedule') }}"+"/prelaid/"+data; | var link = "{{ url('/customer-service/work-order/add/schedule') }}"+"/prelaid/"+data; | ||||
| return '<a href="'+link+'" class="tablectrl_medium bPurple tipS" title="Create New W/O"><span>W/O</span></a>'; | return '<a href="'+link+'" class="tablectrl_medium bPurple tipS" title="Create New W/O"><span>W/O</span></a>'; | ||||
| } | } | ||||
| } | |||||
| }else { | }else { | ||||
| return data; | return data; | ||||
| } | } |