feat: add sight short_name and sight features

This commit is contained in:
2026-04-19 22:36:14 +03:00
parent beb9e932ef
commit 938a7e6d1e
7 changed files with 84 additions and 9 deletions

View File

@@ -10,6 +10,7 @@ import { makeAutoObservable, runInAction } from "mobx";
export type SightLanguageInfo = {
id: number;
name: string;
short_name: string;
address: string;
left: {
heading: string;
@@ -68,6 +69,7 @@ class EditSightStore {
ru: {
id: 0,
name: "",
short_name: "",
address: "",
left: { heading: "", body: "", media: [] },
right: [],
@@ -75,6 +77,7 @@ class EditSightStore {
en: {
id: 0,
name: "",
short_name: "",
address: "",
left: { heading: "", body: "", media: [] },
right: [],
@@ -82,6 +85,7 @@ class EditSightStore {
zh: {
id: 0,
name: "",
short_name: "",
address: "",
left: { heading: "", body: "", media: [] },
right: [],
@@ -204,6 +208,7 @@ class EditSightStore {
ru: {
id: 0,
name: "",
short_name: "",
address: "",
left: { heading: "", body: "", media: [] },
right: [],
@@ -212,6 +217,7 @@ class EditSightStore {
en: {
id: 0,
name: "",
short_name: "",
address: "",
left: { heading: "", body: "", media: [] },
right: [],
@@ -220,6 +226,7 @@ class EditSightStore {
zh: {
id: 0,
name: "",
short_name: "",
address: "",
left: { heading: "", body: "", media: [] },
right: [],
@@ -304,6 +311,11 @@ class EditSightStore {
en: (this.sight.en.name || "").trim(),
zh: (this.sight.zh.name || "").trim(),
},
short_name: {
ru: (this.sight.ru.short_name || "").trim(),
en: (this.sight.en.short_name || "").trim(),
zh: (this.sight.zh.short_name || "").trim(),
},
address: {
ru: this.sight.ru.address,
en: this.sight.en.address,