fix in support ticket, expiry banner
This commit is contained in:
parent
864e220ec5
commit
8cffe7e440
@ -91,7 +91,7 @@ erpnext.startup.start = function() {
|
|||||||
erpnext.complete_setup.show();
|
erpnext.complete_setup.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(wn.boot.expires_on) {
|
if(wn.boot.expires_on && in_list(user_roles, 'System Manager')) {
|
||||||
var today = dateutil.str_to_obj(dateutil.get_today());
|
var today = dateutil.str_to_obj(dateutil.get_today());
|
||||||
var expires_on = dateutil.str_to_obj(wn.boot.expires_on);
|
var expires_on = dateutil.str_to_obj(wn.boot.expires_on);
|
||||||
var diff = dateutil.get_diff(expires_on, today);
|
var diff = dateutil.get_diff(expires_on, today);
|
||||||
|
@ -48,14 +48,14 @@ $.extend(cur_frm.cscript, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
refresh: function(doc) {
|
refresh: function(doc) {
|
||||||
cs.make_listing(doc);
|
cur_frm.cscript.make_listing(doc);
|
||||||
if(!doc.__islocal) {
|
if(!doc.__islocal) {
|
||||||
if(in_list(user_roles,'System Manager')) {
|
if(in_list(user_roles,'System Manager')) {
|
||||||
if(doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cs['Close Ticket']);
|
if(doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cur_frm.cscript['Close Ticket']);
|
||||||
if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket', cs['Re-Open Ticket']);
|
if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket', cur_frm.cscript['Re-Open Ticket']);
|
||||||
}else if(doc.allocated_to) {
|
}else if(doc.allocated_to) {
|
||||||
set_field_permlevel('status',2);
|
set_field_permlevel('status',2);
|
||||||
if(user==doc.allocated_to && doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cs['Close Ticket']);
|
if(user==doc.allocated_to && doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cur_frm.cscript['Close Ticket']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// can't change the main message & subject once set
|
// can't change the main message & subject once set
|
||||||
@ -81,7 +81,7 @@ $.extend(cur_frm.cscript, {
|
|||||||
}, null, -1)
|
}, null, -1)
|
||||||
|
|
||||||
// render thread
|
// render thread
|
||||||
cs.thread_list = new wn.ui.Listing({
|
cur_frm.cscript.thread_list = new wn.ui.Listing({
|
||||||
parent: $a(cur_frm.fields_dict['thread_html'].wrapper, 'div'),
|
parent: $a(cur_frm.fields_dict['thread_html'].wrapper, 'div'),
|
||||||
no_result_message: 'No responses yet',
|
no_result_message: 'No responses yet',
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
@ -93,7 +93,7 @@ $.extend(cur_frm.cscript, {
|
|||||||
new EmailMessage(parent, data, list, idx);
|
new EmailMessage(parent, data, list, idx);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
cs.thread_list.run();
|
cur_frm.cscript.thread_list.run();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user