POJAZD NR {{ store.chosenStockListIndex + 1 }}
@@ -174,6 +174,7 @@ import warningsMixin from '../mixins/warningsMixin';
import imageMixin from '../mixins/imageMixin';
export default defineComponent({
+ name: 'stock-list',
components: { TrainImage },
mixins: [warningsMixin, imageMixin],
@@ -417,28 +418,7 @@ export default defineComponent({
}
}
-.stock-list-section {
- grid-row: 1 / 4;
- grid-column: 2;
-}
-
-.list_actions {
- display: flex;
-
- .spacer {
- flex-grow: 2;
- }
-
- button {
- margin-right: 0.5em;
-
- &:nth-child(5) {
- margin-right: 0;
- }
- }
-}
-
-.stock_actions {
+.stock_controls {
display: flex;
justify-content: center;
align-items: center;
@@ -606,4 +586,3 @@ li > .stock-info {
}
}
-
diff --git a/src/components/StockSection.vue b/src/components/StockSection.vue
new file mode 100644
index 0000000..4edb4dd
--- /dev/null
+++ b/src/components/StockSection.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/data/generatorData.json b/src/data/generatorData.json
new file mode 100644
index 0000000..49399c1
--- /dev/null
+++ b/src/data/generatorData.json
@@ -0,0 +1,27 @@
+{
+ "passenger": {
+ "PKP_IC": [],
+ "PKP_PR": [],
+ "PKP_ALL": []
+ },
+ "cargo": {
+ "kontenery": ["627Z:all", "412Z:all"],
+ "drobnica": ["426S:all", "208Kf:all", "401Ka:all"],
+ "węgiel": ["412W:coal_01", "413S:coal_Fas", "429W:coal_01"],
+ "ruda": ["412W:ore_01", "401Zb:ore_35", "429W:ore_01"],
+ "piasek": ["412W:sand_01", "412W:sand_02", "413S:sand_Fas", "401Zb:sand_30", "429W:sand_01", "429W:sand_02"],
+ "kreda": ["413S:chalk_Fas"],
+ "kamień": ["412W:stone_01", "412W:stone_50", "401Zb:stone_25", "429W:stone_01"],
+ "złom": ["412W:scrap_01", "412W:scrap_02", "429W:scrap_01", "429W:scrap_02"],
+ "paliwo": ["29R_CTLL:all", "29R_PKP:all"],
+ "melasa": ["29R_PLPOL:all"],
+ "żwir": ["441V"],
+ "koła": ["424Z:wheels_01"],
+ "drewno": ["424Z:woods_01", "424Z:woods_2"],
+ "szyny": ["424Z:rails_01"],
+ "kable": ["424Z:cables_01"],
+ "cement": ["408S:all"],
+ "kruszywo": ["203V:all"],
+ "techniczne": ["209c", "304Ca"]
+ }
+}
diff --git a/src/store.ts b/src/store.ts
index db91b8a..e5ab9dc 100644
--- a/src/store.ts
+++ b/src/store.ts
@@ -30,6 +30,8 @@ export const useStore = defineStore({
vehiclePreviewSrc: '',
+ stockSectionMode: 'stock-generator',
+
isRandomizerCardOpen: false,
isRealStockListCardOpen: false,
diff --git a/src/styles/global.scss b/src/styles/global.scss
index 6095254..abe14e3 100644
--- a/src/styles/global.scss
+++ b/src/styles/global.scss
@@ -146,6 +146,10 @@ input {
&:focus-visible {
border-color: $accentColor;
}
+
+ &::placeholder {
+ color: #aaa;
+ }
}
option {
diff --git a/src/types.ts b/src/types.ts
index a6ee2f1..fadeb56 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -1,4 +1,5 @@
export type Vehicle = ILocomotive | ICarWagon;
+export type StockSectionMode = 'STOCK_LIST' | 'STOCK_GENERATOR';
export interface IStore {
chosenCar: ICarWagon | null;
@@ -25,6 +26,8 @@ export interface IStore {
isRandomizerCardOpen: boolean;
isRealStockListCardOpen: boolean;
+
+ stockSectionMode: 'stock-list' | 'stock-generator';
}
export interface IVehicleData {