duplicate
This commit is contained in:
@@ -24,7 +24,9 @@
|
||||
"Create Meeting": "Create Meeting",
|
||||
"Set Held": "Set Held",
|
||||
"Set Not Held": "Set Not Held",
|
||||
"Send Invitations": "Send Invitations"
|
||||
"Send Invitations": "Send Invitations",
|
||||
"Saved as Held": "Saved as Held",
|
||||
"Saved as Not Held": "Saved as Not Held"
|
||||
},
|
||||
"presetFilters": {
|
||||
"planned": "Planned",
|
||||
|
||||
@@ -1,69 +1,80 @@
|
||||
{
|
||||
"controller": "Controllers.Record",
|
||||
"views":{
|
||||
"detail":"Crm:Call.Detail"
|
||||
},
|
||||
"sidePanels":{
|
||||
"detail":[
|
||||
{
|
||||
"name":"attendees",
|
||||
"label":"Attendees",
|
||||
"view":"Record.Panels.Side",
|
||||
"options":{
|
||||
"fields":[
|
||||
"users",
|
||||
"contacts",
|
||||
"leads"
|
||||
],
|
||||
"mode":"detail"
|
||||
}
|
||||
}
|
||||
],
|
||||
"edit":[
|
||||
{
|
||||
"name":"attendees",
|
||||
"label":"Attendees",
|
||||
"view":"Record.Panels.Side",
|
||||
"options":{
|
||||
"fields":[
|
||||
"users",
|
||||
"contacts",
|
||||
"leads"
|
||||
],
|
||||
"mode":"edit"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"presetFilters": [
|
||||
{
|
||||
"name":"planned",
|
||||
"style": "primary",
|
||||
"data": {
|
||||
"status": {
|
||||
"type": "in",
|
||||
"value": ["Planned"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name":"held",
|
||||
"style": "success",
|
||||
"data": {
|
||||
"status": {
|
||||
"type": "in",
|
||||
"value": ["Held"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name":"todays",
|
||||
"data": {
|
||||
"dateStart": {
|
||||
"type": "today",
|
||||
"dateTime": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"controller": "Controllers.Record",
|
||||
"views":{
|
||||
"detail":"Crm:Call.Detail"
|
||||
},
|
||||
"menu": {
|
||||
"detail": {
|
||||
"dropdown": [
|
||||
{
|
||||
"label": "Duplicate",
|
||||
"action": "duplicate",
|
||||
"acl": "edit"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sidePanels":{
|
||||
"detail":[
|
||||
{
|
||||
"name":"attendees",
|
||||
"label":"Attendees",
|
||||
"view":"Record.Panels.Side",
|
||||
"options":{
|
||||
"fields":[
|
||||
"users",
|
||||
"contacts",
|
||||
"leads"
|
||||
],
|
||||
"mode":"detail"
|
||||
}
|
||||
}
|
||||
],
|
||||
"edit":[
|
||||
{
|
||||
"name":"attendees",
|
||||
"label":"Attendees",
|
||||
"view":"Record.Panels.Side",
|
||||
"options":{
|
||||
"fields":[
|
||||
"users",
|
||||
"contacts",
|
||||
"leads"
|
||||
],
|
||||
"mode":"edit"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"presetFilters": [
|
||||
{
|
||||
"name":"planned",
|
||||
"style": "primary",
|
||||
"data": {
|
||||
"status": {
|
||||
"type": "in",
|
||||
"value": ["Planned"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name":"held",
|
||||
"style": "success",
|
||||
"data": {
|
||||
"status": {
|
||||
"type": "in",
|
||||
"value": ["Held"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name":"todays",
|
||||
"data": {
|
||||
"dateStart": {
|
||||
"type": "today",
|
||||
"dateTime": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,69 +1,80 @@
|
||||
{
|
||||
"controller": "Controllers.Record",
|
||||
"views":{
|
||||
"detail":"Crm:Meeting.Detail"
|
||||
},
|
||||
"sidePanels":{
|
||||
"detail":[
|
||||
{
|
||||
"name":"attendees",
|
||||
"label":"Attendees",
|
||||
"view":"Record.Panels.Side",
|
||||
"options":{
|
||||
"fields":[
|
||||
"users",
|
||||
"contacts",
|
||||
"leads"
|
||||
],
|
||||
"mode":"detail"
|
||||
}
|
||||
}
|
||||
],
|
||||
"edit":[
|
||||
{
|
||||
"name":"attendees",
|
||||
"label":"Attendees",
|
||||
"view":"Record.Panels.Side",
|
||||
"options":{
|
||||
"fields":[
|
||||
"users",
|
||||
"contacts",
|
||||
"leads"
|
||||
],
|
||||
"mode":"edit"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"presetFilters": [
|
||||
{
|
||||
"name":"planned",
|
||||
"style": "primary",
|
||||
"data": {
|
||||
"status": {
|
||||
"type": "in",
|
||||
"value": ["Planned"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name":"held",
|
||||
"style": "success",
|
||||
"data": {
|
||||
"status": {
|
||||
"type": "in",
|
||||
"value": ["Held"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name":"todays",
|
||||
"data": {
|
||||
"dateStart": {
|
||||
"type": "today",
|
||||
"dateTime": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"controller": "Controllers.Record",
|
||||
"views":{
|
||||
"detail":"Crm:Meeting.Detail"
|
||||
},
|
||||
"menu": {
|
||||
"detail": {
|
||||
"dropdown": [
|
||||
{
|
||||
"label": "Duplicate",
|
||||
"action": "duplicate",
|
||||
"acl": "edit"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sidePanels":{
|
||||
"detail":[
|
||||
{
|
||||
"name":"attendees",
|
||||
"label":"Attendees",
|
||||
"view":"Record.Panels.Side",
|
||||
"options":{
|
||||
"fields":[
|
||||
"users",
|
||||
"contacts",
|
||||
"leads"
|
||||
],
|
||||
"mode":"detail"
|
||||
}
|
||||
}
|
||||
],
|
||||
"edit":[
|
||||
{
|
||||
"name":"attendees",
|
||||
"label":"Attendees",
|
||||
"view":"Record.Panels.Side",
|
||||
"options":{
|
||||
"fields":[
|
||||
"users",
|
||||
"contacts",
|
||||
"leads"
|
||||
],
|
||||
"mode":"edit"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"presetFilters": [
|
||||
{
|
||||
"name":"planned",
|
||||
"style": "primary",
|
||||
"data": {
|
||||
"status": {
|
||||
"type": "in",
|
||||
"value": ["Planned"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name":"held",
|
||||
"style": "success",
|
||||
"data": {
|
||||
"status": {
|
||||
"type": "in",
|
||||
"value": ["Held"]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name":"todays",
|
||||
"data": {
|
||||
"dateStart": {
|
||||
"type": "today",
|
||||
"dateTime": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -112,7 +112,8 @@
|
||||
"Primary": "Primary",
|
||||
"Save Filters": "Save Filters",
|
||||
"Administration": "Administration",
|
||||
"Run Import": "Run Import"
|
||||
"Run Import": "Run Import",
|
||||
"Duplicate": "Duplicate"
|
||||
},
|
||||
"messages": {
|
||||
"notModified": "You have not modified the record",
|
||||
|
||||
@@ -69,31 +69,31 @@
|
||||
},
|
||||
|
||||
actionSetHeld: function () {
|
||||
if (confirm(this.translate('Are you sure?'))) {
|
||||
this.model.save({
|
||||
status: 'Held'
|
||||
}, {
|
||||
patch: true,
|
||||
success: function () {
|
||||
this.notify('Saved as Held', 'success');
|
||||
this.$el.find('button[data-action="sendInvitations"]').remove();
|
||||
}.bind(this),
|
||||
});
|
||||
}
|
||||
this.model.save({
|
||||
status: 'Held'
|
||||
}, {
|
||||
patch: true,
|
||||
success: function () {
|
||||
this.notify('Saved as Held', 'success');
|
||||
this.$el.find('button[data-action="sendInvitations"]').remove();
|
||||
this.$el.find('a[data-action="setHeld"]').remove();
|
||||
this.$el.find('a[data-action="setNotHeld"]').remove();
|
||||
}.bind(this),
|
||||
});
|
||||
},
|
||||
|
||||
actionSetNotHeld: function () {
|
||||
if (confirm(this.translate('Are you sure?'))) {
|
||||
this.model.save({
|
||||
status: 'Not Held'
|
||||
}, {
|
||||
patch: true,
|
||||
success: function () {
|
||||
this.notify('Saved as Not Held', 'success');
|
||||
this.$el.find('button[data-action="sendInvitations"]').remove();
|
||||
}.bind(this),
|
||||
});
|
||||
}
|
||||
this.model.save({
|
||||
status: 'Not Held'
|
||||
}, {
|
||||
patch: true,
|
||||
success: function () {
|
||||
this.notify('Saved as Not Held', 'success');
|
||||
this.$el.find('button[data-action="sendInvitations"]').remove();
|
||||
this.$el.find('a[data-action="setHeld"]').remove();
|
||||
this.$el.find('a[data-action="setNotHeld"]').remove();
|
||||
}.bind(this),
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
@@ -69,31 +69,31 @@ Espo.define('Crm:Views.Meeting.Detail', 'Views.Detail', function (Dep) {
|
||||
},
|
||||
|
||||
actionSetHeld: function () {
|
||||
if (confirm(this.translate('Are you sure?'))) {
|
||||
this.model.save({
|
||||
status: 'Held'
|
||||
}, {
|
||||
patch: true,
|
||||
success: function () {
|
||||
this.notify('Saved as Held', 'success');
|
||||
Espo.Ui.success(this.translate('Saved as Held', 'labels', 'Meeting'));
|
||||
this.$el.find('button[data-action="sendInvitations"]').remove();
|
||||
this.$el.find('a[data-action="setHeld"]').remove();
|
||||
this.$el.find('a[data-action="setNotHeld"]').remove();
|
||||
}.bind(this),
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
actionSetNotHeld: function () {
|
||||
if (confirm(this.translate('Are you sure?'))) {
|
||||
this.model.save({
|
||||
status: 'Not Held'
|
||||
}, {
|
||||
patch: true,
|
||||
success: function () {
|
||||
this.notify('Saved as Not Held', 'success');
|
||||
Espo.Ui.success(this.translate('Saved as Not Held', 'labels', 'Meeting'));
|
||||
this.$el.find('button[data-action="sendInvitations"]').remove();
|
||||
this.$el.find('a[data-action="setHeld"]').remove();
|
||||
this.$el.find('a[data-action="setNotHeld"]').remove();
|
||||
}.bind(this),
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
@@ -269,7 +269,20 @@ Espo.define('Views.Detail', 'Views.Main', function (Dep) {
|
||||
});
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}
|
||||
},
|
||||
|
||||
actionDuplicate: function () {
|
||||
var attributes = Espo.Utils.cloneDeep(this.model.attributes);
|
||||
delete attributes.id;
|
||||
|
||||
var url = '#' + this.scope + '/create';
|
||||
|
||||
this.getRouter().dispatch(this.scope, 'create', {
|
||||
attributes: attributes,
|
||||
});
|
||||
this.getRouter().navigate(url, {trigger: false});
|
||||
},
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user