How to use actionIcons method in Playwright Internal

Best JavaScript code snippet using playwright-internal

all_indiajoborders.js

Source:all_indiajoborders.js Github

copy

Full Screen

1;(function(angular){2 "use strict";3 4 angular.module('allIndiaJobOrders',['ngMaterial', 'ngMessages','ui.bootstrap','jcs-autoValidate', 'DatePicker','ngJsonExportExcel'])5 6 .controller("allIndiaJobOrdersController",function($rootScope, $scope, blockUI, $http, $timeout, $filter, $mdDialog, $mdMedia, $window, $state,dateRangeService){7 $('.ranges').empty();8 var priorityval = $("#priority").val();9 var statusval = $("#status").val();10 var jobtypeval = $("#jobtype").val();11 var jobbelongsval = $("#jobbelongsto").val();12 13 14 $scope.currentDateWithTime = new Date();15 $scope.candidates = [];16 $scope.candidates.push({});17 var candidateData = [];18 var expansionData = [];19 $scope.jobOrderTable = true;20 $scope.onload = function(){21 22 $scope.$on('$viewContentLoaded', function() { 23 // initialize core components24 App.initAjax();25 }); 2627 $scope.Created = { endDate: moment(), startDate:moment().subtract(1, 'month')};28 $scope.searchjoborder();29 if($rootScope.jobOrderInserted){30 $scope.Created = { endDate: moment(), startDate: moment()};31 $rootScope.jobOrderInserted = false;32 $scope.searchjoborder();33 }34 35 $scope.ranges = {36 'All Time' : [moment({'year' :2012, 'month' :5, 'day' :1}), moment()],37 'Today': [moment(),moment()], 38 'Last 1 month': [moment().subtract(1, 'month'), moment()],39 'Last 3 months': [moment().subtract(3, 'month'), moment()],40 'Last 6 months': [moment().subtract(6, 'month'), moment()], 41 'Last 1 year': [moment().subtract(12, 'month'), moment()]42 }; 4344 }45 46 $scope.exportData = function(){47 $window.location = 'jobOrder/exportJobOrders?strPriorities='+$scope.searchFields.strPriorities+'&strStatuses='+$scope.searchFields.strStatuses48 +'&strJobTypes='+$scope.searchFields.strJobTypes+'&startDate='+ $scope.formatteddate(moment().subtract(6, 'year'))+'&endDate='+ $scope.formatteddate(moment())49 +'&strJobBelongsTo='+$scope.searchFields.strJobBelongsTo+'&jobOrderId='+$scope.searchFields.jobOrderId;50 }51 52 $scope.searchjoborder = function()53 {54 $scope.pageNumber = 1;55 candidateData = [];56 dispalyTable();57 $("#searchtable").css("display", "block");58 search_joborder();59 }60 61 //This is to formate dates62 $scope.formatteddate = function(inputData){63 if(inputData instanceof Date){64 var expDate = new Date(inputData);65 var month = '' + (expDate.getMonth() + 1);66 var day = '' + expDate.getDate();67 var year = expDate.getFullYear();68 if (month.length < 2) month = '0' + month;69 if (day.length < 2) day = '0' + day;70 return [year, month, day].join('-');71 }else{72 return inputData;73 }74 };75 76 function search_joborder(){77 $(".underlay").show();78 $scope.searchFields= {79 "strPriorities" : $("#priority").val().toUpperCase(),80 "strStatuses" : $("#status").val().toUpperCase(),81 "strJobTypes" :($("#jobtype").val().toUpperCase()).replace(/ +/g, ""),82 "jobOrderTimeIntervalMap" :$scope.Created,83 //"strJobBelongsTo" : $("#jobbelongsto").val().toUpperCase(),84 "jobOrderId" : $scope.joborderid85 }86 87 88 var dateRangeActiveValue = $(".ranges").children("ul").children("li[class='active']").text();89 if(!dateRangeActiveValue){90 dateRangeActiveValue = constants.LAST_ONE_MONTH;91 }92 if(dateRangeService.selectedDateAction(dateRangeActiveValue,$scope.Created)){93 $scope.searchFields.jobOrderTimeIntervalMap = dateRangeService.selectedDateAction(dateRangeActiveValue,$scope.Created);94 }95// alert($('#allJobOrderRangesId').val());96 if($('#allJobOrderRangesId').val() && $('#allJobOrderRangesId').val()!=''){97 $scope.searchFields.jobOrderTimeIntervalMap.startDate = $('#allJobOrderRangesId').val().split(' ')[0];98 $scope.searchFields.jobOrderTimeIntervalMap.endDate = $('#allJobOrderRangesId').val().split(' ')[2];99 }100 101 //alert(JSON.stringify($scope.searchFields.jobOrderTimeIntervalMap));102 var response = $http.post("India_JobOrder/getAllIndiaJobOrders",$scope.searchFields);103 response.success(function(data, status,headers, config) 104 {105 $scope.allJobOrdersList = data;106 candidateData = [];107 108 $scope.exportAllJobOrdersList = [];109 110 111 for (var i = 0; i < data.length; i++) {112 var candidateObj = data[i];113 candidateData.push(candidateObj);114 115 var obj = {jobOrderId:data[i].jobOrderId,116 priority: data[i].priority,status: data[i].status,117 type: data[i].type,title:data[i].title,client: data[i].client,location: data[i].location,dm: data[i].dm,assignedTo: data[i].assignedTo,118 updatedDate: data[i].updatedDate,sbm: data[i].sbm,activeDays: data[i].activeDays};119 $scope.exportAllJobOrdersList.push(obj);120 }121 dispalyTable();122 $(".underlay").hide();123 });124 response.error(function(data, status, headers, config){125 if(status == constants.FORBIDDEN){126 location.href = 'login.html';127 }else{ 128 $state.transitionTo("ErrorPage",{statusvalue : status});129 }130 });131// $(".underlay").hide();132 }133 $scope.jobOrderTable = true;134 135 function dispalyTable() {136 $scope.candidates137 .forEach(function(candidate, index) {138 candidate.allJobOrderBsTableControl = {139 options : {140 data : candidateData || {},141 striped : true,142 pagination : true,143 paginationVAlign : "both",144 pageSize : 10,145 pageList : [ 10, 20, 50 ],146 search : false,147 showColumns : false,148 pageNumber: ($scope.pageNumber? $scope.pageNumber:1),149 showRefresh : false,150 clickToSelect : false,151 showToggle : false,152 detailView : true,153 maintainSelected : true,154 columns : [155 {156 field : 'jobOrderId',157 title : 'ID',158 align : 'left',159 160 sortable : true161 },162 {163 field : 'priority',164 title : 'Priority',165 align : 'left',166 formatter : priorityWithImage,167 sortable : true168 },169 {170 field : 'status',171 title : 'Status',172 align : 'left',173 formatter : statusWithImage,174 sortable : true175 },176 {177 field : 'type',178 title : 'Type',179 align : 'left',180 formatter : typeWithImage,181 sortable : true182 },183 {184 field : 'title',185 title : 'Title',186 align : 'left',187 sortable : true188 },189 {190 field : 'client',191 title : 'Client',192 align : 'left',193 sortable : true194 },195 {196 field : 'location',197 title : 'Location',198 align : 'left',199 sortable : true200 },201 {202 field : 'dm',203 title : 'DM',204 align : 'left',205 sortable : true206 },207 {208 field : 'assignedTo',209 title : 'Assigned To',210 align : 'left',211 sortable : true212 },213 {214 field : 'updatedDate',215 title : 'Updated On',216 align : 'left',217 sortable : true218 },219 {220 field : 'sbm',221 title : 'Sbm',222 align : 'left',223 sortable : true224 },225 {226 field : 'activeDays',227 title : 'Active Days',228 align : 'left',229 sortable : true230 },231 {232 field : 'actions',233 title : 'Actions',234 align : 'left',235 sortable : false,236 events : window.operateEvents,237 formatter : actionFormatter238 } ],239 240 onPageChange: function (number, size) {241 $scope.pageNumber = number;242 $scope.pageSize = size;243 244 },245 246 onExpandRow : function(index,247 row, $detail) {248 var jobOrderId = row.jobOrderId;249 var response = $http250 .post('India_JobOrder/submittalDetails?jobOrderId='251 + jobOrderId);252 response253 .success(function(254 data,255 status,256 headers,257 config) {258 expansionData = [];259 for (var i = 0; i < data.length; i++) {260 var submittalObj = data[i];261 expansionData262 .push(submittalObj);263 }264 var tableres = '';265 /*var tableres = '<div class="tbdiv">';266 tableres += '<div><button type="button" class="btn btn-primary blue" onclick="createSubmittal('+row.jobOrderId+',\''+row.status+'\')">Create Submittal</button></div></div>';267 tableres += 268 '<div class="tbseconddiv"><label>Search By:</label><select class="subrowdd" id="searchBy_'+row.jobOrderId+'_Id"><option value="0">select</option><option value="title_'+row.title+'">Title</option>'+269 '<option value="location_'+row.location+'">Location</option><option value="keyskills_'+row.keySkills+'">Key Skills</option></select></div>'+270 '<div class="tbthirddiv"><button type="button" class="btn btn-primary blue" onclick="viewResumes(searchBy_'+row.jobOrderId+'_Id)">View Matching Resumes</button></div><div class="clearboth"></div></div>'*/271 272 if (expansionData != '') {273 tableres +='<table class="innertable">'274 + '<tr><th>Created On</th><th>Updated on</th><th>Created By</th><th>Status</th><th>Candidate</th><th></th></tr>'275 for (var i = 0; i < expansionData.length; i++) {276 tableres += '<tr><td>'277 +(expansionData[i].createdOn)278 + '</td>'279 + '<td>'280 +(expansionData[i].updatedOn)281 + '</td>'282 + '<td>'283 + expansionData[i].createdBy284 + '</td>'285 + '<td>'286 + expansionData[i].status 287 + '</td>'288 + '<td>'289 + expansionData[i].candidateName 290 + '</td>'291 if(row.status!=constants.CLOSED){292 tableres += '<td><a class="view actionIcons" title="View Detail" onclick="view'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-search" style="font-size:12px;"></i></a>'293 + '<a class="edit actionIcons" title="Edit" href="#/india_submitals/edit_indiasubmitals?submittalId='+expansionData[i].submittalId+'&pageName='+constants.ALLINDIAJOBORDERS+'"><i class="fa fa-edit" style="font-size:12px;"></i></a>'294 + '<a class="remove actionIcons" title="Remove" onclick="delete'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>'295 +'</td>';296 }else297 {298 tableres += '<td><a class="view actionIcons" title="View Detail" onclick="view'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-search" style="font-size:12px;"></i></a>'299 //+ '<a class="edit actionIcons" title="Edit" href="#/submitals/editsubmitals?submittalId='+expansionData[i].submittalId+'&pageName='+constants.ALLJOBORDERS+'"><i class="fa fa-edit" style="font-size:12px;"></i></a>'300 + '<a class="remove actionIcons" title="Remove" onclick="delete'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>'301 +'</td>';302 }303 tableres +='</tr>'304 +'<script type="text/javascript">'305 +'function view'+expansionData[i].submittalId+'Submittal(id){'306 +'$.ajax({'307 +'url:"India_JobOrder/getSubmittalEventHistoryBySubmittalId/"+id,'308 +'type:"GET",'309 +'data:null,'310 +'dataType:"json",'311 +'success:function(data){'312 +'var viewsubmittaldata="";'313 +'for(var i=0; i<data.length; i++){'314 +'viewsubmittaldata=viewsubmittaldata + "<div><b>" + data[i].status + " - <i>" + data[i].strCreatedOn + "</i></b> <span>"+ (data[i].notes!='+"undefined"+'?data[i].notes:"") + "</span></div>";'315 +'$("#viewsubmittalid").html(viewsubmittaldata);'316 +'}'317 +'$("#submitalstatus").show();'318 +'}'319 +'});'320 +'}'321 +'</script>'322 323 +'<script type="text/javascript">'324 +'function delete'+expansionData[i].submittalId+'Submittal(delId){'325 +'var deletesubmittal="";'326 +'deletesubmittal = deletesubmittal+ "<div><label>Reason <i id='+"poperr"+'>Reason Should be more than 20 characters</i></label><textarea placeholder='+"Reason&nbsp;For&nbsp;Delete"+' rows='+8+' cols='+40+' id='+"deleteReason"+'></textarea></div>";'327 +'deletesubmittal = deletesubmittal+"<div><button type='+"button"+' class='+"popupbtn"+' onclick='+"savedelreason(\"+delId+\")"+'>Save</button></div>";'328 +'deletesubmittal = deletesubmittal+"<div><button type='+"button"+' class='+"popupbtn"+' onclick='+"canceldelreason()"+'>cancel</button></div>";'329 +'$("#deletesubmittal").html(deletesubmittal);'330 +'$("#submitaldelete").show();'331 +'}'332 +'</script>'333 334 +'<script type="text/javascript">'335 +'function savedelreason(delId){'336 +'var deleteReason = $("#deleteReason").val();'337 +'if(deleteReason.length>20){'338 +'$("#poperr").hide();'339 +'$.ajax({'340 +'url:"India_JobOrder/deleteSubmittal?submittalID=\"+delId+\"&reason=\"+deleteReason+\"",'341 +'type:"GET",'342 +'data:null,'343 +'dataType:"text",'344 +'success:function(data){'345 +'$("#submitaldelete").hide();'346 +'angular.element("#allIndiaJobOrdersController").scope().searchjoborder();'347 +'angular.element("#allIndiaJobOrdersController").scope().$apply() '348 +'}'349 +'});'350 +'}'351 +'else{'352 +'$("#poperr").show();'353 +'}'354 +'}'355 +'</script>'356 357 +'<script type="text/javascript">'358 +'function canceldelreason(){'359 +'$("#submitaldelete").hide();'360 +'}'361 +'</script>'362 }363 } else {364 tableres += '<table class="innertable">'365 + '<tr><th>Created On</th><th>Updated on</th><th>Created By</th><th>Status</th><th>Candidate</th></tr>'366 + '<tr><td colspan="5" align="center">No Submittals Found</td></tr>'367 }368 /*tableres += '</table><script type="text/javascript">function viewResumes(id){if((document.getElementById(id.id).value)==0){ $.growl .error({message : "Select SearchBy Field for Viewing Matching Resumes"});} else{ window.location="#/candidates/search?paramValue="+document.getElementById(id.id).value}}</script>'369 +'<script type="text/javascript">function createSubmittal(job_orderId,orderStatus){'370 +'if(!(orderStatus === constants.CLOSED)){'371 +'window.location="#/india_submitals/create_indiasubmitals?jobOrder="+job_orderId+"&pageName="+constants.ALLINDIAJOBORDERS'372 +'}else{'373 +'$("#viewsubmittalid").html("The Selected Joborder is Closed. Please Reopen the Joborder");'374 +'$("#submitalstatus").show();'375 +'}}'376 +'</script>'*/377 $detail378 .html(tableres);379 380 });381 response.error(function(data, status, headers, config){382 if(status == constants.FORBIDDEN){383 location.href = 'login.html';384 }else{ 385 $state.transitionTo("ErrorPage",{statusvalue : status});386 }387 });388 },389 }390 };391 392 393 function priorityWithImage(value, row,394 index) {395 if(row.priority == constants.HIGH){396 return [397 398 '<i class="fa fa-circle" aria-hidden="true" style="color:red;"></i>',399 '&nbsp;<label>'+row.priority+'</label>'400 ]401 .join('');402 }403 if(row.priority == constants.MEDIUM){404 return [405 406 '<i class="fa fa-circle" aria-hidden="true" style="color:#ff9900;"></i>',407 '&nbsp;<label>'+row.priority+'</label>'408 ]409 .join('');410 }411 if(row.priority == constants.LOW){412 return [413 414 '<i class="fa fa-circle" aria-hidden="true" style="color:green;"></i>',415 '&nbsp;<label>'+row.priority+'</label>'416 ]417 .join('');418 }419 }420 421 function statusWithImage(value, row,422 index) {423 if(row.status == constants.OPEN){424 return [425 426 '<i class="fa fa-arrow-circle-right" aria-hidden="true" style="color:#00a3cc;" title="OPEN"></i>',427 '&nbsp;<label>'+row.status+'</label>'428 ]429 .join('');430 }431 if(row.status == constants.ASSIGNED){432 return [433 434 '<i class="fa fa-user" aria-hidden="true" style="color:#3399ff;" title="ASSIGNED"></i>',435 '&nbsp;<label>'+row.status+'</label>'436 ]437 .join('');438 }439 if(row.status == constants.HOLD){440 return [441 442 '<i class="fa fa-user" aria-hidden="true" style="color:#FF6347;" title="HOLD"></i>',443 '&nbsp;<label>'+row.status+'</label>'444 ]445 .join('');446 }447 if(row.status == constants.REOPEN){448 return [449 450 '<i class="fa fa-folder-open-o" aria-hidden="true" title="REOPEN" style="color:#cc6600;"></i>',451 '&nbsp;<label>'+row.status+'</label>'452 ]453 .join('');454 }455 if(row.status == constants.CLOSED){456 return [457 458 '<i class="fa fa-times" aria-hidden="true" style="color:#ff4d4d;" title="CLOSED"></i>',459 '&nbsp;<label>'+row.status+'</label>'460 ]461 .join('');462 }463 if(row.status == constants.FILLED){464 return [465 466 '<i class="fa fa-check-square-o" aria-hidden="true" style="color:#2db300;" title="FILLED"></i>',467 '&nbsp;<label>'+row.status+'</label>'468 ]469 .join('');470 }471 }472 function typeWithImage(value, row,473 index) {474 if(row.type == constants.PERMANENT){475 return [476 477 '<i class="fa fa-link" aria-hidden="true" title="PERMANENT" style="color:#336d30;"></i>',478 '&nbsp;<label>'+row.type+'</label>'479 ]480 .join('');481 }482 if(row.type == constants.CONTRACT){483 return [484 485 '<i class="fa fa-chain-broken" aria-hidden="true" style="color:#ff0000;" title="CONTRACT"></i>',486 '&nbsp;<label>'+row.type+'</label>'487 ]488 .join('');489 }490 if(row.type == constants.BOTH){491 return [492 493 '<i class="fa fa-venus-double" aria-hidden="true" title="BOTH" style="color:#804000;"></i>',494 '&nbsp;<label>'+row.type+'</label>'495 ]496 .join('');497 }498 if(row.type == constants.NOTSPECIFIED){499 return [500 501 '<i class="fa fa-arrows-alt" aria-hidden="true" title="NOTSPECIFIED" style="color:#c96dad;"></i>',502 '&nbsp;<label>'+row.type+'</label>'503 ]504 .join('');505 }506 }507 508 /* Table button action formatters */509510 function actionFormatter(value, row,511 index) {512 //alert($rootScope.rsLoginUser.userRole);513 if($rootScope.rsLoginUser.userRole == constants.IN_Recruiter){514 if(!(row.status === constants.CLOSED)){515 return [516 517 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',518 '<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',519 ]520 .join('');521 }else{522 return [523 524 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',525 ]526 .join('');527 }528 }529 530 531 if($rootScope.rsLoginUser.userRole == constants.IN_DM || $rootScope.rsLoginUser.userRole == constants.IN_TL){532 if(!(row.status === constants.CLOSED)){533 return [534 //'<a ><img class="hotlist actionIcons" id = "hotimg'+ row.jobOrderId+ '" flex-gt-md="auto" title="' + hotTitle+ '" width="12" height="12" src='+ src + ' /></a>',535 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',536 /*'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',*/537 '<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',538 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',539 /*'<a class="edit actionIcons" title="Edit JobOrder"><i class="fa fa-edit" style="font-size:12px;"></i></a>',*/540 /*'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',*/541 542 ]543 .join('');544 }else{545 return [546 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',547 /*'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',*/548 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',549 /*'<a class="edit actionIcons" title="Edit JobOrder"><i class="fa fa-edit" style="font-size:12px;"></i></a>',*/550 /*'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',*/551 552 ]553 .join('');554 }555 }556 /* if($rootScope.rsLoginUser.userRole == constants.ADM){557 if(!(row.status === constants.CLOSED)){558 return [559 //'<a ><img class="hotlist actionIcons" id = "hotimg'+ row.jobOrderId+ '" flex-gt-md="auto" title="' + hotTitle+ '" width="12" height="12" src='+ src + ' /></a>',560 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',561 '<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',562 '<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',563 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',564 '<a class="edit actionIcons" title="Edit JobOrder"><i class="fa fa-edit" style="font-size:12px;"></i></a>'565 566 ]567 .join('');568 }else{569 return [570 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',571 '<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',572 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',573 '<a class="edit actionIcons" title="Edit JobOrder"><i class="fa fa-edit" style="font-size:12px;"></i></a>'574 575 ]576 .join('');577 }578 }*/579 580 /* if($rootScope.rsLoginUser.userRole == constants.DM || $rootScope.rsLoginUser.userRole == constants.ADM){581 if(!(row.status === constants.CLOSED)){582 return [583584 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',585 '<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',586 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> '587 ]588 .join('');589 }590 else{591 return [592593 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',594 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> '595 ]596 .join('');597 }598 }*/599 600 if($rootScope.rsLoginUser.userRole == constants.DivisionHead || $rootScope.rsLoginUser.userRole == constants.Administrator || $rootScope.rsLoginUser.userRole == constants.HR || $rootScope.rsLoginUser.userRole == constants.EM || $rootScope.rsLoginUser.userRole == constants.Manager){601 if(!(row.status === constants.CLOSED)){602 return [603 604 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',605 '<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',606 '<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',607 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',608 '<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',609 ]610 .join('');611 }612 else{613 return [614 615 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',616 '<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',617 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',618 '<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',619 ]620 .join('');621 }622 }623 }624625 /* Table button actions functionalities */626 window.operateEvents = {627628 /* View Resume details */629 'click .view' : function(e, value,630 row, index) {631 var jobOrderId = row.jobOrderId;632 $mdDialog633 .show({634 controller : DialogController,635 templateUrl : 'views/dialogbox/indiajoborderdetails.html',636 parent : angular637 .element(document.body),638 targetEvent : e,639 locals : {640 rowData : row,641 },642 clickOutsideToClose : true,643 });644 },645 646 'click .copy' : function(e, value,647 row, index) {648 var jobOrderId = row.jobOrderId;649 var response = $http650 .get('India_JobOrder/copyJobOrder/'+ jobOrderId);651 response652 .success(function(data,653 status,654 headers, config) {655 search_joborder();656 $.growl .notice({message : " Job Order Copied Successfully "});657 });658 response.error(function(data, status, headers, config){659 if(status == constants.FORBIDDEN){660 location.href = 'login.html';661 }else{ 662 $state.transitionTo("ErrorPage",{statusvalue : status});663 }664 });665 },666 667 'click .download' : function(e,668 value, row, index) {669 670 var jobOrderId = row.jobOrderId;671 var candidateresumeData=[];672 var objresume = null;673 var response = $http.post('India_JobOrder/downloadJobOrder',row);674 675 $window.location = 'India_JobOrder/downloadJobOrder/'+jobOrderId;676 677 },678679 'click .remove' : function(e,680 value, row, index) {681682 $mdDialog683 .show(684 {685 controller : DialogController,686 templateUrl : 'views/dialogbox/deletejoborder.html',687 parent : angular688 .element(document.body),689 targetEvent : e,690 locals : {691 rowData : row,692 },693 clickOutsideToClose : true,694 });695 },696 697 'click .plus' : function(e,698 value, row, index) {699 var job_orderId = row.jobOrderId;700 window.location="#/india_submitals/create_indiasubmitals?jobOrder="+job_orderId+"&pageName="+constants.ALLINDIAJOBORDERS;701 }702 };703 704 function DialogController($scope,705 $mdDialog, rowData) {706 $scope.row = rowData;707 var jobordid = rowData.jobOrderId;708 $scope.hide = function() {709 $mdDialog.hide();710 };711712 $scope.cancel = function() {713 $mdDialog.cancel();714 };715716 $scope.deleteQuery = function() {717 718 var response = $http.get('India_JobOrder/deleteJobOrder/'+jobordid);719 response.success(function(data, status, headers, config) {720 search_joborder();721 $.growl .notice({title : "Deleted", message : rowData.jobOrderId + " Successfully Deleted "});722 });723 724 response.error(function(data, status, headers, config){725 if(status == constants.FORBIDDEN){726 location.href = 'login.html';727 }else{ 728 $state.transitionTo("ErrorPage",{statusvalue : status});729 }730 });731 732 $mdDialog.hide();733 };734 }735 });736 737 function getDate(fulldate){738 var month = ( '0' + (fulldate.getMonth()+1) ).slice( -2 );739 var date = ( '0' + (fulldate.getDate()) ).slice( -2 );740 var year = fulldate.getFullYear();741 var totaldate = year + "-" + month + "-" + date;742 return totaldate;743 }744 745 $scope.getTimeFnc = function(){746 $scope.currentDateWithTime = new Date();747 }748 749 $scope.myjobordersreset = function()750 {751 $("div[class='ranges'] li").removeClass("active");752 $("div[class='ranges'] li:contains('Last 1 month')").addClass("active");753 $scope.Created = { endDate: moment(), startDate:moment().subtract(1, 'month')};754 755 var currentDate = new Date();756 var oneMonthBeforeDate = moment().subtract(1, 'month').toDate();757 var finaldate = getDate(oneMonthBeforeDate) + " - " + getDate(currentDate);758 $("input[type='daterange']").val(finaldate);759 $scope.joborderid = undefined;760 761 762 var elementarry = priorityval.split(", ");763 var inputcheck = $("#priority").siblings(".ddlist").children("li").children("input");764 inputcheck.each(function(){765 766 $(this).removeAttr("checked");767 })768 for(var i=0; i<elementarry .length; i++)769 {770 inputcheck.each(function(){771 772 if($(this).val() == elementarry [i])773 {774 $(this).prop("checked", true);775 }776 })777 }778 $("#priority").val(priorityval);779 $("#priority").siblings(".blankmsg").hide();780 781 782 var elementarry = statusval.split(", ");783 var inputcheck = $("#status").siblings(".ddlist").children("li").children("input");784 inputcheck.each(function(){785 786 $(this).removeAttr("checked");787 })788 for(var i=0; i<elementarry .length; i++)789 {790 inputcheck.each(function(){791 792 if($(this).val() == elementarry [i])793 {794 $(this).prop("checked", true);795 }796 })797 }798 $("#status").val(statusval);799 $("#status").siblings(".blankmsg").hide();800 801 802 var elementarry = jobtypeval.split(", ");803 var inputcheck = $("#jobtype").siblings(".ddlist").children("li").children("input");804 inputcheck.each(function(){805 806 $(this).removeAttr("checked");807 })808 for(var i=0; i<elementarry .length; i++)809 {810 inputcheck.each(function(){811 812 if($(this).val() == elementarry [i])813 {814 $(this).prop("checked", true);815 }816 })817 }818 $("#jobtype").val(jobtypeval);819 $("#jobtype").siblings(".blankmsg").hide();820 821 822 /* var elementarry = jobbelongsval.split(", ");823 var inputcheck = $("#jobbelongsto").siblings(".ddlist").children("li").children("input");824 inputcheck.each(function(){825 826 $(this).removeAttr("checked");827 })828 for(var i=0; i<elementarry .length; i++)829 {830 inputcheck.each(function(){831 832 if($(this).val() == elementarry [i])833 {834 $(this).prop("checked", true);835 }836 })837 }838 $("#jobbelongsto").val(jobbelongsval);839 $("#jobbelongsto").siblings(".blankmsg").show();*/840 841 842 }843 }844845 }); ...

Full Screen

Full Screen

categoryjoborderslist.js

Source:categoryjoborderslist.js Github

copy

Full Screen

1;(function(angular){2 "use strict";3 4 angular.module("categoryjobordersreport",[])5 .controller("categoryjoborderscontroller",function($rootScope, $scope, blockUI, $http, $timeout, $filter, $mdDialog, $mdMedia, $window, $state,dateRangeService, $stateParams) {6 7 $scope.currentDateWithTime = new Date();8 $scope.candidates = [];9 $scope.candidates.push({});10 var candidateData = [];11 var expansionData = [];12 $scope.jobOrderTable = false;13 var strStatuses = null;14 //var obj = {dmname : $stateParams.dmname, startdate : $stateParams.startDate, enddate : $stateParams.endDate, strStatuses : strStatuses};15 $scope.onload = function(){16 $scope.searchjoborder();17 }18 19 $scope.searchjoborder = function()20 {21 $scope.pageNumber = 1;22 candidateData = [];23 dispalyTable();24 25 26 if($stateParams.dmName == "" || $stateParams.dmName == null || $stateParams.dmName == undefined)27 {28 categoryjoborders();29 }30 else31 {32 dmcategoryjoborders();33 }34 35 }36 37 function categoryjoborders() {38 39 $scope.getobj = {40 "startDate" : $stateParams.startDate,41 "endDate" : $stateParams.endDate,42 "status" : $stateParams.status,43 "timePeriod" : $stateParams.timePeriod,44 "category" : $stateParams.category.replace("%2F","/")45 46 };47 48// alert("SEND OBJ::"+JSON.stringify($scope.getobj));49 var response = $http.post("customReports/getJobOrdersByCategoryWithTime",$scope.getobj);50 response.success(function(data, status,headers, config) 51 {52 $scope.allJobOrdersList = data;53 candidateData = [];54 $scope.exportAllJobOrdersList = [];55 for (var i = 0; i < data.length; i++) {56 var candidateObj = data[i];57 candidateData.push(candidateObj);58 59 var obj = {jobOrderId:data[i].jobOrderId,60 category: data[i].category,61 priority: data[i].priority,status: data[i].status,62 type: data[i].type,title:data[i].title,client: data[i].client,location: data[i].location,dm: data[i].dm,assignedTo: data[i].assignedTo,63 updatedDate: data[i].updatedDate,sbm: data[i].sbm,activeDays: data[i].activeDays};64 $scope.exportAllJobOrdersList.push(obj);65 }66 dispalyTable();67 });68 response.error(function(data, status, headers, config){69 if(status == constants.FORBIDDEN){70 location.href = 'login.html';71 }else{ 72 $state.transitionTo("ErrorPage",{statusvalue : status});73 }74 });75 76 }77 78 79 80 81 82 83 84 85 86 87 function dmcategoryjoborders() {88 89 $scope.dmgetobj = {90 "startDate" : $stateParams.startDate,91 "endDate" : $stateParams.endDate,92 "status" : $stateParams.status.toUpperCase(),93 "dmName" : $stateParams.dmName,94 "category" : $stateParams.category.replace("%2F","/")95 96 };97 98// alert("SEND OBJ::"+JSON.stringify($scope.dmgetobj));99 var response = $http.post("customReports/getJobOrdersByCategoryAndDM",$scope.dmgetobj);100 response.success(function(data, status,headers, config) 101 {102 $scope.allJobOrdersList = data;103 candidateData = [];104 $scope.exportAllJobOrdersList = [];105 for (var i = 0; i < data.length; i++) {106 var candidateObj = data[i];107 candidateData.push(candidateObj);108 109 var obj = {jobOrderId:data[i].jobOrderId,110 category: data[i].category,111 priority: data[i].priority,status: data[i].status,112 type: data[i].type,title:data[i].title,client: data[i].client,location: data[i].location,dm: data[i].dm,assignedTo: data[i].assignedTo,113 updatedDate: data[i].updatedDate,sbm: data[i].sbm,activeDays: data[i].activeDays};114 $scope.exportAllJobOrdersList.push(obj);115 }116 dispalyTable();117 });118 response.error(function(data, status, headers, config){119 if(status == constants.FORBIDDEN){120 location.href = 'login.html';121 }else{ 122 $state.transitionTo("ErrorPage",{statusvalue : status});123 }124 });125 126 }127 128 129 130 131 132 133 134 135 136 137 138 $scope.jobOrderTable = true;139 140 function dispalyTable() {141 $scope.candidates142 .forEach(function(candidate, index) {143 candidate.allJobOrderBsTableControl = {144 options : {145 data : candidateData || {},146 striped : true,147 pagination : true,148 paginationVAlign : "both",149 pageSize : 10,150 pageList : [ 10, 20, 50 ],151 search : false,152 showColumns : false,153 pageNumber: ($scope.pageNumber? $scope.pageNumber:1),154 showRefresh : false,155 clickToSelect : false,156 showToggle : false,157 detailView : true,158 maintainSelected : true,159 columns : [160 {161 field : 'jobOrderId',162 title : 'ID',163 align : 'left',164 165 sortable : true166 },{167 field : 'category',168 title : 'Category',169 align : 'left',170 formatter : categoryWithImage,171 sortable : true172 },173 {174 field : 'priority',175 title : 'Priority',176 align : 'left',177 formatter : priorityWithImage,178 sortable : true179 },180 {181 field : 'status',182 title : 'Status',183 align : 'left',184 formatter : statusWithImage,185 sortable : true186 },187 {188 field : 'type',189 title : 'Type',190 align : 'left',191 formatter : typeWithImage,192 sortable : true193 },194 {195 field : 'title',196 title : 'Title',197 align : 'left',198 sortable : true199 },200 {201 field : 'client',202 title : 'Client',203 align : 'left',204 sortable : true205 },206 {207 field : 'location',208 title : 'Location',209 align : 'left',210 sortable : true211 },212 {213 field : 'dm',214 title : 'DM / ADM',215 align : 'left',216 sortable : true217 },218 {219 field : 'assignedTo',220 title : 'Assigned To',221 align : 'left',222 sortable : true223 },224 {225 field : 'updatedDate',226 title : 'Updated On',227 align : 'left',228 sortable : true229 },230 {231 field : 'sbm',232 title : 'Sbm',233 align : 'left',234 sortable : true235 },236 {237 field : 'activeDays',238 title : 'Active Days',239 align : 'left',240 sortable : true241 },242 {243 field : 'actions',244 title : 'Actions',245 align : 'left',246 sortable : false,247 events : window.operateEvents,248 formatter : actionFormatter249 } ],250 251 onPageChange: function (number, size) {252 $scope.pageNumber = number;253 $scope.pageSize = size;254 255 },256 257 onExpandRow : function(index,258 row, $detail) {259 var jobOrderId = row.jobOrderId;260 var response = $http261 .post('jobOrder/submittalDetails?jobOrderId='262 + jobOrderId);263 response264 .success(function(265 data,266 status,267 headers,268 config) {269 expansionData = [];270 for (var i = 0; i < data.length; i++) {271 var submittalObj = data[i];272 expansionData273 .push(submittalObj);274 }275 var tableres = '<div class="tbdiv">';276 /*if(!($rootScope.rsLoginUser.userRole == constants.IN_DM || $rootScope.rsLoginUser.userRole == constants.IN_Recruiter)){277 tableres += '<div class="tbfirstdiv"><button type="button" class="btn btn-primary blue" onclick="createSubmittal('+row.jobOrderId+',\''+row.status+'\')">Create Submittal</button></div>';278 }*/279 tableres += '</div><br>'280 /* tableres += 281 '<div class="tbseconddiv"><label>Search By:</label><select class="subrowdd" id="searchBy_'+row.jobOrderId+'_Id"><option value="0">select</option><option value="title_'+row.title+'">Title</option>'+282 '<option value="location_'+row.location+'">Location</option><option value="keyskills_'+row.keySkills+'">Key Skills</option></select></div>'+283 '<div class="tbthirddiv"><button type="button" class="btn btn-primary blue" onclick="viewResumes(searchBy_'+row.jobOrderId+'_Id)">View Matching Resumes</button></div><div class="clearboth"></div></div>'*/284 285 if (expansionData != '') {286 tableres +='<table class="innertable">'287 + '<tr><th>Created On</th><th>Updated On</th><th>Created By</th><th>Status</th><th>Candidate</th><th></th></tr>'288 for (var i = 0; i < expansionData.length; i++) {289 tableres += '<tr><td>'290 +(expansionData[i].createdOn)291 + '</td>'292 + '<td>'293 +(expansionData[i].updatedOn)294 + '</td>'295 + '<td>'296 + expansionData[i].createdBy297 + '</td>'298 + '<td>'299 + expansionData[i].status 300 + '</td>'301 + '<td>'302 + expansionData[i].candidateName 303 + '</td>'304 if(row.status!=constants.CLOSED){305 tableres += '<td><a class="view actionIcons" title="View Detail" onclick="view'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-search" style="font-size:12px;"></i></a>'306 + '<a class="edit actionIcons" title="Edit" href="#/submitals/editsubmitals?submittalId='+expansionData[i].submittalId+'&pageName='+constants.DMJOBORDERSREPORT+'"><i class="fa fa-edit" style="font-size:12px;"></i></a>'307 + '<a class="remove actionIcons" title="Remove" onclick="delete'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>'308 +'</td>';309 }else310 {311 tableres += '<td><a class="view actionIcons" title="View Detail" onclick="view'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-search" style="font-size:12px;"></i></a>'312 + '<a class="edit actionIcons" title="Edit" href="#/submitals/editsubmitals?submittalId='+expansionData[i].submittalId+'&pageName='+constants.DMJOBORDERSREPORT+'"><i class="fa fa-edit" style="font-size:12px;"></i></a>'313 + '<a class="remove actionIcons" title="Remove" onclick="delete'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>'314 +'</td>';315 }316 tableres +='</tr>'317 +'<script type="text/javascript">'318 +'function view'+expansionData[i].submittalId+'Submittal(id){'319 +'$.ajax({'320 +'url:"jobOrder/getSubmittalEventHistoryBySubmittalId/"+id,'321 +'type:"GET",'322 +'data:null,'323 +'dataType:"json",'324 +'success:function(data){'325 +'var viewsubmittaldata="";'326 +'for(var i=0; i<data.length; i++){'327 +'viewsubmittaldata=viewsubmittaldata + "<div><b>" + data[i].status + " - <i>" + data[i].strCreatedOn + "</i></b> <span>"+ (data[i].notes!='+"undefined"+'?data[i].notes:"") + "</span></div>";'328 +'$("#viewsubmittalid").html(viewsubmittaldata);'329 +'}'330 +'$("#submitalstatus").show();'331 +'}'332 +'});'333 +'}'334 +'</script>'335 336 +'<script type="text/javascript">'337 +'function delete'+expansionData[i].submittalId+'Submittal(delId){'338 +'var deletesubmittal="";'339 +'deletesubmittal = deletesubmittal+ "<div><label>Reason <i id='+"poperr"+'>Reason Should be more than 20 characters</i></label><textarea placeholder='+"Reason&nbsp;For&nbsp;Delete"+' rows='+8+' cols='+40+' id='+"deleteReason"+'></textarea></div>";'340 +'deletesubmittal = deletesubmittal+"<div><button type='+"button"+' class='+"popupbtn"+' onclick='+"savedelreason(\"+delId+\")"+'>Save</button></div>";'341 +'deletesubmittal = deletesubmittal+"<div><button type='+"button"+' class='+"popupbtn"+' onclick='+"canceldelreason()"+'>cancel</button></div>";'342 +'$("#deletesubmittal").html(deletesubmittal);'343 +'$("#submitaldelete").show();'344 +'}'345 +'</script>'346 347 +'<script type="text/javascript">'348 +'function savedelreason(delId){'349 +'var deleteReason = $("#deleteReason").val();'350 +'if(deleteReason.length>20){'351 +'$("#poperr").hide();'352 +'$.ajax({'353 +'url:"jobOrder/deleteSubmittal?submittalID=\"+delId+\"&reason=\"+deleteReason+\"",'354 +'type:"GET",'355 +'data:null,'356 +'dataType:"text",'357 +'success:function(data){'358 +'$("#submitaldelete").hide();'359 +'angular.element("#dmjoborderscontroller").scope().onload();'360 +'angular.element("#dmjoborderscontroller").scope().$apply() '361 +'}'362 +'});'363 +'}'364 +'else{'365 +'$("#poperr").show();'366 +'}'367 +'}'368 +'</script>'369 370 +'<script type="text/javascript">'371 +'function canceldelreason(){'372 +'$("#submitaldelete").hide();'373 +'}'374 +'</script>'375 }376 } else {377 tableres += '<table class="innertable">'378 + '<tr><th>Created On</th><th>Updated On</th><th>Created By</th><th>Status</th><th>Candidate</th></tr>'379 + '<tr><td colspan="5" align="center">No Submittals Found</td></tr>'380 }381 tableres += '</table><script type="text/javascript">function viewResumes(id){if((document.getElementById(id.id).value)==0){ $.growl .error({message : "Select SearchBy Field for Viewing Matching Resumes"});} else{ window.location="#/candidates/search?paramValue="+document.getElementById(id.id).value}}</script>'382 +'<script type="text/javascript">function createSubmittal(job_orderId,orderStatus){'383 +'if(!(orderStatus === constants.CLOSED)){'384 +'window.location="#/submitals/createsubmitals?jobOrder="+job_orderId+"&pageName="+constants.DMJOBORDERSREPORT'385 +'}else{'386 +'$("#viewsubmittalid").html("The Selected Joborder is Closed. Please Reopen the Joborder");'387 +'$("#submitalstatus").show();'388 +'}}'389 +'</script>'390 $detail391 .html(tableres);392 393 });394 response.error(function(data, status, headers, config){395 if(status == constants.FORBIDDEN){396 location.href = 'login.html';397 }else{ 398 $state.transitionTo("ErrorPage",{statusvalue : status});399 }400 });401 },402 }403 };404 405 function categoryWithImage(value, row,406 index) {407 if(row.category == constants.DirectCustomerRelationship){408 return [409 410 '<i class="fa fa-handshake-o" aria-hidden="true" style="color:green;"></i>',411 '&nbsp;<label>'+row.category+'</label>'412 ]413 .join('');414 }415 if(row.category == constants.VMSPortal){416 return [417 418 '<i class="fa fa-cloud" aria-hidden="true" style="color:#ff9900;"></i>',419 '&nbsp;<label>'+row.category+'</label>'420 ]421 .join('');422 }423 if(row.category == constants.ThirdParty){424 return [425 426 '<i class="fa fa-user-circle-o" aria-hidden="true" style="color:red;"></i>',427 '&nbsp;<label>'+row.category+'</label>'428 ]429 .join('');430 }431 }432 function priorityWithImage(value, row,433 index) {434 if(row.priority == constants.HIGH){435 return [436 437 '<i class="fa fa-circle" aria-hidden="true" style="color:red;"></i>',438 '&nbsp;<label>'+row.priority+'</label>'439 ]440 .join('');441 }442 if(row.priority == constants.MEDIUM){443 return [444 445 '<i class="fa fa-circle" aria-hidden="true" style="color:#ff9900;"></i>',446 '&nbsp;<label>'+row.priority+'</label>'447 ]448 .join('');449 }450 if(row.priority == constants.LOW){451 return [452 453 '<i class="fa fa-circle" aria-hidden="true" style="color:green;"></i>',454 '&nbsp;<label>'+row.priority+'</label>'455 ]456 .join('');457 }458 }459 460 function statusWithImage(value, row,461 index) {462 if(row.status == constants.OPEN){463 return [464 465 '<i class="fa fa-arrow-circle-right" aria-hidden="true" style="color:#00a3cc;" title="OPEN"></i>',466 '&nbsp;<label>'+row.status+'</label>'467 ]468 .join('');469 }470 if(row.status == constants.ASSIGNED){471 return [472 473 '<i class="fa fa-user" aria-hidden="true" style="color:#3399ff;" title="ASSIGNED"></i>',474 '&nbsp;<label>'+row.status+'</label>'475 ]476 .join('');477 }478 if(row.status == constants.REOPEN){479 return [480 481 '<i class="fa fa-folder-open-o" aria-hidden="true" title="REOPEN" style="color:#cc6600;"></i>',482 '&nbsp;<label>'+row.status+'</label>'483 ]484 .join('');485 }486 if(row.status == constants.CLOSED){487 return [488 489 '<i class="fa fa-times" aria-hidden="true" style="color:#ff4d4d;" title="CLOSED"></i>',490 '&nbsp;<label>'+row.status+'</label>'491 ]492 .join('');493 }494 if(row.status == constants.FILLED){495 return [496 497 '<i class="fa fa-check-square-o" aria-hidden="true" style="color:#2db300;" title="FILLED"></i>',498 '&nbsp;<label>'+row.status+'</label>'499 ]500 .join('');501 }502 }503 function typeWithImage(value, row,504 index) {505 if(row.type == constants.PERMANENT){506 return [507 508 '<i class="fa fa-link" aria-hidden="true" title="PERMANENT" style="color:#336d30;"></i>',509 '&nbsp;<label>'+row.type+'</label>'510 ]511 .join('');512 }513 if(row.type == constants.CONTRACT){514 return [515 516 '<i class="fa fa-chain-broken" aria-hidden="true" style="color:#ff0000;" title="CONTRACT"></i>',517 '&nbsp;<label>'+row.type+'</label>'518 ]519 .join('');520 }521 if(row.type == constants.BOTH){522 return [523 524 '<i class="fa fa-venus-double" aria-hidden="true" title="BOTH" style="color:#804000;"></i>',525 '&nbsp;<label>'+row.type+'</label>'526 ]527 .join('');528 }529 if(row.type == constants.NOTSPECIFIED){530 return [531 532 '<i class="fa fa-arrows-alt" aria-hidden="true" title="NOTSPECIFIED" style="color:#c96dad;"></i>',533 '&nbsp;<label>'+row.type+'</label>'534 ]535 .join('');536 }537 }538 539 540 541 /* Table button action formatters */542543 function actionFormatter(value, row,544 index) {545 if($rootScope.rsLoginUser.userRole == constants.Recruiter){546 if(!(row.status === constants.CLOSED)){547 return [548 549 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',550 //'<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',551 ]552 .join('');553 }else{554 return [555 556 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',557 ]558 .join('');559 }560 }561 if(($rootScope.rsLoginUser.userRole == constants.DM && $rootScope.rsLoginUser.userId != constants.ANIL_USER_ID) || $rootScope.rsLoginUser.userRole == constants.ADM){562 if(!(row.status === constants.CLOSED)){563 return [564565 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',566 //'<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',567 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> '568 ]569 .join('');570 }571 else{572 return [573574 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',575 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> '576 ]577 .join('');578 }579 }580 581 if($rootScope.rsLoginUser.userRole == constants.DivisionHead || $rootScope.rsLoginUser.userRole == constants.Administrator || $rootScope.rsLoginUser.userRole == constants.HR || $rootScope.rsLoginUser.userRole == constants.EM || $rootScope.rsLoginUser.userRole == constants.Manager582 || $rootScope.rsLoginUser.userId === constants.ANIL_USER_ID){583 if(!(row.status === constants.CLOSED)){584 if($rootScope.rsLoginUser.userId === constants.ANIL_USER_ID || $rootScope.rsLoginUser.userId === constants.HARI_USER_ID){585 return [586 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',587 //'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',588 //'<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',589 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',590 '<a class="edit actionIcons" title="Edit JobOrder"><i class="fa fa-edit" style="font-size:12px;"></i></a>',591 //'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',592 ]593 .join('');594 }else{595 return [596 597 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',598 //'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',599 //'<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',600 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',601 //'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',602 ]603 .join('');604 }605 }606 else{607 if($rootScope.rsLoginUser.userId === constants.ANIL_USER_ID || $rootScope.rsLoginUser.userId === constants.HARI_USER_ID){608 return [609 610 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',611 //'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',612 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',613 '<a class="edit actionIcons" title="Edit JobOrder"><i class="fa fa-edit" style="font-size:12px;"></i></a>',614 //'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',615 ]616 .join('');617 }else{618 return [619 620 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',621 //'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',622 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',623 //'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',624 ]625 .join('');626 }627 }628 }629 }630631 /* Table button actions functionalities */632 window.operateEvents = {633634 /* View Resume details */635 'click .view' : function(e, value,636 row, index) {637 var jobOrderId = row.jobOrderId;638 $mdDialog639 .show({640 controller : DialogController,641 templateUrl : 'views/dialogbox/joborderdetails.html',642 parent : angular643 .element(document.body),644 targetEvent : e,645 locals : {646 rowData : row,647 },648 clickOutsideToClose : true,649 });650 },651 652 'click .copy' : function(e, value,653 row, index) {654 var jobOrderId = row.jobOrderId;655 var response = $http656 .get('jobOrder/copyJobOrder/'+ jobOrderId);657 response658 .success(function(data,659 status,660 headers, config) {661 categoryjoborders();662 dmcategoryjoborders();663 $.growl .notice({message : " Job Order Copied Successfully "});664 });665 response.error(function(data, status, headers, config){666 if(status == constants.FORBIDDEN){667 location.href = 'login.html';668 }else{ 669 $state.transitionTo("ErrorPage",{statusvalue : status});670 }671 });672 },673 674 'click .download' : function(e,675 value, row, index) {676 677 var jobOrderId = row.jobOrderId;678 var candidateresumeData=[];679 var objresume = null;680 var response = $http.post('jobOrder/downloadJobOrder',row);681 682 $window.location = 'jobOrder/downloadJobOrder/'+jobOrderId;683 684 },685 686 'click .edit' : function(e, value,687 row, index) {688 /*$state.transitionTo("editJobOrders",{jobOrderId : row.jobOrderId,dmName:row.dm,page:constants.ALLJOBORDERS});*/689 var url = $state.href("editJobOrders",{jobOrderId : row.jobOrderId,dmName:row.dm,page:constants.DMJOBORDERSREPORT});690 window.open(url,'_blank');691 },692693 'click .remove' : function(e,694 value, row, index) {695696 $mdDialog697 .show(698 {699 controller : DialogController,700 templateUrl : 'views/dialogbox/deletejoborder.html',701 parent : angular702 .element(document.body),703 targetEvent : e,704 locals : {705 rowData : row,706 },707 clickOutsideToClose : true,708 });709 },710 711 'click .plus' : function(e,712 value, row, index) {713 var job_orderId = row.jobOrderId;714 window.location="#/submitals/createsubmitals?jobOrder="+job_orderId+"&pageName="+constants.DMJOBORDERSREPORT;715 }716 };717 718 function DialogController($scope,719 $mdDialog, rowData) {720 $scope.row = rowData;721 var jobordid = rowData.jobOrderId;722 $scope.hide = function() {723 $mdDialog.hide();724 };725726 $scope.cancel = function() {727 $mdDialog.cancel();728 };729730 $scope.deleteQuery = function() {731 732 var response = $http.get('jobOrder/deleteJobOrder/'+jobordid);733 response.success(function(data, status, headers, config) {734 categoryjoborders();735 dmcategoryjoborders();736 $.growl .notice({title : "Deleted", message : rowData.jobOrderId + " Successfully Deleted "});737 });738 739 response.error(function(data, status, headers, config){740 if(status == constants.FORBIDDEN){741 location.href = 'login.html';742 }else{ 743 $state.transitionTo("ErrorPage",{statusvalue : status});744 }745 });746 747 $mdDialog.hide();748 };749 }750 751 });752 753 function getDate(fulldate){754 var month = ( '0' + (fulldate.getMonth()+1) ).slice( -2 );755 var date = ( '0' + (fulldate.getDate()) ).slice( -2 );756 var year = fulldate.getFullYear();757 var totaldate = year + "-" + month + "-" + date;758 return totaldate;759 }760 761 $scope.getTimeFnc = function(){762 $scope.currentDateWithTime = new Date();763 }764 }765766 });767 ...

Full Screen

Full Screen

dmjobordersreport.js

Source:dmjobordersreport.js Github

copy

Full Screen

1;(function(angular){2 "use strict";3 4 angular.module("dmjobordersreport",[])5 .controller("dmjoborderscontroller",function($rootScope, $scope, blockUI, $http, $timeout, $filter, $mdDialog, $mdMedia, $window, $state,dateRangeService, $stateParams) {6 7 $scope.currentDateWithTime = new Date();8 $scope.candidates = [];9 $scope.candidates.push({});10 var candidateData = [];11 var expansionData = [];12 $scope.jobOrderTable = false;13 var strStatuses = null;14 //var obj = {dmname : $stateParams.dmname, startdate : $stateParams.startDate, enddate : $stateParams.endDate, strStatuses : strStatuses};15 $scope.onload = function(){16 $scope.searchjoborder();17 }18 19 $scope.searchjoborder = function()20 {21 $scope.pageNumber = 1;22 candidateData = [];23 dispalyTable();24 dmjoborders();25 }26 27 function dmjoborders() {28 strStatuses = $("#status").val().toUpperCase();29 var obj = {dmname : $stateParams.dmname, startdate : $stateParams.startDate, enddate : $stateParams.endDate, isJobOrderBased : $stateParams.is_joborderBased ,strStatuses : strStatuses};30 //alert("obj::"+JSON.stringify(obj));31 var response = $http.post("jobOrder/getDMJobOrdersReport",obj);32 response.success(function(data, status,headers, config) 33 {34 $scope.allJobOrdersList = data;35 candidateData = [];36 $scope.exportAllJobOrdersList = [];37 for (var i = 0; i < data.length; i++) {38 var candidateObj = data[i];39 candidateData.push(candidateObj);40 41 var obj = {jobOrderId:data[i].jobOrderId,42 category: data[i].category,43 priority: data[i].priority,status: data[i].status,44 type: data[i].type,title:data[i].title,client: data[i].client,location: data[i].location,dm: data[i].dm,assignedTo: data[i].assignedTo,45 updatedDate: data[i].updatedDate,sbm: data[i].sbm,activeDays: data[i].activeDays};46 $scope.exportAllJobOrdersList.push(obj);47 }48 dispalyTable();49 });50 response.error(function(data, status, headers, config){51 if(status == constants.FORBIDDEN){52 location.href = 'login.html';53 }else{ 54 $state.transitionTo("ErrorPage",{statusvalue : status});55 }56 });57 58 }59 60 61$scope.jobOrderTable = true;62 63 function dispalyTable() {64 $scope.candidates65 .forEach(function(candidate, index) {66 candidate.allJobOrderBsTableControl = {67 options : {68 data : candidateData || {},69 striped : true,70 pagination : true,71 paginationVAlign : "both",72 pageSize : 10,73 pageList : [ 10, 20, 50 ],74 search : false,75 showColumns : false,76 pageNumber: ($scope.pageNumber? $scope.pageNumber:1),77 showRefresh : false,78 clickToSelect : false,79 showToggle : false,80 detailView : true,81 maintainSelected : true,82 columns : [83 {84 field : 'jobOrderId',85 title : 'ID',86 align : 'left',87 88 sortable : true89 },{90 field : 'category',91 title : 'Category',92 align : 'left',93 formatter : categoryWithImage,94 sortable : true95 },96 {97 field : 'priority',98 title : 'Priority',99 align : 'left',100 formatter : priorityWithImage,101 sortable : true102 },103 {104 field : 'status',105 title : 'Status',106 align : 'left',107 formatter : statusWithImage,108 sortable : true109 },110 {111 field : 'type',112 title : 'Type',113 align : 'left',114 formatter : typeWithImage,115 sortable : true116 },117 {118 field : 'title',119 title : 'Title',120 align : 'left',121 sortable : true122 },123 {124 field : 'client',125 title : 'Client',126 align : 'left',127 sortable : true128 },129 {130 field : 'location',131 title : 'Location',132 align : 'left',133 sortable : true134 },135 {136 field : 'dm',137 title : 'DM / ADM',138 align : 'left',139 sortable : true140 },141 {142 field : 'assignedTo',143 title : 'Assigned To',144 align : 'left',145 sortable : true146 },147 {148 field : 'updatedDate',149 title : 'Updated On',150 align : 'left',151 sortable : true152 },153 {154 field : 'sbm',155 title : 'Sbm',156 align : 'left',157 sortable : true158 },159 {160 field : 'activeDays',161 title : 'Active Days',162 align : 'left',163 sortable : true164 },165 {166 field : 'actions',167 title : 'Actions',168 align : 'left',169 sortable : false,170 events : window.operateEvents,171 formatter : actionFormatter172 } ],173 174 onPageChange: function (number, size) {175 $scope.pageNumber = number;176 $scope.pageSize = size;177 178 },179 180 onExpandRow : function(index,181 row, $detail) {182 var jobOrderId = row.jobOrderId;183 var response = $http184 .post('jobOrder/submittalDetails?jobOrderId='185 + jobOrderId);186 response187 .success(function(188 data,189 status,190 headers,191 config) {192 expansionData = [];193 for (var i = 0; i < data.length; i++) {194 var submittalObj = data[i];195 expansionData196 .push(submittalObj);197 }198 var tableres = '<div class="tbdiv">';199 /*if(!($rootScope.rsLoginUser.userRole == constants.IN_DM || $rootScope.rsLoginUser.userRole == constants.IN_Recruiter)){200 tableres += '<div class="tbfirstdiv"><button type="button" class="btn btn-primary blue" onclick="createSubmittal('+row.jobOrderId+',\''+row.status+'\')">Create Submittal</button></div>';201 }*/202 tableres += '</div><br>'203 /* tableres += 204 '<div class="tbseconddiv"><label>Search By:</label><select class="subrowdd" id="searchBy_'+row.jobOrderId+'_Id"><option value="0">select</option><option value="title_'+row.title+'">Title</option>'+205 '<option value="location_'+row.location+'">Location</option><option value="keyskills_'+row.keySkills+'">Key Skills</option></select></div>'+206 '<div class="tbthirddiv"><button type="button" class="btn btn-primary blue" onclick="viewResumes(searchBy_'+row.jobOrderId+'_Id)">View Matching Resumes</button></div><div class="clearboth"></div></div>'*/207 208 if (expansionData != '') {209 tableres +='<table class="innertable">'210 + '<tr><th>Created On</th><th>Updated On</th><th>Created By</th><th>Status</th><th>Candidate</th><th></th></tr>'211 for (var i = 0; i < expansionData.length; i++) {212 tableres += '<tr><td>'213 +(expansionData[i].createdOn)214 + '</td>'215 + '<td>'216 +(expansionData[i].updatedOn)217 + '</td>'218 + '<td>'219 + expansionData[i].createdBy220 + '</td>'221 + '<td>'222 + expansionData[i].status 223 + '</td>'224 + '<td>'225 + expansionData[i].candidateName 226 + '</td>'227 if(row.status!=constants.CLOSED){228 tableres += '<td><a class="view actionIcons" title="View Detail" onclick="view'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-search" style="font-size:12px;"></i></a>'229 + '<a class="edit actionIcons" title="Edit" href="#/submitals/editsubmitals?submittalId='+expansionData[i].submittalId+'&pageName='+constants.DMJOBORDERSREPORT+'"><i class="fa fa-edit" style="font-size:12px;"></i></a>'230 + '<a class="remove actionIcons" title="Remove" onclick="delete'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>'231 +'</td>';232 }else233 {234 tableres += '<td><a class="view actionIcons" title="View Detail" onclick="view'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-search" style="font-size:12px;"></i></a>'235 + '<a class="edit actionIcons" title="Edit" href="#/submitals/editsubmitals?submittalId='+expansionData[i].submittalId+'&pageName='+constants.DMJOBORDERSREPORT+'"><i class="fa fa-edit" style="font-size:12px;"></i></a>'236 + '<a class="remove actionIcons" title="Remove" onclick="delete'+expansionData[i].submittalId+'Submittal('+expansionData[i].submittalId+');"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>'237 +'</td>';238 }239 tableres +='</tr>'240 +'<script type="text/javascript">'241 +'function view'+expansionData[i].submittalId+'Submittal(id){'242 +'$.ajax({'243 +'url:"jobOrder/getSubmittalEventHistoryBySubmittalId/"+id,'244 +'type:"GET",'245 +'data:null,'246 +'dataType:"json",'247 +'success:function(data){'248 +'var viewsubmittaldata="";'249 +'for(var i=0; i<data.length; i++){'250 +'viewsubmittaldata=viewsubmittaldata + "<div><b>" + data[i].status + " - <i>" + data[i].strCreatedOn + "</i></b> <span>"+ (data[i].notes!='+"undefined"+'?data[i].notes:"") + "</span></div>";'251 +'$("#viewsubmittalid").html(viewsubmittaldata);'252 +'}'253 +'$("#submitalstatus").show();'254 +'}'255 +'});'256 +'}'257 +'</script>'258 259 +'<script type="text/javascript">'260 +'function delete'+expansionData[i].submittalId+'Submittal(delId){'261 +'var deletesubmittal="";'262 +'deletesubmittal = deletesubmittal+ "<div><label>Reason <i id='+"poperr"+'>Reason Should be more than 20 characters</i></label><textarea placeholder='+"Reason&nbsp;For&nbsp;Delete"+' rows='+8+' cols='+40+' id='+"deleteReason"+'></textarea></div>";'263 +'deletesubmittal = deletesubmittal+"<div><button type='+"button"+' class='+"popupbtn"+' onclick='+"savedelreason(\"+delId+\")"+'>Save</button></div>";'264 +'deletesubmittal = deletesubmittal+"<div><button type='+"button"+' class='+"popupbtn"+' onclick='+"canceldelreason()"+'>cancel</button></div>";'265 +'$("#deletesubmittal").html(deletesubmittal);'266 +'$("#submitaldelete").show();'267 +'}'268 +'</script>'269 270 +'<script type="text/javascript">'271 +'function savedelreason(delId){'272 +'var deleteReason = $("#deleteReason").val();'273 +'if(deleteReason.length>20){'274 +'$("#poperr").hide();'275 +'$.ajax({'276 +'url:"jobOrder/deleteSubmittal?submittalID=\"+delId+\"&reason=\"+deleteReason+\"",'277 +'type:"GET",'278 +'data:null,'279 +'dataType:"text",'280 +'success:function(data){'281 +'$("#submitaldelete").hide();'282 +'angular.element("#dmjoborderscontroller").scope().onload();'283 +'angular.element("#dmjoborderscontroller").scope().$apply() '284 +'}'285 +'});'286 +'}'287 +'else{'288 +'$("#poperr").show();'289 +'}'290 +'}'291 +'</script>'292 293 +'<script type="text/javascript">'294 +'function canceldelreason(){'295 +'$("#submitaldelete").hide();'296 +'}'297 +'</script>'298 }299 } else {300 tableres += '<table class="innertable">'301 + '<tr><th>Created On</th><th>Updated On</th><th>Created By</th><th>Status</th><th>Candidate</th></tr>'302 + '<tr><td colspan="5" align="center">No Submittals Found</td></tr>'303 }304 tableres += '</table><script type="text/javascript">function viewResumes(id){if((document.getElementById(id.id).value)==0){ $.growl .error({message : "Select SearchBy Field for Viewing Matching Resumes"});} else{ window.location="#/candidates/search?paramValue="+document.getElementById(id.id).value}}</script>'305 +'<script type="text/javascript">function createSubmittal(job_orderId,orderStatus){'306 +'if(!(orderStatus === constants.CLOSED)){'307 +'window.location="#/submitals/createsubmitals?jobOrder="+job_orderId+"&pageName="+constants.DMJOBORDERSREPORT'308 +'}else{'309 +'$("#viewsubmittalid").html("The Selected Joborder is Closed. Please Reopen the Joborder");'310 +'$("#submitalstatus").show();'311 +'}}'312 +'</script>'313 $detail314 .html(tableres);315 316 });317 response.error(function(data, status, headers, config){318 if(status == constants.FORBIDDEN){319 location.href = 'login.html';320 }else{ 321 $state.transitionTo("ErrorPage",{statusvalue : status});322 }323 });324 },325 }326 };327 328 function categoryWithImage(value, row,329 index) {330 if(row.category == constants.DirectCustomerRelationship){331 return [332 333 '<i class="fa fa-handshake-o" aria-hidden="true" style="color:green;"></i>',334 '&nbsp;<label>'+row.category+'</label>'335 ]336 .join('');337 }338 if(row.category == constants.VMSPortal){339 return [340 341 '<i class="fa fa-cloud" aria-hidden="true" style="color:#ff9900;"></i>',342 '&nbsp;<label>'+row.category+'</label>'343 ]344 .join('');345 }346 if(row.category == constants.ThirdParty){347 return [348 349 '<i class="fa fa-user-circle-o" aria-hidden="true" style="color:red;"></i>',350 '&nbsp;<label>'+row.category+'</label>'351 ]352 .join('');353 }354 }355 function priorityWithImage(value, row,356 index) {357 if(row.priority == constants.HIGH){358 return [359 360 '<i class="fa fa-circle" aria-hidden="true" style="color:red;"></i>',361 '&nbsp;<label>'+row.priority+'</label>'362 ]363 .join('');364 }365 if(row.priority == constants.MEDIUM){366 return [367 368 '<i class="fa fa-circle" aria-hidden="true" style="color:#ff9900;"></i>',369 '&nbsp;<label>'+row.priority+'</label>'370 ]371 .join('');372 }373 if(row.priority == constants.LOW){374 return [375 376 '<i class="fa fa-circle" aria-hidden="true" style="color:green;"></i>',377 '&nbsp;<label>'+row.priority+'</label>'378 ]379 .join('');380 }381 }382 383 function statusWithImage(value, row,384 index) {385 if(row.status == constants.OPEN){386 return [387 388 '<i class="fa fa-arrow-circle-right" aria-hidden="true" style="color:#00a3cc;" title="OPEN"></i>',389 '&nbsp;<label>'+row.status+'</label>'390 ]391 .join('');392 }393 if(row.status == constants.ASSIGNED){394 return [395 396 '<i class="fa fa-user" aria-hidden="true" style="color:#3399ff;" title="ASSIGNED"></i>',397 '&nbsp;<label>'+row.status+'</label>'398 ]399 .join('');400 }401 if(row.status == constants.REOPEN){402 return [403 404 '<i class="fa fa-folder-open-o" aria-hidden="true" title="REOPEN" style="color:#cc6600;"></i>',405 '&nbsp;<label>'+row.status+'</label>'406 ]407 .join('');408 }409 if(row.status == constants.CLOSED){410 return [411 412 '<i class="fa fa-times" aria-hidden="true" style="color:#ff4d4d;" title="CLOSED"></i>',413 '&nbsp;<label>'+row.status+'</label>'414 ]415 .join('');416 }417 if(row.status == constants.FILLED){418 return [419 420 '<i class="fa fa-check-square-o" aria-hidden="true" style="color:#2db300;" title="FILLED"></i>',421 '&nbsp;<label>'+row.status+'</label>'422 ]423 .join('');424 }425 }426 function typeWithImage(value, row,427 index) {428 if(row.type == constants.PERMANENT){429 return [430 431 '<i class="fa fa-link" aria-hidden="true" title="PERMANENT" style="color:#336d30;"></i>',432 '&nbsp;<label>'+row.type+'</label>'433 ]434 .join('');435 }436 if(row.type == constants.CONTRACT){437 return [438 439 '<i class="fa fa-chain-broken" aria-hidden="true" style="color:#ff0000;" title="CONTRACT"></i>',440 '&nbsp;<label>'+row.type+'</label>'441 ]442 .join('');443 }444 if(row.type == constants.BOTH){445 return [446 447 '<i class="fa fa-venus-double" aria-hidden="true" title="BOTH" style="color:#804000;"></i>',448 '&nbsp;<label>'+row.type+'</label>'449 ]450 .join('');451 }452 if(row.type == constants.NOTSPECIFIED){453 return [454 455 '<i class="fa fa-arrows-alt" aria-hidden="true" title="NOTSPECIFIED" style="color:#c96dad;"></i>',456 '&nbsp;<label>'+row.type+'</label>'457 ]458 .join('');459 }460 }461 462 463 464 /* Table button action formatters */465466 function actionFormatter(value, row,467 index) {468 if($rootScope.rsLoginUser.userRole == constants.Recruiter){469 if(!(row.status === constants.CLOSED)){470 return [471 472 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',473 //'<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',474 ]475 .join('');476 }else{477 return [478 479 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',480 ]481 .join('');482 }483 }484 if(($rootScope.rsLoginUser.userRole == constants.DM && $rootScope.rsLoginUser.userId != constants.ANIL_USER_ID) || $rootScope.rsLoginUser.userRole == constants.ADM){485 if(!(row.status === constants.CLOSED)){486 return [487488 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',489 //'<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',490 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> '491 ]492 .join('');493 }494 else{495 return [496497 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',498 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> '499 ]500 .join('');501 }502 }503 504 if($rootScope.rsLoginUser.userRole == constants.DivisionHead || $rootScope.rsLoginUser.userRole == constants.Administrator || $rootScope.rsLoginUser.userRole == constants.HR || $rootScope.rsLoginUser.userRole == constants.EM || $rootScope.rsLoginUser.userRole == constants.Manager505 || $rootScope.rsLoginUser.userId === constants.ANIL_USER_ID){506 if(!(row.status === constants.CLOSED)){507 if($rootScope.rsLoginUser.userId === constants.ANIL_USER_ID || $rootScope.rsLoginUser.userId === constants.HARI_USER_ID){508 return [509 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',510 //'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',511 //'<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',512 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',513 '<a class="edit actionIcons" title="Edit JobOrder"><i class="fa fa-edit" style="font-size:12px;"></i></a>',514 //'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',515 ]516 .join('');517 }else{518 return [519 520 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',521 //'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',522 //'<a class="plus actionIcons" title="Create Submittal" ><i class="fa fa-plus" style="font-size:12px;"></i></a> ',523 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',524 //'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',525 ]526 .join('');527 }528 }529 else{530 if($rootScope.rsLoginUser.userId === constants.ANIL_USER_ID || $rootScope.rsLoginUser.userId === constants.HARI_USER_ID){531 return [532 533 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',534 //'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',535 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',536 '<a class="edit actionIcons" title="Edit JobOrder"><i class="fa fa-edit" style="font-size:12px;"></i></a>',537 //'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',538 ]539 .join('');540 }else{541 return [542 543 '<a class="view actionIcons" title="View Details" flex-gt-md="auto"><i class="fa fa-search" style="font-size:12px;"></i></a>',544 //'<a class="copy actionIcons" title="Copy" ><i class="fa fa-copy" style="font-size:12px;"></i></a> ',545 '<a class="download actionIcons" title="Download JobOrder" style="color:#00a3cc;"><i class="fa fa-download" style="font-size:12px;"></i></a> ',546 //'<a class="remove actionIcons" title="Remove"><i class="fa fa-trash-o" style="font-size:12px;"></i></a>',547 ]548 .join('');549 }550 }551 }552 }553554 /* Table button actions functionalities */555 window.operateEvents = {556557 /* View Resume details */558 'click .view' : function(e, value,559 row, index) {560 var jobOrderId = row.jobOrderId;561 $mdDialog562 .show({563 controller : DialogController,564 templateUrl : 'views/dialogbox/joborderdetails.html',565 parent : angular566 .element(document.body),567 targetEvent : e,568 locals : {569 rowData : row,570 },571 clickOutsideToClose : true,572 });573 },574 575 'click .copy' : function(e, value,576 row, index) {577 var jobOrderId = row.jobOrderId;578 var response = $http579 .get('jobOrder/copyJobOrder/'+ jobOrderId);580 response581 .success(function(data,582 status,583 headers, config) {584 dmjoborders();585 $.growl .notice({message : " Job Order Copied Successfully "});586 });587 response.error(function(data, status, headers, config){588 if(status == constants.FORBIDDEN){589 location.href = 'login.html';590 }else{ 591 $state.transitionTo("ErrorPage",{statusvalue : status});592 }593 });594 },595 596 'click .download' : function(e,597 value, row, index) {598 599 var jobOrderId = row.jobOrderId;600 var candidateresumeData=[];601 var objresume = null;602 var response = $http.post('jobOrder/downloadJobOrder',row);603 604 $window.location = 'jobOrder/downloadJobOrder/'+jobOrderId;605 606 },607 608 'click .edit' : function(e, value,609 row, index) {610 /*$state.transitionTo("editJobOrders",{jobOrderId : row.jobOrderId,dmName:row.dm,page:constants.ALLJOBORDERS});*/611 var url = $state.href("editJobOrders",{jobOrderId : row.jobOrderId,dmName:row.dm,page:constants.DMJOBORDERSREPORT});612 window.open(url,'_blank');613 },614615 'click .remove' : function(e,616 value, row, index) {617618 $mdDialog619 .show(620 {621 controller : DialogController,622 templateUrl : 'views/dialogbox/deletejoborder.html',623 parent : angular624 .element(document.body),625 targetEvent : e,626 locals : {627 rowData : row,628 },629 clickOutsideToClose : true,630 });631 },632 633 'click .plus' : function(e,634 value, row, index) {635 var job_orderId = row.jobOrderId;636 window.location="#/submitals/createsubmitals?jobOrder="+job_orderId+"&pageName="+constants.DMJOBORDERSREPORT;637 }638 };639 640 function DialogController($scope,641 $mdDialog, rowData) {642 $scope.row = rowData;643 var jobordid = rowData.jobOrderId;644 $scope.hide = function() {645 $mdDialog.hide();646 };647648 $scope.cancel = function() {649 $mdDialog.cancel();650 };651652 $scope.deleteQuery = function() {653 654 var response = $http.get('jobOrder/deleteJobOrder/'+jobordid);655 response.success(function(data, status, headers, config) {656 dmjoborders();657 $.growl .notice({title : "Deleted", message : rowData.jobOrderId + " Successfully Deleted "});658 });659 660 response.error(function(data, status, headers, config){661 if(status == constants.FORBIDDEN){662 location.href = 'login.html';663 }else{ 664 $state.transitionTo("ErrorPage",{statusvalue : status});665 }666 });667 668 $mdDialog.hide();669 };670 }671 672 });673 674 function getDate(fulldate){675 var month = ( '0' + (fulldate.getMonth()+1) ).slice( -2 );676 var date = ( '0' + (fulldate.getDate()) ).slice( -2 );677 var year = fulldate.getFullYear();678 var totaldate = year + "-" + month + "-" + date;679 return totaldate;680 }681 682 $scope.getTimeFnc = function(){683 $scope.currentDateWithTime = new Date();684 }685 }686687 });688 ...

Full Screen

Full Screen

SMSConversation.js

Source:SMSConversation.js Github

copy

Full Screen

1import React from "react";2import styled from "styled-components";3import { Icon } from "semantic-ui-react";4import {5 Container,6 ContainerCOllapsed,7 NameBox,8 DateLabel,9 ActionIcons,10 Messages,11 MessageLeftWrap,12 MessageLeft,13 MessageRightWrap,14 MessageRight,15 MessageDate,16 Footer,17 InputBox,18 IconClose,19 IconExpand,20 InputBoxWrap,21 IconCollapse,22 IconSend,23 NameBoxCollapsed24} from "./styles";25import TemplatesDropdown from "../CandidateTabs/TemplatesDropdown";26class SMSConversation extends React.Component {27 state = {28 isCollapsed: false29 };30 onCollapse = () => {31 const { isCollapsed } = this.state;32 this.setState({ isCollapsed: !isCollapsed })33 };34 onSend = () => {35 // TODO send message36 };37 render() {38 const { isCollapsed } = this.state;39 const { candidate, onClose } = this.props;40 return isCollapsed ? (41 <ContainerCOllapsed>42 <NameBoxCollapsed>43 { candidate.first_name } { candidate.last_name } - SMS Conversation44 <ActionIcons><IconExpand name="expand" onClick={this.onCollapse} /></ActionIcons>45 </NameBoxCollapsed>46 </ContainerCOllapsed>47 ) : (48 <Container>49 <NameBox>50 { candidate.first_name } { candidate.last_name } - SMS Conversation51 <ActionIcons><IconCollapse name="minus circle" onClick={this.onCollapse} /><IconClose name="times circle" onClick={onClose} /></ActionIcons>52 </NameBox>53 <Messages>54 <DateLabel>FEB 23 3:46PM - CST</DateLabel>55 <MessageLeftWrap>56 <MessageLeft>Hi Maria, are you available right now?</MessageLeft>57 </MessageLeftWrap>58 <MessageLeftWrap>59 <MessageLeft>Smart Credit Pulled</MessageLeft>60 <MessageDate>10:24</MessageDate>61 </MessageLeftWrap>62 <MessageRightWrap>63 <span>Maria Smith - </span><MessageRight>Yes, I am! What's up?</MessageRight>64 </MessageRightWrap>65 </Messages>66 <Footer>67 <TemplatesDropdown />68 <InputBoxWrap>69 <InputBox transparent placeholder="Type your message here…"></InputBox>70 <IconSend name="send" size="large" onClick={this.onSend}></IconSend>71 </InputBoxWrap>72 </Footer>73 </Container>74 );75 }76}...

Full Screen

Full Screen

PostActions.js

Source:PostActions.js Github

copy

Full Screen

1import React from 'react';2import {TouchableOpacity, Image, View, StyleSheet} from 'react-native';3import images from '../../../res/images';4function tapToLike(likeIcon) {5 if (likeIcon % 2 === 0) {6 return images.redHeart;7 } else {8 return images.like;9 }10}11function tapToBookmark(bookmarkIcon) {12 if (bookmarkIcon % 2 === 0) {13 return images.bookmarkWhite;14 } else {15 return images.bookmark;16 }17}18export default function PostActions() {19 const [likeIcon, setLikeIcon] = React.useState(1);20 const [bookmarkIcon, setBookmarkIcon] = React.useState(1);21 return (22 <View style={Styles.container}>23 <View style={{flexDirection: 'row', justifyContent: 'flex-start'}}>24 <TouchableOpacity onPress={() => setLikeIcon(likeIcon + 1)}>25 <Image source={tapToLike(likeIcon)} style={Styles.actionIcons} />26 </TouchableOpacity>27 <TouchableOpacity onPress={() => console.log('Pressed Comment')}>28 <Image source={images.comment} style={Styles.actionIcons} />29 </TouchableOpacity>30 <TouchableOpacity onPress={() => console.log('Pressed Direct Message')}>31 <Image source={images.direct_message} style={Styles.actionIcons} />32 </TouchableOpacity>33 </View>34 <TouchableOpacity onPress={() => setBookmarkIcon(bookmarkIcon + 1)}>35 <Image36 source={tapToBookmark(bookmarkIcon)}37 style={Styles.actionIcons}38 />39 </TouchableOpacity>40 </View>41 );42}43const Styles = StyleSheet.create({44 container: {45 justifyContent: 'space-between',46 flexDirection: 'row',47 //paddingStart: 20,48 marginEnd: 15,49 marginTop: 15,50 },51 actionIcons: {52 width: 23,53 height: 23,54 marginStart: 15,55 },...

Full Screen

Full Screen

ListItemColumn.js

Source:ListItemColumn.js Github

copy

Full Screen

1import React from 'react';2import PropTypes from 'prop-types';3import Grid from '@material-ui/core/Grid';4import Typography from '@material-ui/core/Typography';5import { makeStyles } from '@material-ui/core/styles';6const useStyles = makeStyles((theme) => ({7 content: {8 padding: theme.spacing(1),9 textAlign: 'center',10 display: 'flex',11 flexDirection: 'column',12 justifyContent: 'center',13 overflow: 'hidden',14 },15 actionIcons: {16 display: 'flex',17 justifyContent: 'space-evenly',18 },19}));20const ListItemColumn = ({ children, actionIcons, completedList }) => {21 const classes = useStyles();22 return (23 <Grid24 item25 xs={completedList ? 6 : 4}26 className={`${classes.content} ${actionIcons && classes.actionIcons}`}>27 <Typography28 className={`${actionIcons && classes.actionIcons}`}29 variant='subtitle2'>30 {children}31 </Typography>32 </Grid>33 );34};35ListItemColumn.propTypes = {36 children: PropTypes.node.isRequired,37 completedList: PropTypes.bool,38 actionIcons: PropTypes.bool,39};...

Full Screen

Full Screen

actionIcons.component.js

Source:actionIcons.component.js Github

copy

Full Screen

1'use strict';2import * as angular from 'angular';3export const CORE_WIDGETS_ACTIONICONS_ACTIONICONS_COMPONENT = 'spinnaker.core.actionIcons.component';4export const name = CORE_WIDGETS_ACTIONICONS_ACTIONICONS_COMPONENT; // for backwards compatibility5angular.module(CORE_WIDGETS_ACTIONICONS_ACTIONICONS_COMPONENT, []).component('actionIcons', {6 bindings: {7 edit: '&',8 editInfo: '@',9 destroy: '&',10 destroyInfo: '@',11 },12 templateUrl: require('./actionIcons.component.html'),13 controller: angular.noop,...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

1import ActionIcons from './ActionIcons'...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { actionIcons } = require('playwright/lib/server/chromium/crNetworkManager');2const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');3const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');4const { actionIcons } = require('playwright/lib/server/chromium/crNetworkManager');5const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');6const { actionIcons } = require('playwright/lib/server/chromium/crNetworkManager');7const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');8const { actionIcons } = require('playwright/lib/server/chromium/crNetworkManager');9const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');10const { actionIcons } = require('playwright/lib/server/chromium/crNetworkManager');11const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');12const { actionIcons } = require('playwright/lib/server/chromium/crNetworkManager');13const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');14const { actionIcons } = require('playwright/lib/server/chromium/crNetworkManager');15const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');16const { actionIcons } = require('playwright/lib/server/chromium/crNetworkManager');17const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');18const { actionIcons } = require('playwright/lib/server/chromium/crNetworkManager');19const { getIcon } = require('playwright/lib/server/chromium/crNetworkManager');20const { actionIcons } =

Full Screen

Using AI Code Generation

copy

Full Screen

1const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');2const icons = actionIcons();3console.log(icons);4const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');5const icons = actionIcons();6console.log(icons);7const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');8const icons = actionIcons();9console.log(icons);10const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');11const icons = actionIcons();12console.log(icons);13const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');14const icons = actionIcons();15console.log(icons);16const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');17const icons = actionIcons();18console.log(icons);19const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');20const icons = actionIcons();21console.log(icons);22const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');23const icons = actionIcons();24console.log(icons);25const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');26const icons = actionIcons();27console.log(icons);28const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');29const icons = actionIcons();30console.log(icons);31const { actionIcons } = require('playwright/lib/server/supplements/recorder

Full Screen

Using AI Code Generation

copy

Full Screen

1const { actionIcons } = require('playwright/lib/server/supplements/recorder/recorderApp');2const icons = actionIcons();3console.log(icons);4module.exports.actionIcons = actionIcons;5function actionIcons() {6 return {7 };8}

Full Screen

Using AI Code Generation

copy

Full Screen

1const { actionIcons } = require('@playwright/test');2actionIcons().then((icons) => {3 console.log(icons);4});5const { actionIcons } = require('@playwright/test');6test('test', async ({ page }) => {7 actionIcons().then((icons) => {8 console.log(icons);9 });10});

Full Screen

Using AI Code Generation

copy

Full Screen

1export const actionIcons = async (action) => {2 const { page } = global;3 await page.evaluate(async (action) => {4 const { actionIcons } = window['playwright'].internal;5 await actionIcons(action);6 }, action);7};8export const actionIcons = async (action) => {9 const { page } = global;10 await page.evaluate(async (action) => {11 const { actionIcons } = window['playwright'].internal;12 await actionIcons(action);13 }, action);14};15export const actionIcons = async (action) => {16 const { page } = global;17 await page.evaluate(async (action) => {18 const { actionIcons } = window['playwright'].internal;19 await actionIcons(action);20 }, action);21};22export const actionIcons = async (action) => {23 const { page } = global;24 await page.evaluate(async (action) => {25 const { actionIcons } = window['playwright'].internal;26 await actionIcons(action);27 }, action);28};29export const actionIcons = async (action) => {30 const { page } = global;31 await page.evaluate(async (action) => {32 const { actionIcons } = window['playwright'].internal;33 await actionIcons(action);34 }, action);35};36export const actionIcons = async (action) => {37 const { page } = global;38 await page.evaluate(async (action) => {39 const { actionIcons } = window['playwright'].internal;40 await actionIcons(action);41 }, action);42};

Full Screen

Using AI Code Generation

copy

Full Screen

1const { actionIcons } = require('playwright/lib/server/chromium/crPage');2await page.actionIcons();3### actionIcons()4const { actionIcons } = require('playwright/lib/server/chromium/crPage');5await page.actionIcons();6### actionIconsCount()7const { actionIconsCount } = require('playwright/lib/server/chromium/crPage');8await page.actionIconsCount();9### actionIconsText()10const { actionIconsText } = require('playwright/lib/server/chromium/crPage');11await page.actionIconsText();12### actionIconsColor()13const { actionIconsColor } = require('playwright/lib/server/chromium/crPage');14await page.actionIconsColor();15### actionIconsBackgroundColor()16const { actionIconsBackgroundColor } = require('playwright/lib/server/chromium/crPage');17await page.actionIconsBackgroundColor();18### actionIconsSize()19const { actionIconsSize } = require('playwright/lib/server/chromium/crPage');20await page.actionIconsSize();21### actionIconsPosition()22const { actionIconsPosition } = require('playwright/lib/server/chromium/crPage');

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful