diff --git a/frontend/src/views/apps/CityMarktApp.vue b/frontend/src/views/apps/CityMarktApp.vue index 196f19e..e80319b 100644 --- a/frontend/src/views/apps/CityMarktApp.vue +++ b/frontend/src/views/apps/CityMarktApp.vue @@ -123,6 +123,24 @@ const sortOptions = computed(() => [ { label: phone.t('Apps.citymarkt.sortPriceAsc'), value: 'price_asc' }, { label: phone.t('Apps.citymarkt.sortPriceDesc'), value: 'price_desc' }, ]) +const sellCategoryOptions = computed(() => + categories.map((item) => ({ label: label('categories', item.id), value: item.id })), +) +const conditionOptions = computed(() => + conditions.map((item) => ({ label: label('conditions', item), value: item })), +) +const priceTypeOptions = computed(() => + priceTypes.map((item) => ({ label: label('priceTypes', item), value: item })), +) +const sellDistrictOptions = computed(() => + districts.map((item) => ({ label: label('districts', item), value: item })), +) +const reportReasonOptions = computed(() => + ['prohibited', 'fraud', 'spam', 'offensive', 'other'].map((item) => ({ + label: label('reportReasons', item), + value: item, + })), +) const tabs = [ { icon: House, id: 'discover' }, { icon: Search, id: 'search' }, @@ -243,6 +261,26 @@ async function selectSort(value: string): Promise { await loadFeed() } +function selectDraftCategory(value: string): void { + draft.value.category = value as MarketplaceCategory +} + +function selectDraftCondition(value: string): void { + draft.value.condition = value as MarketplaceCondition +} + +function selectDraftPriceType(value: string): void { + draft.value.priceType = value as MarketplacePriceType +} + +function selectDraftDistrict(value: string): void { + draft.value.district = value +} + +function selectReportReason(value: string): void { + reportReason.value = value +} + async function selectTab(next: Tab): Promise { tab.value = next screen.value = 'main' @@ -628,8 +666,8 @@ onMounted(async () => {
-