diff --git a/src/service/BelongingService.js b/src/service/PropertyService.js
similarity index 59%
rename from src/service/BelongingService.js
rename to src/service/PropertyService.js
index 2ffbb31..705dacb 100644
--- a/src/service/BelongingService.js
+++ b/src/service/PropertyService.js
@@ -1,7 +1,6 @@
import axios from 'axios';
-export const BelongingService = {
- // Helper function to get token from cookies
+export const PropertyService = {
_getAuthHeader: () => {
const bmToken = document.cookie
.split('; ')
@@ -13,12 +12,12 @@ export const BelongingService = {
};
},
- getBelonging: async (belongingId) => {
+ getProperty: async (propertyId) => {
const config = {
method: 'get',
- url: '/api/belongings/admin/get-one/' + belongingId,
+ url: '/api/properties/admin/get-one/' + propertyId,
withCredentials: true,
- headers: BelongingService._getAuthHeader()
+ headers: PropertyService._getAuthHeader()
};
try {
const response = await axios(config);
@@ -28,12 +27,12 @@ export const BelongingService = {
}
},
- getAllBelongings: async () => {
+ getAllProperties: async () => {
const config = {
method: 'get',
- url: '/api/belongings/admin/get-all',
+ url: '/api/properties/admin/get-all',
withCredentials: true,
- headers: BelongingService._getAuthHeader()
+ headers: PropertyService._getAuthHeader()
};
try {
const response = await axios(config);
@@ -43,13 +42,13 @@ export const BelongingService = {
}
},
- searchBelongings: async (query) => {
+ searchProperties: async (query) => {
const config = {
method: 'get',
- url: '/api/belongings/admin/search',
+ url: '/api/properties/admin/search',
withCredentials: true,
params: query,
- headers: BelongingService._getAuthHeader()
+ headers: PropertyService._getAuthHeader()
};
try {
const response = await axios(config);
@@ -59,12 +58,12 @@ export const BelongingService = {
}
},
- indexBelongings: async () => {
+ indexProperties: async () => {
const config = {
method: 'post',
- url: '/api/belongings/admin/index-all',
+ url: '/api/properties/admin/index-all',
withCredentials: true,
- headers: BelongingService._getAuthHeader()
+ headers: PropertyService._getAuthHeader()
};
try {
const response = await axios(config);
@@ -74,13 +73,13 @@ export const BelongingService = {
}
},
- createBelonging: async (data) => {
+ createProperty: async (data) => {
const config = {
method: 'post',
- url: '/api/belongings/admin/create',
+ url: '/api/properties/admin/create',
withCredentials: true,
data,
- headers: BelongingService._getAuthHeader()
+ headers: PropertyService._getAuthHeader()
};
try {
const response = await axios(config);
@@ -91,13 +90,13 @@ export const BelongingService = {
}
},
- updateBelonging: async (belongingId, data) => {
+ updateProperty: async (propertyId, data) => {
const config = {
method: 'put',
- url: '/api/belongings/admin/update/' + belongingId,
+ url: '/api/properties/admin/update/' + propertyId,
withCredentials: true,
data,
- headers: BelongingService._getAuthHeader()
+ headers: PropertyService._getAuthHeader()
};
try {
const response = await axios(config);
@@ -106,5 +105,15 @@ export const BelongingService = {
console.log(err);
return err.response.data.message;
}
- }
+ },
+
+ // Backward compatibility aliases
+ getBelonging: (id) => PropertyService.getProperty(id),
+ getAllBelongings: () => PropertyService.getAllProperties(),
+ searchBelongings: (q) => PropertyService.searchProperties(q),
+ indexBelongings: () => PropertyService.indexProperties(),
+ createBelonging: (data) => PropertyService.createProperty(data),
+ updateBelonging: (id, data) => PropertyService.updateProperty(id, data)
};
+
+export const BelongingService = PropertyService;
diff --git a/src/service/PropertyStatusService.js b/src/service/PropertyStatusService.js
new file mode 100644
index 0000000..951473b
--- /dev/null
+++ b/src/service/PropertyStatusService.js
@@ -0,0 +1,22 @@
+import axios from 'axios';
+import { PropertyService } from './PropertyService';
+
+export const PropertyStatusService = {
+ getAllStatuses: async () => {
+ const config = {
+ method: 'get',
+ url: '/api/property-statuses/admin/get-all',
+ withCredentials: true,
+ headers: PropertyService._getAuthHeader()
+ };
+ try {
+ const response = await axios(config);
+ return response.data.data;
+ } catch (err) {
+ console.error('Error fetching property statuses:', err);
+ return [];
+ }
+ }
+};
+
+export const BelongingStatusService = PropertyStatusService;
diff --git a/src/views/pages/Belonging/CreateBelonging.vue b/src/views/pages/Belonging/CreateBelonging.vue
deleted file mode 100644
index 99b1a95..0000000
--- a/src/views/pages/Belonging/CreateBelonging.vue
+++ /dev/null
@@ -1,546 +0,0 @@
-
-
-
-
-
-
-
-
ایجاد اموال
-
از طریق این صفحه می توانید اموال جدید را به سوابق اضافه کنید.
-
- در حال ویرایش
- {{ belonging.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
موجودی فعلی : {{ stockData.finishedInventory }}
-
موجودی در حال اضافه شدن : {{ stockData.pendingDepositsInventory }}
-
- موجودی در حال کم شدن : {{ stockData.pendingWithdrawsInventory }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ data.value }}
-
-
-
-
-
- {{ formatDate(data.date) }}
-
-
-
-
-
-
-
-
-
- {{ activeDescription }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/pages/Category/ListCategories.vue b/src/views/pages/Category/ListCategories.vue
index c5ac2e0..ef82c28 100644
--- a/src/views/pages/Category/ListCategories.vue
+++ b/src/views/pages/Category/ListCategories.vue
@@ -121,7 +121,7 @@ function deleteSelectedCategories() {
:filters="filters"
paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown"
:rowsPerPageOptions="[20, 40, 80]"
- currentPageReportTemplate="نمایش {first} تا {last} از {totalRecords} دارایی"
+ currentPageReportTemplate="نمایش {first} تا {last} از {totalRecords} دستهبندی"
>
diff --git a/src/views/pages/Property/CreateProperty.vue b/src/views/pages/Property/CreateProperty.vue
new file mode 100644
index 0000000..c44edfb
--- /dev/null
+++ b/src/views/pages/Property/CreateProperty.vue
@@ -0,0 +1,909 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ editMode ? 'ویرایش ملک' : 'ایجاد ملک جدید' }}
+
+
+
+
+ {{ editMode ? property.name || 'در حال بروزرسانی اطلاعات ملک' : 'مشخصات ملک (زمین یا ساختمان)، ویژگیها و شناسه ملی جغرافیایی را ثبت نمایید' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ شناسه و اداره ثبت اسناد
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ computedPropertyName }}
+
+
+ پس از وارد کردن نام مالک و شماره ثبتی نمایش داده میشود
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ مشخصات مالک
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ مشخصات ملک
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ویژگیهای تکمیلی دستهبندی
+
+
+
+
+ {{ tagName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ اسناد و مدارک تصویری / پیدیاف ملک
+
+
+
+
+
+
+
+
+
+
+
+ موقعیت روی نقشه
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pages/Belonging/ListBelongings.vue b/src/views/pages/Property/ListProperties.vue
similarity index 66%
rename from src/views/pages/Belonging/ListBelongings.vue
rename to src/views/pages/Property/ListProperties.vue
index e122113..328fc11 100644
--- a/src/views/pages/Belonging/ListBelongings.vue
+++ b/src/views/pages/Property/ListProperties.vue
@@ -1,9 +1,8 @@
@@ -200,10 +188,10 @@ const confirmDeleteBelonging = (id, event) => {
-
-