Initial commit of Asset Lite app

This commit is contained in:
Duradundi Hadimani 2025-12-11 13:37:26 +05:30
commit 7178234ff8
274 changed files with 68990 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
.DS_Store
*.pyc
*.egg-info
*.swp
tags
node_modules
__pycache__

7
README.md Normal file
View File

@ -0,0 +1,7 @@
## Asset Lite
Asset Management System
#### License
mit

1
asset_lite/__init__.py Normal file
View File

@ -0,0 +1 @@
__version__ = "0.0.1"

30
asset_lite/api/api.py Normal file
View File

@ -0,0 +1,30 @@
import frappe
def set_default_homepage():
"""
Set the default workspace based on the user's role.
"""
# Get the current user
current_user = frappe.session.user
# Skip for system users
if current_user in ("Administrator", "Guest"):
return
# Define role-based workspaces
role_based_workspaces = {
"Maintenance Manager": "asset-management",
#"Maintenance User": "asset-management",
#"Technician": "asset-management"
}
# Get the user's roles
user_roles = frappe.get_roles(current_user)
# Determine the default workspace
for role, workspace in role_based_workspaces.items():
if role in user_roles:
# Set the session home page
frappe.local.response["home_page"] = f"/app/{workspace}"
return

View File

View File

@ -0,0 +1,47 @@
frappe.dashboards.chart_sources["Active Map Widget"] = {
method: "asset_lite.map.get_custom_html_data",
filters: []
};
// Override the chart rendering after data is loaded
frappe.provide('frappe.dashboards');
$(document).on('app_ready', function() {
// Override the render method for custom HTML charts
const original_render = frappe.ui.Dashboard.prototype.render_chart;
frappe.ui.Dashboard.prototype.render_chart = function(chart_data, chart_container) {
if (chart_data.custom_html) {
// Clear the container and add custom HTML
chart_container.empty();
const custom_html = `
<div style="padding: 20px; background: #f8f9fa; border-radius: 8px; margin: 10px;">
<h4 style="margin-bottom: 15px; color: #333;">Custom Dashboard Content</h4>
<div class="row">
<div class="col-md-6">
<div class="card" style="border: 1px solid #ddd; padding: 15px;">
<h5>Card Title 1</h5>
<p>Your custom content here</p>
<button class="btn btn-primary btn-sm">Action Button</button>
</div>
</div>
<div class="col-md-6">
<div class="card" style="border: 1px solid #ddd; padding: 15px;">
<h5>Card Title 2</h5>
<p>More custom content</p>
<div class="progress" style="height: 20px;">
<div class="progress-bar" style="width: 75%">75%</div>
</div>
</div>
</div>
</div>
</div>
`;
chart_container.html(custom_html);
return;
}
// Call original render method for other charts
return original_render.call(this, chart_data, chart_container);
};
});

View File

@ -0,0 +1,13 @@
{
"creation": "2025-06-25 18:03:16.704998",
"docstatus": 0,
"doctype": "Dashboard Chart Source",
"idx": 0,
"modified": "2025-06-25 18:03:16.704998",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Active Map Widget",
"owner": "Administrator",
"source_name": "Active Map Widget",
"timeseries": 0
}

View File

@ -0,0 +1,8 @@
// Copyright (c) 2024, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Agent", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,45 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:agent_name",
"creation": "2024-12-13 14:37:38.780730",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"agent_name"
],
"fields": [
{
"fieldname": "agent_name",
"fieldtype": "Data",
"label": "Agent Name",
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-12-13 15:15:47.447599",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Agent",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Agent(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestAgent(FrappeTestCase):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2025, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Arabic Names", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,50 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:name1",
"creation": "2025-02-07 16:56:53.486694",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"name1",
"arabic_name"
],
"fields": [
{
"fieldname": "name1",
"fieldtype": "Data",
"label": "Name",
"unique": 1
},
{
"fieldname": "arabic_name",
"fieldtype": "Data",
"label": "Arabic Name"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-02-07 16:57:50.823039",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Arabic Names",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class ArabicNames(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestArabicNames(FrappeTestCase):
pass

View File

@ -0,0 +1,59 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-08-26 21:00:34.676325",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"asset",
"asset_name",
"qty",
"column_break_kbew",
"return_inspection_committee"
],
"fields": [
{
"fieldname": "asset",
"fieldtype": "Link",
"label": "Asset",
"options": "Asset"
},
{
"fetch_from": "asset.asset_name",
"fetch_if_empty": 1,
"fieldname": "asset_name",
"fieldtype": "Data",
"label": "Asset Name"
},
{
"default": "1",
"fieldname": "qty",
"fieldtype": "Float",
"label": "Qty"
},
{
"fieldname": "column_break_kbew",
"fieldtype": "Column Break"
},
{
"fieldname": "return_inspection_committee",
"fieldtype": "Select",
"label": "Return Inspection Committee",
"options": "\nFor Repair\nFor Sale\nFor Disposal"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-08-26 21:00:34.676325",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Asset Item Transfer",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class AssetItemTransfer(Document):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2024, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Asset Type", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,47 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:asset_type",
"creation": "2024-09-23 14:16:49.149093",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"asset_type"
],
"fields": [
{
"fieldname": "asset_type",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Asset Type",
"reqd": 1,
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-09-23 14:17:58.073254",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Asset Type",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class AssetType(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestAssetType(FrappeTestCase):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2025, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("City", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,44 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:city",
"creation": "2025-08-26 15:20:17.013649",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"city"
],
"fields": [
{
"fieldname": "city",
"fieldtype": "Data",
"label": "City",
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-08-26 20:43:50.686274",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "City",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class City(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestCity(FrappeTestCase):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2024, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("ECRI UMDNS", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,51 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:ecri",
"creation": "2024-12-03 14:43:40.910282",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"ecri",
"device_name"
],
"fields": [
{
"fieldname": "ecri",
"fieldtype": "Data",
"label": "ECRI",
"unique": 1
},
{
"fieldname": "device_name",
"fieldtype": "Data",
"label": "Device Name"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-12-03 18:43:19.609779",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "ECRI UMDNS",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class ECRIUMDNS(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestECRIUMDNS(FrappeTestCase):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2025, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Feedback", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,77 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-03-05 19:53:51.796362",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"work_order",
"column_break_eytf",
"feedback_by",
"section_break_rvtb",
"parameters",
"section_break_zmrx",
"overall"
],
"fields": [
{
"fieldname": "work_order",
"fieldtype": "Link",
"label": "Work Order",
"options": "Work_Order"
},
{
"fieldname": "column_break_eytf",
"fieldtype": "Column Break"
},
{
"fieldname": "feedback_by",
"fieldtype": "Link",
"label": "Feedback by",
"options": "User"
},
{
"fieldname": "section_break_rvtb",
"fieldtype": "Section Break"
},
{
"fieldname": "parameters",
"fieldtype": "Table",
"label": "Parameters",
"options": "Feedback Table"
},
{
"fieldname": "section_break_zmrx",
"fieldtype": "Section Break"
},
{
"fieldname": "overall",
"fieldtype": "Rating",
"label": "Overall"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-03-05 19:56:58.056262",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Feedback",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Feedback(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestFeedback(FrappeTestCase):
pass

View File

@ -0,0 +1,44 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-03-05 20:36:14.651301",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"parameter",
"rating",
"feedback"
],
"fields": [
{
"fieldname": "parameter",
"fieldtype": "Data",
"label": "Parameter"
},
{
"fieldname": "rating",
"fieldtype": "Rating",
"in_list_view": 1,
"label": "Rating",
"reqd": 1
},
{
"fieldname": "feedback",
"fieldtype": "Text",
"label": "Feedback"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-03-05 20:49:43.458939",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Feedback Table",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class FeedbackTable(Document):
pass

View File

@ -0,0 +1,64 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-08-26 21:01:28.397119",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"item",
"qty",
"uom",
"column_break_gcjw",
"item_name",
"return_inspection_committee"
],
"fields": [
{
"fieldname": "item",
"fieldtype": "Link",
"label": "Item",
"options": "Item"
},
{
"fieldname": "qty",
"fieldtype": "Float",
"label": "Qty"
},
{
"fetch_from": "item.stock_uom",
"fetch_if_empty": 1,
"fieldname": "uom",
"fieldtype": "Link",
"label": "UOM",
"options": "UOM"
},
{
"fieldname": "column_break_gcjw",
"fieldtype": "Column Break"
},
{
"fieldname": "item_name",
"fieldtype": "Data",
"label": "Item Name"
},
{
"fieldname": "return_inspection_committee",
"fieldtype": "Select",
"label": "Return Inspection Committee",
"options": "\nFor Repair\nFor Sale\nFor Disposal"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-08-26 21:01:28.397119",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Item Transfer Table",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class ItemTransferTable(Document):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2025, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Material Transfer", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,128 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:Material-Transfer-{####}",
"creation": "2025-08-26 21:02:44.817236",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"hospital",
"purpose",
"source_warehouse",
"asset",
"column_break_irlz",
"date",
"reason_for_return",
"transfer_type",
"target_warehouse",
"item",
"section_break_bunw",
"item_table",
"asset_transfer"
],
"fields": [
{
"fieldname": "hospital",
"fieldtype": "Link",
"label": "Hospital",
"options": "Company"
},
{
"fieldname": "purpose",
"fieldtype": "Select",
"label": "Purpose",
"options": "Transfer"
},
{
"fieldname": "source_warehouse",
"fieldtype": "Link",
"label": "Source Warehouse",
"options": "Warehouse"
},
{
"depends_on": "eval:doc.transfer_type=='Asset'",
"fieldname": "asset",
"fieldtype": "Link",
"label": "Asset",
"options": "Asset"
},
{
"fieldname": "column_break_irlz",
"fieldtype": "Column Break"
},
{
"default": "Today",
"fieldname": "date",
"fieldtype": "Date",
"label": "Date"
},
{
"fieldname": "reason_for_return",
"fieldtype": "Select",
"label": "Reason for Return",
"options": "\nPurpose Completed\nSurplus\nUnusable\nDamaged"
},
{
"fieldname": "transfer_type",
"fieldtype": "Select",
"label": "Transfer Type",
"options": "\nAsset\nItem"
},
{
"fieldname": "target_warehouse",
"fieldtype": "Link",
"label": "Target Warehouse",
"options": "Warehouse"
},
{
"depends_on": "eval:doc.transfer_type=='Item'",
"fieldname": "item",
"fieldtype": "Link",
"label": "Item",
"options": "Item"
},
{
"fieldname": "section_break_bunw",
"fieldtype": "Section Break"
},
{
"depends_on": "eval:doc.transfer_type=='Item'",
"fieldname": "item_table",
"fieldtype": "Table",
"label": "Item Table",
"options": "Item Transfer Table"
},
{
"depends_on": "eval:doc.transfer_type=='Asset'",
"fieldname": "asset_transfer",
"fieldtype": "Table",
"label": "Asset Transfer",
"options": "Asset Item Transfer"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-08-26 21:02:44.817236",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Material Transfer",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class MaterialTransfer(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestMaterialTransfer(FrappeTestCase):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2025, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Mobile Team Site", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,58 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:site_name",
"creation": "2025-08-08 15:36:41.575671",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"site_name",
"mobile_team",
"city"
],
"fields": [
{
"fieldname": "site_name",
"fieldtype": "Data",
"label": "Site Name",
"unique": 1
},
{
"fieldname": "mobile_team",
"fieldtype": "Link",
"label": "Mobile Team",
"options": "Company"
},
{
"fieldname": "city",
"fieldtype": "Link",
"label": "City",
"options": "City"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-08-26 15:26:09.017274",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Mobile Team Site",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class MobileTeamSite(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestMobileTeamSite(FrappeTestCase):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2025, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Modality", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,44 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:modality",
"creation": "2025-09-08 12:40:28.438645",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"modality"
],
"fields": [
{
"fieldname": "modality",
"fieldtype": "Data",
"label": "Modality",
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-09-08 12:41:21.725442",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "Modality",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Modality(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestModality(FrappeTestCase):
pass

View File

@ -0,0 +1,38 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2024-09-20 13:15:43.666184",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"purchase_invoice",
"cost"
],
"fields": [
{
"fieldname": "purchase_invoice",
"fieldtype": "Link",
"label": "Purchase Invoice",
"options": "Purchase Invoice"
},
{
"fetch_from": "purchase_invoice.grand_total",
"fieldname": "cost",
"fieldtype": "Currency",
"label": "Cost"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-09-20 13:19:33.308381",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PI Table",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PITable(Document):
pass

View File

@ -0,0 +1,70 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-09-18 13:07:33.907967",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"asset",
"asset_name",
"start_date",
"end_date",
"manufacturer",
"model"
],
"fields": [
{
"fieldname": "asset",
"fieldtype": "Link",
"in_global_search": 1,
"in_list_view": 1,
"label": "Asset",
"options": "Asset"
},
{
"fieldname": "asset_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Asset Name",
"read_only": 1
},
{
"fieldname": "start_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Start Date"
},
{
"fieldname": "end_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "End Date"
},
{
"fieldname": "manufacturer",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Manufacturer",
"options": "Manufacturer"
},
{
"fieldname": "model",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Model"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-09-18 13:08:35.075783",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PM Entry Line",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PMEntryLine(Document):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2025, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("PM Schedule Generator", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,207 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:PMSG-{DD}-{MM}-{YY}-{####}",
"creation": "2025-09-08 13:29:07.175342",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"asset_details_section",
"hospital",
"manufacturer",
"model",
"column_break_qtoh",
"asset_name",
"modality",
"device_status",
"maintenance_details_section",
"start_date",
"maintenance_team",
"maintenance_manager",
"column_break_kapm",
"end_date",
"periodicity",
"assign_to",
"due_date",
"section_break_hkrb",
"maintenance_entries",
"amended_from"
],
"fields": [
{
"fieldname": "asset_details_section",
"fieldtype": "Section Break",
"label": "Asset Details"
},
{
"fieldname": "hospital",
"fieldtype": "Link",
"in_filter": 1,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Hospital",
"options": "Company",
"reqd": 1
},
{
"fieldname": "manufacturer",
"fieldtype": "Link",
"in_filter": 1,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Manufacturer",
"options": "Manufacturer"
},
{
"fieldname": "model",
"fieldtype": "Data",
"in_global_search": 1,
"in_list_view": 1,
"label": "Model"
},
{
"fieldname": "column_break_qtoh",
"fieldtype": "Column Break"
},
{
"fieldname": "asset_name",
"fieldtype": "Data",
"label": "Asset Name",
"read_only": 1
},
{
"fieldname": "device_status",
"fieldtype": "Select",
"label": "Device Status",
"options": "\nUp\nDown"
},
{
"fieldname": "maintenance_details_section",
"fieldtype": "Section Break",
"label": "Maintenance Details"
},
{
"fieldname": "start_date",
"fieldtype": "Date",
"label": "Start Date",
"reqd": 1
},
{
"fieldname": "maintenance_team",
"fieldtype": "Link",
"label": "Maintenance Team",
"mandatory_depends_on": "eval:doc.maintenance_entries && doc.maintenance_entries.length > 0",
"options": "Asset Maintenance Team"
},
{
"fetch_from": "maintenance_team.maintenance_manager",
"fetch_if_empty": 1,
"fieldname": "maintenance_manager",
"fieldtype": "Data",
"label": "Maintenance Manager"
},
{
"fieldname": "column_break_kapm",
"fieldtype": "Column Break"
},
{
"fieldname": "end_date",
"fieldtype": "Date",
"label": "End Date",
"reqd": 1
},
{
"fieldname": "periodicity",
"fieldtype": "Select",
"label": "Periodicity",
"mandatory_depends_on": "eval:doc.maintenance_entries && doc.maintenance_entries.length > 0",
"options": "\nDaily\nWeekly\nMonthly\nQuarterly\nHalf-yearly\nYearly\n2 Yearly\n3 Yearly",
"reqd": 1
},
{
"fieldname": "assign_to",
"fieldtype": "Link",
"label": "Assign To",
"mandatory_depends_on": "eval:doc.maintenance_entries && doc.maintenance_entries.length > 0",
"options": "User"
},
{
"fieldname": "due_date",
"fieldtype": "Date",
"label": "Due Date",
"read_only": 1
},
{
"fieldname": "section_break_hkrb",
"fieldtype": "Section Break"
},
{
"fieldname": "maintenance_entries",
"fieldtype": "Table",
"label": "Maintenance Entries",
"options": "PM Entry Line"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "PM Schedule Generator",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "PM Schedule Generator",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
{
"fieldname": "modality",
"fieldtype": "Link",
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Modality",
"options": "Modality"
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [
{
"link_doctype": "Asset Maintenance",
"link_fieldname": "custom_pm_schedule"
}
],
"modified": "2025-09-08 13:30:20.878126",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PM Schedule Generator",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PMScheduleGenerator(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestPMScheduleGenerator(FrappeTestCase):
pass

View File

@ -0,0 +1,32 @@
// Copyright (c) 2024, seyfert and contributors
// For license information, please see license.txt
frappe.ui.form.on('PPM', {
refresh: function(frm) {
// Hide the default print icon
frm.page.hide_icon_group('print');
// Add custom button for PPM Sticker with a print icon
frm.add_custom_button(
`<i class="fa fa-print"></i> ${__('PPM Sticker')}`,
function() {
// Set PPM Sticker as the default print format and open print preview
const customLink = `/printview?doctype=PPM&name=${frm.doc.name}&trigger_print=1&format=PPM%20Sticker&no_letterhead=0`;
window.open(customLink);
}
);
// Add custom button for PPM Service Report with a print icon
frm.add_custom_button(
`<i class="fa fa-print"></i> ${__('Service Report')}`,
function() {
// Set Service Report as the default print format and open print preview
const customLink = `/printview?doctype=PPM&name=${frm.doc.name}&trigger_print=1&format=PPM%20Service%20Report&no_letterhead=0`;
window.open(customLink);
}
);
}
});

View File

@ -0,0 +1,112 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:PPM-{data}-{####}",
"creation": "2024-09-23 17:32:15.127002",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"month",
"year",
"column_break_phdw",
"asset",
"asset_name",
"asset_maintenance_log",
"section_break_3",
"data",
"table",
"amended_from"
],
"fields": [
{
"fieldname": "month",
"fieldtype": "Select",
"label": "Month",
"options": "\nJanuary\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\nDecember"
},
{
"fieldname": "year",
"fieldtype": "Data",
"label": "Year"
},
{
"fieldname": "column_break_phdw",
"fieldtype": "Column Break"
},
{
"fieldname": "asset_maintenance_log",
"fieldtype": "Link",
"label": "Asset Maintenance Log",
"options": "Asset Maintenance Log",
"read_only": 1
},
{
"fieldname": "section_break_3",
"fieldtype": "Section Break"
},
{
"default": "CT Scan",
"fieldname": "data",
"fieldtype": "Link",
"label": "Template",
"options": "PPM Templates"
},
{
"fieldname": "table",
"fieldtype": "Table",
"options": "PPM Table"
},
{
"fetch_from": "asset_maintenance_log.asset_name",
"fieldname": "asset",
"fieldtype": "Link",
"label": "Asset",
"options": "Asset"
},
{
"fetch_from": "asset.asset_name",
"fieldname": "asset_name",
"fieldtype": "Data",
"label": "Asset Name",
"read_only": 1
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "PPM",
"print_hide": 1,
"read_only": 1,
"search_index": 1
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-09-23 18:16:03.998515",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PPM",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PPM(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestPPM(FrappeTestCase):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2024, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("PPM CT SCAN MACHINE TEMPLATE", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,43 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2024-09-13 15:46:54.680689",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"table_1"
],
"fields": [
{
"fieldname": "table_1",
"fieldtype": "Table",
"options": "PPM Table For CT Scan Machine"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-09-13 17:45:05.011562",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PPM CT SCAN MACHINE TEMPLATE",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PPMCTSCANMACHINETEMPLATE(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestPPMCTSCANMACHINETEMPLATE(FrappeTestCase):
pass

View File

@ -0,0 +1,78 @@
{
"actions": [],
"autoname": "autoincrement",
"creation": "2024-09-13 09:25:03.360604",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"room_numbers",
"electrical_switches",
"electrical_sockets_outlets",
"fluorescent_tubes",
"column_break_5",
"ballasts",
"starters",
"glass_cover_of_tube_lights"
],
"fields": [
{
"fieldname": "room_numbers",
"fieldtype": "Data",
"label": "Room Numbers"
},
{
"default": "0",
"fieldname": "electrical_switches",
"fieldtype": "Check",
"label": "Electrical switches"
},
{
"default": "0",
"fieldname": "electrical_sockets_outlets",
"fieldtype": "Check",
"label": "Electrical sockets/outlets"
},
{
"default": "0",
"fieldname": "fluorescent_tubes",
"fieldtype": "Check",
"label": "Fluorescent tubes"
},
{
"fieldname": "column_break_5",
"fieldtype": "Column Break"
},
{
"default": "0",
"fieldname": "ballasts",
"fieldtype": "Check",
"label": "Ballasts"
},
{
"default": "0",
"fieldname": "starters",
"fieldtype": "Check",
"label": "Starters"
},
{
"default": "0",
"fieldname": "glass_cover_of_tube_lights",
"fieldtype": "Check",
"label": "Glass cover of tube lights"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-09-13 17:45:12.282804",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PPM Electrical Fixtures Inside Rooms Table",
"naming_rule": "Autoincrement",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PPMElectricalFixturesInsideRoomsTable(Document):
pass

View File

@ -0,0 +1,92 @@
{
"actions": [],
"autoname": "autoincrement",
"creation": "2024-09-13 09:12:39.494608",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"location",
"wires",
"grounding",
"mcbs",
"connections",
"column_break_6",
"panel_door",
"panel_hinges_lock",
"schedule_of_panel",
"cleaning_of_panel"
],
"fields": [
{
"fieldname": "location",
"fieldtype": "Data",
"label": "Location"
},
{
"default": "0",
"fieldname": "wires",
"fieldtype": "Check",
"label": "Wires"
},
{
"default": "0",
"fieldname": "grounding",
"fieldtype": "Check",
"label": "Grounding"
},
{
"default": "0",
"fieldname": "mcbs",
"fieldtype": "Check",
"label": "MCB's"
},
{
"default": "0",
"fieldname": "connections",
"fieldtype": "Check",
"label": "Connections"
},
{
"fieldname": "column_break_6",
"fieldtype": "Column Break"
},
{
"default": "0",
"fieldname": "panel_door",
"fieldtype": "Check",
"label": "Panel door"
},
{
"default": "0",
"fieldname": "panel_hinges_lock",
"fieldtype": "Check",
"label": "Panel hinges & lock"
},
{
"default": "0",
"fieldname": "schedule_of_panel",
"fieldtype": "Check",
"label": "Schedule of panel"
},
{
"default": "0",
"fieldname": "cleaning_of_panel",
"fieldtype": "Check",
"label": "Cleaning of panel"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-09-13 17:45:14.076447",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PPM electricals Panels table",
"naming_rule": "Autoincrement",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PPMelectricalsPanelstable(Document):
pass

View File

@ -0,0 +1,38 @@
{
"actions": [],
"autoname": "autoincrement",
"creation": "2024-09-11 17:03:33.429492",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"room_no",
"check_2"
],
"fields": [
{
"fieldname": "room_no",
"fieldtype": "Data",
"label": "Room No"
},
{
"default": "0",
"fieldname": "check_2",
"fieldtype": "Check",
"label": "Value"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-09-13 17:45:14.941826",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PPM Fire Alarm Device Table",
"naming_rule": "Autoincrement",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PPMFireAlarmDeviceTable(Document):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2024, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("PPM MRI Template", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,43 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2024-09-13 15:44:37.160329",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"table_1"
],
"fields": [
{
"fieldname": "table_1",
"fieldtype": "Table",
"options": "PPM table for MRI"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-09-13 17:45:06.173357",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PPM MRI Template",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class PPMMRITemplate(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2024, seyfert and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestPPMMRITemplate(FrappeTestCase):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2024, seyfert and contributors
// For license information, please see license.txt
// frappe.ui.form.on("PPM OF CT SCAN MACHINE", {
// refresh(frm) {
// },
// });

View File

@ -0,0 +1,96 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:CT Scan - {####}",
"creation": "2024-09-13 15:47:34.231656",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"month",
"year",
"column_break_phdw",
"asset_maintenance_log",
"section_break_3",
"data",
"table",
"amended_from"
],
"fields": [
{
"fieldname": "month",
"fieldtype": "Select",
"label": "Month",
"options": "\nJanuary\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\nDecember"
},
{
"fieldname": "year",
"fieldtype": "Data",
"label": "Year"
},
{
"fieldname": "section_break_3",
"fieldtype": "Section Break"
},
{
"default": "CT Scan",
"fieldname": "data",
"fieldtype": "Link",
"label": "Template",
"options": "PPM Templates"
},
{
"fieldname": "table",
"fieldtype": "Table",
"options": "PPM Table For CT Scan Machine"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "PPM OF CT SCAN MACHINE",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
{
"fieldname": "column_break_phdw",
"fieldtype": "Column Break"
},
{
"fieldname": "asset_maintenance_log",
"fieldtype": "Link",
"label": "Asset Maintenance Log",
"options": "Asset Maintenance Log",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-09-23 16:47:36.569116",
"modified_by": "Administrator",
"module": "Asset Lite",
"name": "PPM OF CT SCAN MACHINE",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

Some files were not shown because too many files have changed in this diff Show More