mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-17 17:26:43 +00:00
* fix: ui clean-up (#43305)
fix: ui cleanup
(cherry picked from commit b127a0c8b7)
# Conflicts:
# erpnext/manufacturing/doctype/bom_creator/bom_creator.json
# erpnext/manufacturing/doctype/plant_floor/plant_floor.json
# erpnext/public/js/templates/visual_plant_floor_template.html
* chore: fix conflicts
* chore: fix conflicts
* chore: fix conflicts
---------
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -280,6 +280,7 @@
|
|||||||
"read_only": 1
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_toolbar": 1,
|
||||||
"icon": "fa fa-sitemap",
|
"icon": "fa fa-sitemap",
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [
|
"links": [
|
||||||
@@ -288,7 +289,7 @@
|
|||||||
"link_fieldname": "bom_creator"
|
"link_fieldname": "bom_creator"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2024-04-02 16:30:59.779190",
|
"modified": "2024-09-21 09:05:52.945112",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Creator",
|
"name": "BOM Creator",
|
||||||
|
|||||||
@@ -6,6 +6,22 @@ frappe.ui.form.on("Plant Floor", {
|
|||||||
frm.trigger("setup_queries");
|
frm.trigger("setup_queries");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
add_workstation(frm) {
|
||||||
|
frm.add_custom_button(__("Create Workstation"), () => {
|
||||||
|
var doc = frappe.model.get_new_doc("Workstation");
|
||||||
|
doc.plant_floor = frm.doc.name;
|
||||||
|
doc.status = "Off";
|
||||||
|
frappe.ui.form.make_quick_entry(
|
||||||
|
"Workstation",
|
||||||
|
() => {
|
||||||
|
frm.trigger("prepare_workstation_dashboard");
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
doc
|
||||||
|
);
|
||||||
|
}).addClass("btn-primary");
|
||||||
|
},
|
||||||
|
|
||||||
setup_queries(frm) {
|
setup_queries(frm) {
|
||||||
frm.set_query("warehouse", (doc) => {
|
frm.set_query("warehouse", (doc) => {
|
||||||
if (!doc.company) {
|
if (!doc.company) {
|
||||||
@@ -24,6 +40,11 @@ frappe.ui.form.on("Plant Floor", {
|
|||||||
refresh(frm) {
|
refresh(frm) {
|
||||||
frm.trigger("prepare_stock_dashboard");
|
frm.trigger("prepare_stock_dashboard");
|
||||||
frm.trigger("prepare_workstation_dashboard");
|
frm.trigger("prepare_workstation_dashboard");
|
||||||
|
|
||||||
|
if (!frm.is_new()) {
|
||||||
|
frm.trigger("add_workstation");
|
||||||
|
frm.disable_save();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
prepare_workstation_dashboard(frm) {
|
prepare_workstation_dashboard(frm) {
|
||||||
|
|||||||
@@ -69,9 +69,10 @@
|
|||||||
"options": "Company"
|
"options": "Company"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"hide_toolbar": 1,
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-01-30 11:59:07.508535",
|
"modified": "2024-09-19 19:06:36.481625",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "Plant Floor",
|
"name": "Plant Floor",
|
||||||
@@ -94,4 +95,4 @@
|
|||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": []
|
"states": []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ frappe.ui.form.on("Work Order", {
|
|||||||
frm.doc.produced_qty > 0
|
frm.doc.produced_qty > 0
|
||||||
) {
|
) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
__("Disassembly Order"),
|
__("Disassemble Order"),
|
||||||
() => {
|
() => {
|
||||||
frm.trigger("make_disassembly_order");
|
frm.trigger("make_disassembly_order");
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ class BOMConfigurator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
frappe.views.trees["BOM Configurator"] = new frappe.views.TreeView(options);
|
frappe.views.trees["BOM Configurator"] = new frappe.views.TreeView(options);
|
||||||
|
let node = frappe.views.trees["BOM Configurator"].tree.root_node;
|
||||||
|
frappe.views.trees["BOM Configurator"].tree.show_toolbar(node);
|
||||||
|
frappe.views.trees["BOM Configurator"].tree.load_children(node, true);
|
||||||
this.tree_view = frappe.views.trees["BOM Configurator"];
|
this.tree_view = frappe.views.trees["BOM Configurator"];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +140,7 @@ class BOMConfigurator {
|
|||||||
btnClass: "hidden-xs",
|
btnClass: "hidden-xs",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: __("Expand All"),
|
label: __("Collapse All"),
|
||||||
click: function (node) {
|
click: function (node) {
|
||||||
let view = frappe.views.trees["BOM Configurator"];
|
let view = frappe.views.trees["BOM Configurator"];
|
||||||
|
|
||||||
@@ -283,6 +286,13 @@ class BOMConfigurator {
|
|||||||
fieldtype: "Float",
|
fieldtype: "Float",
|
||||||
reqd: 1,
|
reqd: 1,
|
||||||
read_only: read_only,
|
read_only: read_only,
|
||||||
|
change() {
|
||||||
|
this.layout.fields_dict.items.grid.data.forEach((row) => {
|
||||||
|
row.qty = flt(this.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.layout.fields_dict.items.grid.refresh();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ fieldtype: "Section Break" },
|
{ fieldtype: "Section Break" },
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
{% $.each(workstations, (idx, row) => { %}
|
{% $.each(workstations, (idx, row) => { %}
|
||||||
<div class="workstation-wrapper">
|
<div class="workstation-wrapper">
|
||||||
|
<div class="workstation-status text-right">
|
||||||
|
{% if(row.status == "Production") { %}
|
||||||
|
<div class="ring-container">
|
||||||
|
<div class="ringring"></div>
|
||||||
|
<div class="circle"></div>
|
||||||
|
</div>
|
||||||
|
{% } %}
|
||||||
|
<span class="indicator-pill no-indicator-dot whitespace-nowrap {{row.color}}" style="margin: 3px 4px 0px 0px;">
|
||||||
|
<span style="font-size:13px">{{row.status}}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div class="workstation-image">
|
<div class="workstation-image">
|
||||||
<div class="flex items-center justify-center h-32 border-b-grey text-6xl text-grey-100">
|
<div class="flex items-center justify-center h-32 border-b-grey text-6xl text-grey-100">
|
||||||
<a class="workstation-image-link" href="{{row.workstation_link}}">
|
<a class="workstation-image-link" href="{{row.workstation_link}}">
|
||||||
@@ -11,9 +22,10 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="workstation-card text-center">
|
<div class="workstation-card" style="display: grid;">
|
||||||
<p style="background-color:{{row.background_color}};color:#fff">{{row.status}}</p>
|
<span class="ellipsis" title="{{row.name}}">
|
||||||
<div>{{row.workstation_name}}</div>
|
{{row.workstation_name}}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% }); %}
|
{% }); %}
|
||||||
|
|||||||
@@ -507,6 +507,47 @@ body[data-route="pos"] {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ring-container {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
width: 9px;
|
||||||
|
height: 9px;
|
||||||
|
background-color: #278f5e;
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;
|
||||||
|
left: 9px;
|
||||||
|
top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulsate {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: scale(0.1, 0.1);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: scale(1.2, 1.2);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ringring {
|
||||||
|
border: 2px solid #62bd19;
|
||||||
|
-webkit-border-radius: 40px;
|
||||||
|
height: 15px;
|
||||||
|
width: 15px;
|
||||||
|
position: absolute;
|
||||||
|
left: 6px;
|
||||||
|
top: 5px;
|
||||||
|
-webkit-animation: pulsate 3s ease-out;
|
||||||
|
-webkit-animation-iteration-count: infinite;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.plant-floor {
|
.plant-floor {
|
||||||
padding-bottom: 25px;
|
padding-bottom: 25px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user