Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plant floor #100

Draft
wants to merge 10 commits into
base: version-15
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions inventory_tools/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"Stock Entry": "public/js/custom/stock_entry_custom.js",
"Work Order": "public/js/custom/work_order_custom.js",
"Workstation": "public/js/custom/workstation_custom.js",
"Plant Floor": "public/js/custom/plant_floor_custom.js",
}
# doctype_list_js = {"doctype" : "public/js/doctype_list.js"}
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
Expand Down
324 changes: 324 additions & 0 deletions inventory_tools/inventory_tools/custom/plant_floor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,324 @@
{
"custom_fields": [
{
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2024-07-04 15:38:09.698991",
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"dt": "Plant Floor",
"fetch_from": null,
"fetch_if_empty": 0,
"fieldname": "section_break_yy0ja",
"fieldtype": "Section Break",
"hidden": 0,
"hide_border": 0,
"hide_days": 0,
"hide_seconds": 0,
"idx": 8,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "diagram",
"is_system_generated": 0,
"is_virtual": 0,
"label": "",
"length": 0,
"link_filters": null,
"mandatory_depends_on": null,
"modified": "2024-07-04 16:46:27.224882",
"modified_by": "Administrator",
"module": "Inventory Tools",
"name": "Plant Floor-section_break_yy0ja",
"no_copy": 0,
"non_negative": 0,
"options": null,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"read_only_depends_on": null,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"show_dashboard": 0,
"sort_options": 0,
"translatable": 0,
"unique": 0,
"width": null
},
{
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2024-07-04 16:45:52.906546",
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"dt": "Plant Floor",
"fetch_from": null,
"fetch_if_empty": 0,
"fieldname": "diagram",
"fieldtype": "JSON",
"hidden": 1,
"hide_border": 0,
"hide_days": 0,
"hide_seconds": 0,
"idx": 7,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "floor_layout",
"is_system_generated": 0,
"is_virtual": 0,
"label": "",
"length": 0,
"link_filters": null,
"mandatory_depends_on": null,
"modified": "2024-07-04 16:46:27.219134",
"modified_by": "Administrator",
"module": "Inventory Tools",
"name": "Plant Floor-diagram",
"no_copy": 0,
"non_negative": 0,
"options": null,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"read_only_depends_on": null,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"show_dashboard": 0,
"sort_options": 0,
"translatable": 0,
"unique": 0,
"width": null
},
{
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2024-07-04 15:51:11.272444",
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"dt": "Plant Floor",
"fetch_from": null,
"fetch_if_empty": 0,
"fieldname": "plant_floor_layout",
"fieldtype": "Attach Image",
"hidden": 0,
"hide_border": 0,
"hide_days": 0,
"hide_seconds": 0,
"idx": 14,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "warehouse",
"is_system_generated": 0,
"is_virtual": 0,
"label": "Plant Floor Layout",
"length": 0,
"link_filters": null,
"mandatory_depends_on": null,
"modified": "2024-07-04 15:51:50.272626",
"modified_by": "Administrator",
"module": "Inventory Tools",
"name": "Plant Floor-plant_floor_layout",
"no_copy": 0,
"non_negative": 0,
"options": null,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"read_only_depends_on": null,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"show_dashboard": 0,
"sort_options": 0,
"translatable": 0,
"unique": 0,
"width": null
},
{
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2024-07-04 15:51:11.180943",
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"dt": "Plant Floor",
"fetch_from": null,
"fetch_if_empty": 0,
"fieldname": "column_break_qdykt",
"fieldtype": "Column Break",
"hidden": 0,
"hide_border": 0,
"hide_days": 0,
"hide_seconds": 0,
"idx": 12,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "company",
"is_system_generated": 0,
"is_virtual": 0,
"label": "",
"length": 0,
"link_filters": null,
"mandatory_depends_on": null,
"modified": "2024-07-04 15:51:41.140452",
"modified_by": "Administrator",
"module": "Inventory Tools",
"name": "Plant Floor-column_break_qdykt",
"no_copy": 0,
"non_negative": 0,
"options": null,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"read_only_depends_on": null,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"show_dashboard": 0,
"sort_options": 0,
"translatable": 0,
"unique": 0,
"width": null
},
{
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2024-07-04 15:38:09.606160",
"default": null,
"depends_on": null,
"description": null,
"docstatus": 0,
"dt": "Plant Floor",
"fetch_from": null,
"fetch_if_empty": 0,
"fieldname": "floor_layout",
"fieldtype": "HTML",
"hidden": 0,
"hide_border": 0,
"hide_days": 0,
"hide_seconds": 0,
"idx": 6,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "details_tab",
"is_system_generated": 0,
"is_virtual": 0,
"label": "",
"length": 0,
"link_filters": null,
"mandatory_depends_on": null,
"modified": "2024-07-04 15:38:49.339415",
"modified_by": "Administrator",
"module": "Inventory Tools",
"name": "Plant Floor-floor_layout",
"no_copy": 0,
"non_negative": 0,
"options": null,
"owner": "Administrator",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"read_only_depends_on": null,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"show_dashboard": 0,
"sort_options": 0,
"translatable": 0,
"unique": 0,
"width": null
}
],
"custom_perms": [],
"doctype": "Plant Floor",
"links": [],
"property_setters": [],
"sync_on_migrate": 1
}
8 changes: 8 additions & 0 deletions inventory_tools/public/js/custom/plant_floor_custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
frappe.ui.form.on('Plant Floor', {
onload_post_render: frm => {
inventory_tools.mount(frm)
},
refresh: frm => {
frm.page.wrapper.find('.layout-side-section').hide()
},
})
10 changes: 10 additions & 0 deletions inventory_tools/public/js/inventory_tools.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import PlantFloor from './plant_floor/PlantFloor.vue'
import { createApp } from 'vue'

frappe.provide('inventory_tools')

inventory_tools.mount = frm => {
$(frm.fields_dict['floor_layout'].wrapper).html($("<div id='plant-floor-layout'></div>").get(0))
frm.plant_floor_layout = createApp(PlantFloor)
frm.plant_floor_layout.mount('#plant-floor-layout')
}
Loading
Loading