diff --git a/src/api/zeroPrices.js b/src/api/zeroPrices.js index c69efd1..a7db41a 100644 --- a/src/api/zeroPrices.js +++ b/src/api/zeroPrices.js @@ -15,13 +15,26 @@ export const useZeroPrices = () => { await apiClient.delete('/merch/zeroprices', list) } catch (error) { - console.log('Delete zero prices error: ', error) + console.log('Delete target zero prices error: ', error) throw error } } + const deleteZeroPricesPeriod = async (start, end) => { + const params = new URLSearchParams({ start, end }).toString() + const url = `/merch/zeroprices/period${params ? `?${params}` : ''}` + const response = await apiClient.delete(url) + + if (response.status === 200) { + return response + } else { + console.log('Delete period select zero prices error: ', response) + } + } + return { getZeroPrices, deleteZeroPrices, + deleteZeroPricesPeriod, } } diff --git a/src/components/ChartBlock.vue b/src/components/ChartBlock.vue index 96a5243..11bd874 100644 --- a/src/components/ChartBlock.vue +++ b/src/components/ChartBlock.vue @@ -13,6 +13,7 @@ import { } from 'chart.js' import { Line } from 'vue-chartjs' import 'chartjs-adapter-date-fns' +import { originColors } from '@/services/colors.js' ChartJS.register( Title, @@ -33,11 +34,6 @@ const props = defineProps({ }, }) -const originColors = { - surugaya: '#2d3081', - mandarake: '#924646', -} - const chartData = ref({ datasets: [], }) diff --git a/src/services/colors.js b/src/services/colors.js new file mode 100644 index 0000000..c337f2a --- /dev/null +++ b/src/services/colors.js @@ -0,0 +1,4 @@ +export const originColors = { + surugaya: '#2d3081', + mandarake: '#924646', +}; diff --git a/src/views/ZeroPricesView.vue b/src/views/ZeroPricesView.vue index 6e5820e..82d41a5 100644 --- a/src/views/ZeroPricesView.vue +++ b/src/views/ZeroPricesView.vue @@ -1,69 +1,20 @@ - + diff --git a/src/views/ZeroPricesView/PeriodSelectTab.vue b/src/views/ZeroPricesView/PeriodSelectTab.vue new file mode 100644 index 0000000..4239f15 --- /dev/null +++ b/src/views/ZeroPricesView/PeriodSelectTab.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/views/ZeroPricesView/TargetZeroesTab.vue b/src/views/ZeroPricesView/TargetZeroesTab.vue new file mode 100644 index 0000000..ba71ba5 --- /dev/null +++ b/src/views/ZeroPricesView/TargetZeroesTab.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/views/ZeroPricesView/ZeroPriceCard.vue b/src/views/ZeroPricesView/ZeroPriceCard.vue index 44236ee..32bd31f 100644 --- a/src/views/ZeroPricesView/ZeroPriceCard.vue +++ b/src/views/ZeroPricesView/ZeroPriceCard.vue @@ -1,4 +1,7 @@ @@ -49,4 +61,11 @@ const handleCheckboxChange = (newValue) => { gap: 12px; border: 1px solid #e0e0e0; } + +.bordered { + border: 1px solid; + border-radius: 4px; + padding: 2px; + margin: 3px; +}