⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.23
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
crm.dev-unit.com
/
public
/
assets
/
js
/
tasks
/
View File Name :
create-edit.js
(()=>{"use strict";$(document).ready((function(){setTimeout((function(){""!==$("#relatedToId").val()&&$("#relatedToId").val($("#relatedToId").val()).trigger("change")}),500),$(document).on("submit","#createTasks, #editTasks",(function(){if(jQuery(this).find("#btnSave").button("loading"),""!==$("#error-msg").text())return!1;var e=""===$("<div />").html($("#taskDescription").summernote("code")).text().trim().replace(/ \r\n\t/g,"");if($("#taskDescription").summernote("isEmpty"))$("#taskDescription").val("");else if(e){return displayErrorMessage("Description field is not contain only white space"),jQuery(this).find("#btnSave").button("reset"),!1}})),$("#statusId").select2({width:"100%",placeholder:Lang.get("messages.placeholder.select_status")}),$("#tagId").select2({width:"calc(100% - 44px)",placeholder:Lang.get("messages.placeholder.select_tags")}),$("#priorityId,#relatedToId,#ownerId,#memberId").select2({width:"100%"}),$("#startDate").datetimepicker({format:"YYYY-MM-DD HH:mm:ss",useCurrent:!0,sideBySide:!0,widgetPositioning:{horizontal:"right",vertical:"bottom"},maxDate:new Date,icons:{up:"fa fa-chevron-up",down:"fa fa-chevron-down",next:"fa fa-chevron-right",previous:"fa fa-chevron-left"}}),$("#dueDate").datetimepicker({format:"YYYY-MM-DD HH:mm:ss",useCurrent:!1,sideBySide:!0,widgetPositioning:{horizontal:"right",vertical:"bottom"},icons:{up:"fa fa-chevron-up",down:"fa fa-chevron-down",next:"fa fa-chevron-right",previous:"fa fa-chevron-left"}}),$("#startDate, #dueDate").on("dp.show",(function(){matchWindowScreenPixels({startDate:"#startDate",dueDate:"#dueDate"},"exp")})),setTimeout((function(){1==editTasks&&""!==$("#dueDate").val()?$("#dueDate").data("DateTimePicker").minDate($("#dueDate").val()):$("#dueDate").data("DateTimePicker").minDate(moment().millisecond(0).second(0).minute(0).hour(0))}),1e3),$("#taskDescription").summernote({minHeight:200,toolbar:[["style",["bold","italic","underline","clear"]],["font",["strikethrough"]],["para",["paragraph"]]]}),$(document).on("change","#relatedToId",(function(){changeOwner("#ownerId",$(this).val()),$("#ownerLabel").text($(this).children("option:selected").text()+":"),$("#relatedToForm").slideDown()})),window.changeOwner=function(e,t){$.ajax({url:route("change-owner"),type:"get",dataType:"json",data:{id:t},success:function(t){if($(e).empty(),$.each(t.data,(function(t,a){var n=document.createElement("textarea");n.innerHTML=a,$(e).append($("<option></option>").attr("value",t).text(n.value))})),editTasksOwner)return $(e).val(taskOwnerId).trigger("change.select2"),!0;"undefined"!=typeof customerId&&"undefined"!=typeof relatedTo&&""!==customerId&&"Customer"===relatedTo&&($(e).val(customerId).trigger("change.select2"),customerId="")}})}}))})();