mirror of
https://github.com/Spythere/station-manager-2.0.git
synced 2026-05-03 13:38:13 +00:00
hotfix usuwania scenerii & changeloga
This commit is contained in:
@@ -115,7 +115,7 @@ export default defineComponent({
|
|||||||
async updateListToDb() {
|
async updateListToDb() {
|
||||||
try {
|
try {
|
||||||
const mappedChangeList = this.store.changeList.map((v) => {
|
const mappedChangeList = this.store.changeList.map((v) => {
|
||||||
if (/^#/.test(v.id)) {
|
if (/^#/.test(v.id.toString())) {
|
||||||
return { ...v, id: undefined };
|
return { ...v, id: undefined };
|
||||||
}
|
}
|
||||||
return { ...v };
|
return { ...v };
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ export default defineComponent({
|
|||||||
const sceneryId = sceneryData.id;
|
const sceneryId = sceneryData.id;
|
||||||
|
|
||||||
// Sceneria niewpisana do bazy danych (id stworzone przez stronę)
|
// Sceneria niewpisana do bazy danych (id stworzone przez stronę)
|
||||||
if (sceneryId.startsWith('#')) {
|
if (sceneryId.toString().startsWith('#')) {
|
||||||
this.store.changeList.filter((item) => item.id != sceneryId);
|
this.store.changeList = this.store.changeList.filter((item) => item.id != sceneryId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -56,7 +56,7 @@ export interface SceneryRoutesInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface SceneryRowItem {
|
export interface SceneryRowItem {
|
||||||
id: string;
|
id: string | number;
|
||||||
hash: string;
|
hash: string;
|
||||||
name: string;
|
name: string;
|
||||||
abbr: string;
|
abbr: string;
|
||||||
@@ -79,7 +79,7 @@ export interface SceneryRowItem {
|
|||||||
export type ChangeItem = {
|
export type ChangeItem = {
|
||||||
[key in ChangeProp]?: any;
|
[key in ChangeProp]?: any;
|
||||||
} & {
|
} & {
|
||||||
id: string;
|
id: string | number;
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
toRemove?: boolean;
|
toRemove?: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user