Skip to content

Commit

Permalink
Merge pull request #2518 from digitalfabrik/2473-remove-shelter
Browse files Browse the repository at this point in the history
2473: Remove shelter offer
  • Loading branch information
steffenkleinle authored Oct 12, 2023
2 parents 94e21ee + 8846468 commit 70a846b
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 1,797 deletions.
16 changes: 0 additions & 16 deletions api-client/src/endpoints/createShelterContactEndpoint.ts

This file was deleted.

70 changes: 0 additions & 70 deletions api-client/src/endpoints/createShelterEndpoint.ts

This file was deleted.

10 changes: 0 additions & 10 deletions api-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ import {
ParamsType as ImportedFeedbackParamsType,
AdditionalParamsType as ImportedFeedbackAdditionalParamsType,
} from './endpoints/createFeedbackEndpoint'
import { Status as ImportedShelterContactStatus } from './endpoints/createShelterContactEndpoint'
import { FilterProps as ImportedShelterFilterProps } from './endpoints/createShelterEndpoint'
import { Return as ImportedReturnType } from './endpoints/hooks/useLoadAsync'

export type ShelterContactStatus = ImportedShelterContactStatus
export type ShelterFilterProps = ImportedShelterFilterProps
export type MapParamsToBodyType<P> = ImportedMapParamsToBodyType<P>
export type MapParamsToUrlType<P> = ImportedMapParamsToUrlType<P>
export type MapResponseType<P, T> = ImportedMapResponseType<P, T>
Expand Down Expand Up @@ -51,11 +47,6 @@ export {
default as createCategoryParentsEndpoint,
CATEGORY_PARENTS_ENDPOINT_NAME,
} from './endpoints/createCategoryParentsEndpoint'
export { default as createShelterEndpoint, SHELTER_ENDPOINT_NAME } from './endpoints/createShelterEndpoint'
export {
default as createShelterContactEndpoint,
SHELTER_CONTACT_ENDPOINT_NAME,
} from './endpoints/createShelterContactEndpoint'
export { default as createCitiesEndpoint, CITIES_ENDPOINT_NAME } from './endpoints/createCitiesEndpoint'
export { default as createCityEndpoint, CITY_ENDPOINT_NAME } from './endpoints/createCityEndpoint'
export { default as createDisclaimerEndpoint, DISCLAIMER_ENDPOINT_NAME } from './endpoints/createDisclaimerEndpoint'
Expand Down Expand Up @@ -114,7 +105,6 @@ export { default as ExtendedPageModel } from './models/ExtendedPageModel'
export { default as PoiModel } from './models/PoiModel'
export { default as PoiCategoryModel } from './models/PoiCategoryModel'
export { default as SprungbrettJobModel } from './models/SprungbrettJobModel'
export { default as ShelterModel } from './models/ShelterModel'
export { default as OpeningHoursModel } from './models/OpeningHoursModel'
export { default as OrganizationModel } from './models/OrganizationModel'
export { default as normalizePath } from './normalizePath'
Expand Down
136 changes: 0 additions & 136 deletions api-client/src/models/ShelterModel.ts

This file was deleted.

8 changes: 0 additions & 8 deletions api-client/src/routes/InternalPathnameParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
OFFERS_ROUTE,
POIS_ROUTE,
SEARCH_ROUTE,
SHELTER_ROUTE,
SPRUNGBRETT_OFFER_ROUTE,
TU_NEWS_TYPE,
TuNewsType,
Expand Down Expand Up @@ -190,13 +189,6 @@ class InternalPathnameParser {
...params,
}
}
if (route === SHELTER_ROUTE) {
return {
route: SHELTER_ROUTE,
...params,
id: this._parts[ENTITY_ID_INDEX + 1],
}
}
}

return null
Expand Down
7 changes: 0 additions & 7 deletions api-client/src/routes/RouteInformationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
OffersRouteType,
PoisRouteType,
SearchRouteType,
ShelterRouteType,
SprungbrettOfferRouteType,
TuNewsType,
} from '.'
Expand Down Expand Up @@ -57,11 +56,6 @@ export type SimpleCityContentFeatureType = ParamsType & {
route: DisclaimerRouteType | OffersRouteType | SprungbrettOfferRouteType
}

export type IdCityContentFeatureType = ParamsType & {
route: ShelterRouteType
id?: string
}

export type EventsRouteInformationType = ParamsType & {
// Routes with customizable ids, e.g. '/augsburg/de/events/1234/'
route: EventsRouteType
Expand Down Expand Up @@ -90,7 +84,6 @@ export type NonNullableRouteInformationType =
| SimpleCityContentFeatureType
| EventsRouteInformationType
| PoisRouteInformationType
| IdCityContentFeatureType
| LicensesInformationType
| SearchRouteInformationType

Expand Down
3 changes: 0 additions & 3 deletions api-client/src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ export const OFFERS_ROUTE: OffersRouteType = 'offers'
export type SprungbrettOfferRouteType = 'sprungbrett'
export const SPRUNGBRETT_OFFER_ROUTE: SprungbrettOfferRouteType = 'sprungbrett'

export type ShelterRouteType = 'wohnraum'
export const SHELTER_ROUTE: ShelterRouteType = 'wohnraum'

export type SearchRouteType = 'search'
export const SEARCH_ROUTE: SearchRouteType = 'search'

Expand Down
6 changes: 0 additions & 6 deletions api-client/src/routes/pathname.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
OFFERS_ROUTE,
POIS_ROUTE,
SEARCH_ROUTE,
SHELTER_ROUTE,
SPRUNGBRETT_OFFER_ROUTE,
} from '.'
import { NonNullableRouteInformationType } from '..'
Expand Down Expand Up @@ -47,11 +46,6 @@ export const pathnameFromRouteInformation = (routeInformation: NonNullableRouteI
// https://integreat.app/augsburg/de/offers/sprungbrett
return constructPathname([cityCode, languageCode, OFFERS_ROUTE, route])
}
if (routeInformation.route === SHELTER_ROUTE) {
const { cityCode, languageCode, route, id } = routeInformation
// https://integreat.app/augsburg/de/offers/wohnraum/1234, https://integreat.app/augsburg/de/offers/wohnraum
return constructPathname([cityCode, languageCode, OFFERS_ROUTE, route, id])
}
if (routeInformation.route === CATEGORIES_ROUTE) {
// https://integreat.app/augsburg/de/, https://integreat.app/augsburg/de/willkommen/erste-schritte
return constructPathname([routeInformation.cityContentPath])
Expand Down
33 changes: 0 additions & 33 deletions api-client/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,39 +130,6 @@ export type JsonOfferType = {
post: JsonOfferPostType | null | undefined
}

export type ShelterLanguage = 'deutsch' | 'englisch' | 'ukrainisch' | 'russisch' | 'polnisch' | 'kroatisch'
export type ShelterAccommodationType = 'ges_unterkunft' | 'privatzimmer' | 'gemein_zimmer'
export type ShelterInfo =
| 'barrierefrei'
| 'lgbtiq'
| 'bad'
| 'haustier-katze'
| 'haustier-hund'
| 'haustier'
| 'rauchen'
export type ShelterPeriod = '7t' | '14t' | '1m' | '3m' | '6m' | '12m' | '12m_plus'
export type ShelterHostType = 'allein_maennlich' | 'allein_weiblich' | 'familie_kinder' | 'paar' | 'wg' | null
export type ShelterCostsType = 'uebergang-miete' | 'kostenpflichtig' | 'kostenfrei'
export type JsonShelterType = {
id: number
name: string
city: string
street: string | null
zipcode: string
languages: ShelterLanguage[]
beds: string
accommodation_type: ShelterAccommodationType
info: ShelterInfo[]
email: string | null
phone: string | null
rooms: string | null
occupants: string | null
start_date: string
period: ShelterPeriod
host_type: ShelterHostType
costs: ShelterCostsType
comments: string | null
}
export type JsonSprungbrettJobType = {
title: string
zip: string
Expand Down
Loading

0 comments on commit 70a846b

Please sign in to comment.