22/7/1404
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<p class="font-bold">تراز از :</p>
|
||||
<BaseDatePicker
|
||||
v-model:value="startTaraz"
|
||||
@on-change="getTaraz(startTaraz, endTaraz)"
|
||||
@onchange="getTaraz(startTaraz, endTaraz)"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
class="flex-1"
|
||||
/>
|
||||
@@ -14,7 +14,7 @@
|
||||
<p class="font-bold">تا :</p>
|
||||
<BaseDatePicker
|
||||
v-model:value="endTaraz"
|
||||
@on-change="getTaraz(startTaraz, endTaraz)"
|
||||
@onchange="getTaraz(startTaraz, endTaraz)"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
class="flex-1"
|
||||
/>
|
||||
|
||||
@@ -815,7 +815,7 @@ const priceChartOptions = ref({
|
||||
const fetchPrices = async () => {
|
||||
try {
|
||||
const response = await getAllPrices()
|
||||
const data = response.data.prices
|
||||
const data = response?.data?.prices
|
||||
|
||||
const selectedData = data[selection.value] || []
|
||||
priceChartSeries.value[0].data = selectedData.map((item) => [item.timestamp, item.value])
|
||||
|
||||
@@ -589,16 +589,12 @@ let editId: number | undefined = undefined
|
||||
async function edit(record: Customer) {
|
||||
addUserVisible.value = true
|
||||
editId = record.id
|
||||
console.log(record)
|
||||
const customForm = cloneDeep(record)
|
||||
const start = dayjs(customForm.auto_open_at, 'HH:mm:ss')
|
||||
const close = dayjs(customForm.auto_close_at, 'HH:mm:ss')
|
||||
delete customForm.auto_open_at
|
||||
delete customForm.auto_close_at
|
||||
form.value.auto_open_at = start
|
||||
form.value.auto_close_at = close
|
||||
console.log(form.value);
|
||||
|
||||
form.value = cloneDeep(customForm)
|
||||
|
||||
form.value.auto_open_at = dayjs(customForm.auto_open_at, 'HH:mm:ss')
|
||||
form.value.auto_close_at = dayjs(customForm.auto_close_at, 'HH:mm:ss')
|
||||
}
|
||||
|
||||
//add
|
||||
@@ -762,6 +758,9 @@ const categoryItems: Array<Item> = [
|
||||
{
|
||||
value: 'سکه پارسیان',
|
||||
},
|
||||
{
|
||||
value: 'شمش ونوس',
|
||||
},
|
||||
]
|
||||
|
||||
const data = ref<MethodePrices[]>([])
|
||||
|
||||
Reference in New Issue
Block a user