diff --git a/frontend/src/api.js b/frontend/src/api.js
index c5868eb..29012f0 100644
--- a/frontend/src/api.js
+++ b/frontend/src/api.js
@@ -39,6 +39,12 @@ class Api {
return data;
}
+ static async getWarrantyData() {
+ const data = DataUtils.dummyWarrantyData;
+ console.log("DEBUG: API - getWarrantyData result: ", data);
+ return data;
+ }
+
static async getDocsList(doctype, fields = []) {
const docs = await frappe.db.get_list(doctype, { fields });
console.log(`DEBUG: API - Fetched ${doctype} list: `, docs);
diff --git a/frontend/src/components/DashboardModule.vue b/frontend/src/components/DashboardModule.vue
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/src/components/DataTable.vue b/frontend/src/components/DataTable.vue
index d52c5d2..aebe3cd 100644
--- a/frontend/src/components/DataTable.vue
+++ b/frontend/src/components/DataTable.vue
@@ -27,7 +27,7 @@
v-model="filterModel.value"
type="text"
@input="filterCallback()"
- placeholder="Search by name"
+ :placeholder="`Search ${col.label}...`"
/>
@@ -73,7 +73,7 @@ const props = defineProps({
},
});
-const emit = defineEmits(['rowClick']);
+const emit = defineEmits(["rowClick"]);
const filterRef = ref(props.filters);
const selectedRows = ref();
diff --git a/frontend/src/components/SideBar.vue b/frontend/src/components/SideBar.vue
index 6461ced..6b7226f 100644
--- a/frontend/src/components/SideBar.vue
+++ b/frontend/src/components/SideBar.vue
@@ -28,29 +28,35 @@ const categories = [
},
];
-const items = ref([
+const createButtons = ref([
{
label: "Client",
command: () => {
frappe.new_doc("Customer");
},
},
- {
- label: "Estimate",
- command: () => {
- frappe.new_doc("Estimate");
- },
- },
{
label: "Job",
command: () => {
frappe.new_doc("Job");
},
},
+ {
+ label: "Estimate",
+ command: () => {
+ frappe.new_doc("Estimate");
+ },
+ },
{
label: "Invoice",
command: () => {
- frappe.new_doc("Sales Invoice");
+ alert("Create Invoice clicked");
+ },
+ },
+ {
+ label: "Warranty Claim",
+ command: () => {
+ alert("Create Warranty Claim clicked");
},
},
]);
@@ -78,7 +84,7 @@ const handleCategoryClick = (category) => {
-
+