Merge pull request #4766 from achillesrasquinha/chat-fixes
[MIN] Fixes Message Timestamp for Chat
This commit is contained in:
commit
b9599366d1
2 changed files with 5 additions and 5 deletions
|
|
@ -949,14 +949,14 @@ frappe.chat.pretty_datetime = function (date)
|
|||
{
|
||||
const today = moment()
|
||||
const instance = date.moment
|
||||
|
||||
|
||||
if ( today.isSame(instance, "d") )
|
||||
return today.format("hh:mm A")
|
||||
return instance.format("hh:mm A")
|
||||
else
|
||||
if ( today.isSame(instance, "week") )
|
||||
return today.format("dddd")
|
||||
return instance.format("dddd")
|
||||
else
|
||||
return today.format("DD/MM/YYYY")
|
||||
return instance.format("DD/MM/YYYY")
|
||||
}
|
||||
|
||||
// frappe.chat.sound
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ frappe.ui.Dialog = frappe.ui.FieldGroup.extend({
|
|||
|
||||
// show footer
|
||||
this.action = this.action || { primary: { }, secondary: { } };
|
||||
if(this.primary_action || this.action.primary.label) {
|
||||
if(this.primary_action || !frappe._.is_empty(this.action.primary)) {
|
||||
this.set_primary_action(this.primary_action_label || this.action.primary.label || __("Submit"), this.primary_action || this.action.primary.click);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue