[feat] new component: ItemPublishDialog

This commit is contained in:
Prateeksha Singh
2018-08-20 14:02:33 +05:30
parent 4ce54b0011
commit 6faffa5007
3 changed files with 118 additions and 106 deletions

View File

@@ -0,0 +1,39 @@
function ItemPublishDialog(primary_action, secondary_action) {
let dialog = new frappe.ui.Dialog({
title: __('Edit Publishing Details'),
fields: [
{
"label": "Item Code",
"fieldname": "item_code",
"fieldtype": "Data",
"read_only": 1
},
{
"label": "Hub Category",
"fieldname": "hub_category",
"fieldtype": "Autocomplete",
"options": ["Agriculture", "Books", "Chemicals", "Clothing",
"Electrical", "Electronics", "Energy", "Fashion", "Food and Beverage",
"Health", "Home", "Industrial", "Machinery", "Packaging and Printing",
"Sports", "Transportation"
],
"reqd": 1
},
{
"label": "Images",
"fieldname": "image_list",
"fieldtype": "MultiSelect",
"options": [],
"reqd": 1
}
],
primary_action_label: primary_action.label || __('Set Details'),
primary_action: primary_action.fn,
secondary_action: secondary_action.fn
});
return dialog;
}
export {
ItemPublishDialog
}