diff --git a/src/api/zeroPrices.js b/src/api/zeroPrices.js deleted file mode 100644 index a7db41a..0000000 --- a/src/api/zeroPrices.js +++ /dev/null @@ -1,40 +0,0 @@ -import { apiClient } from '@/services/apiClient.js' - -export const useZeroPrices = () => { - const getZeroPrices = async () => { - try { - return await apiClient.get('/merch/zeroprices') - } catch (error) { - console.log('Get zero prices error: ', error) - throw error - } - } - - const deleteZeroPrices = async (list) => { - try { - await apiClient.delete('/merch/zeroprices', list) - } - catch (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 11bd874..96a5243 100644 --- a/src/components/ChartBlock.vue +++ b/src/components/ChartBlock.vue @@ -13,7 +13,6 @@ import { } from 'chart.js' import { Line } from 'vue-chartjs' import 'chartjs-adapter-date-fns' -import { originColors } from '@/services/colors.js' ChartJS.register( Title, @@ -34,6 +33,11 @@ const props = defineProps({ }, }) +const originColors = { + surugaya: '#2d3081', + mandarake: '#924646', +} + const chartData = ref({ datasets: [], }) diff --git a/src/components/Navbar/NavBar.vue b/src/components/Navbar/NavBar.vue index a05c67c..c2fcb65 100644 --- a/src/components/Navbar/NavBar.vue +++ b/src/components/Navbar/NavBar.vue @@ -17,7 +17,6 @@ const mainMenu = computed(() => { { label: 'Collection', key: 'collection' }, { label: 'Charts', key: 'charts' }, { label: 'Parsers', key: 'parsers' }, - { label: 'Zero prices', key: 'zeroprices' }, ] }) diff --git a/src/router/index.js b/src/router/index.js index 0a0ff85..1a83844 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,6 @@ import PersonalView from '@/views/PersonalView.vue' import AddMerchView from '@/views/AddMerchView.vue' import DetailsView from '@/views/DetailsView.vue' import LabelsView from '@/views/LabelsView.vue' -import ZeroPricesView from '@/views/ZeroPricesView.vue' const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -59,11 +58,6 @@ const router = createRouter({ name: 'labels', component: LabelsView, }, - { - path: '/zeroprices', - name: 'zeroprices', - component: ZeroPricesView, - }, ], }) diff --git a/src/services/apiClient.js b/src/services/apiClient.js index 639fb84..7bc1f10 100644 --- a/src/services/apiClient.js +++ b/src/services/apiClient.js @@ -7,10 +7,8 @@ let refreshPromise = null function createConfig(options = {}) { const token = localStorage.getItem('accessToken'); - const isFormData = options.body instanceof FormData; - const headers = { - ...(isFormData ? {} : { 'Content-Type': 'application/json' }), + 'Content-Type': 'application/json', ...options.headers, }; @@ -140,14 +138,12 @@ export const apiClient = { return request(url, { method: 'POST', body: isFormData ? data : JSON.stringify(data), + // headers: isFormData ? {} : { 'Content-Type': 'application/json' } }) }, put: (url, data) => request(url, { method: 'PUT', body: JSON.stringify(data), }), - delete: (url, data) => request(url, { - method: 'DELETE', - body: data ? JSON.stringify(data) : undefined, - }), + delete: (url) => request(url, { method: 'DELETE' }), } diff --git a/src/services/colors.js b/src/services/colors.js deleted file mode 100644 index c337f2a..0000000 --- a/src/services/colors.js +++ /dev/null @@ -1,4 +0,0 @@ -export const originColors = { - surugaya: '#2d3081', - mandarake: '#924646', -}; diff --git a/src/styles/styles.css b/src/styles/styles.css index 815f71a..67d9708 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -197,8 +197,3 @@ body, justify-content: center; margin-bottom: 20px; } - -.padding-lr-30 { - padding-left: 30px; - padding-right: 30px; -} diff --git a/src/views/CollectionView/CollectionToolbar.vue b/src/views/CollectionView/CollectionToolbar.vue index ebe8bc0..67e7e84 100644 --- a/src/views/CollectionView/CollectionToolbar.vue +++ b/src/views/CollectionView/CollectionToolbar.vue @@ -1,5 +1,5 @@ - - - - diff --git a/src/views/ZeroPricesView/PeriodSelectTab.vue b/src/views/ZeroPricesView/PeriodSelectTab.vue deleted file mode 100644 index 4239f15..0000000 --- a/src/views/ZeroPricesView/PeriodSelectTab.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - - - diff --git a/src/views/ZeroPricesView/TargetZeroesTab.vue b/src/views/ZeroPricesView/TargetZeroesTab.vue deleted file mode 100644 index ba71ba5..0000000 --- a/src/views/ZeroPricesView/TargetZeroesTab.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - - - diff --git a/src/views/ZeroPricesView/ZeroPriceCard.vue b/src/views/ZeroPricesView/ZeroPriceCard.vue deleted file mode 100644 index 32bd31f..0000000 --- a/src/views/ZeroPricesView/ZeroPriceCard.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - - - diff --git a/src/views/ZeroPricesView/ZeroPricesToolbar.vue b/src/views/ZeroPricesView/ZeroPricesToolbar.vue deleted file mode 100644 index abe01cb..0000000 --- a/src/views/ZeroPricesView/ZeroPricesToolbar.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - -