feat: cache delete + empty snapshot + route page

This commit is contained in:
2026-04-28 03:50:29 +03:00
parent 248eea6f85
commit 60c6840db4
21 changed files with 770 additions and 361 deletions

View File

@@ -40,7 +40,7 @@ export const CityEditPage = observer(() => {
>(null);
const { language } = languageStore;
const { id } = useParams();
const { editCityData, editCity, getCity, setEditCityData } = cityStore;
const { editCityData, editCity, getCity, setEditCityData, setEditCityWeatherCode } = cityStore;
const { getCountries } = countryStore;
const { getMedia, getOneMedia } = mediaStore;
@@ -74,6 +74,7 @@ export const CityEditPage = observer(() => {
setEditCityData(ruData.name, ruData.country_code, ruData.arms, "ru");
setEditCityData(enData.name, enData.country_code, enData.arms, "en");
setEditCityData(zhData.name, zhData.country_code, zhData.arms, "zh");
setEditCityWeatherCode(ruData.weather_city_code ?? 0);
await getOneMedia(ruData.arms as string);
@@ -179,6 +180,15 @@ export const CityEditPage = observer(() => {
</Select>
</FormControl>
<TextField
fullWidth
label="Код города для погоды"
type="number"
value={editCityData.weather_city_code ?? 0}
helperText="Числовой код города в источнике погоды (Кранштат)"
onChange={(e) => setEditCityWeatherCode(Number(e.target.value))}
/>
<div className="w-full flex flex-col gap-4 max-w-[300px] mx-auto">
<ImageUploadCard
title="Герб города"