mirror of
https://github.com/Spythere/genera-tor.git
synced 2026-05-03 13:38:12 +00:00
Merge do wersji 1.3.0
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "genera-tor",
|
"name": "genera-tor",
|
||||||
"version": "1.2.1",
|
"version": "1.3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --port 8080",
|
"dev": "vite --port 8080",
|
||||||
|
|||||||
@@ -207,9 +207,38 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td ref="row-4">
|
<td ref="row-4">
|
||||||
Inne:
|
<button class="g-button text" @click="order.rows[3].w5.enabled = !order.rows[3].w5.enabled">
|
||||||
<br />
|
> <span v-if="!order.rows[3].w5.enabled">Wygeneruj treść na pominięcie wskaźnika W5</span>
|
||||||
<textarea id="" cols="30" rows="10" v-model="order.rows[3].content"></textarea>
|
<span v-else>Wpisz treść własnoręcznie</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div>Inne:</div>
|
||||||
|
<div v-if="order.rows[3].w5.enabled">
|
||||||
|
zezwalam na wyjazd poza
|
||||||
|
<select id="select-borderType" v-model="order.rows[3].w5.borderType">
|
||||||
|
<option value="wskaźnik przetaczania W5">wskaźnik przetaczania W5</option>
|
||||||
|
<option value="granicę przetaczania">granicę przetaczania</option>
|
||||||
|
</select>
|
||||||
|
po torze szlakowym nr
|
||||||
|
<input type="text" v-model="order.rows[3].w5.trackNo" holder="nr szlaku" /> do kilometra
|
||||||
|
<input type="text" v-model="order.rows[3].w5.maxKm" holder="km szlaku" />. Powrót odbędzie się na
|
||||||
|
<select id="select-returnWay" v-model="order.rows[3].w5.returnWay" style="width: 250px">
|
||||||
|
<option :value='`sygnał ręczny "Do mnie"`'>sygnał ręczny "Do mnie"</option>
|
||||||
|
<option :value='`sygnał "Do mnie" przekazany przez urządzenia radiołączności`'>
|
||||||
|
sygnał "Do mnie" przekazany przez urządzenia radiołączności
|
||||||
|
</option>
|
||||||
|
<option value="sygnał Ms2 podany na tarczy manewrowej">sygnał Ms2 podany na tarczy manewrowej</option>
|
||||||
|
</select>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
v-model="order.rows[3].w5.tmName"
|
||||||
|
holder="nazwa tarczy"
|
||||||
|
v-if="order.rows[3].w5.returnWay.includes('tarczy')"
|
||||||
|
/>
|
||||||
|
do godziny <input type="text" v-model="order.rows[3].w5.maxHour" holder="godzina" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<textarea id="" cols="30" rows="10" v-model="order.rows[3].content" v-else></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -293,6 +322,20 @@ export default defineComponent({
|
|||||||
() => {
|
() => {
|
||||||
const row = order.rows[3];
|
const row = order.rows[3];
|
||||||
|
|
||||||
|
if (row.w5.enabled) {
|
||||||
|
const { borderType, trackNo, maxHour, maxKm, returnWay, tmName } = row.w5;
|
||||||
|
const textArray = [];
|
||||||
|
|
||||||
|
textArray.push('Inne: zezwalam na wyjazd poza', borderType || '_', 'po torze szlakowym nr', trackNo || '_');
|
||||||
|
if (maxKm) textArray.push(`do kilometra ${maxKm}`);
|
||||||
|
textArray.push('.');
|
||||||
|
textArray.push('Powrót odbędzie się na', returnWay || '_');
|
||||||
|
if (returnWay.includes('tarczy')) textArray.push(tmName || '_');
|
||||||
|
textArray.push(`do godziny ${maxHour || '_'}`);
|
||||||
|
|
||||||
|
return textArray.join(' ').replace(/ \./, '.');
|
||||||
|
}
|
||||||
|
|
||||||
return `Inne: ${row.content}`;
|
return `Inne: ${row.content}`;
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -177,6 +177,15 @@ export const useStore = defineStore('store', {
|
|||||||
{
|
{
|
||||||
enabled: false,
|
enabled: false,
|
||||||
content: '',
|
content: '',
|
||||||
|
w5: {
|
||||||
|
enabled: false,
|
||||||
|
maxHour: '',
|
||||||
|
borderType: 'wskaźnik przetaczania W5',
|
||||||
|
tmName: '',
|
||||||
|
maxKm: '',
|
||||||
|
returnWay: 'sygnał ręczny "Do mnie"',
|
||||||
|
trackNo: '',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
} as IOrderS,
|
} as IOrderS,
|
||||||
@@ -184,3 +193,5 @@ export const useStore = defineStore('store', {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ button.g-button {
|
|||||||
|
|
||||||
&.option {
|
&.option {
|
||||||
margin: 0 0.25em;
|
margin: 0 0.25em;
|
||||||
|
padding: 0.25em;
|
||||||
|
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
outline: 1px solid $accentCol;
|
outline: 1px solid $accentCol;
|
||||||
@@ -65,6 +66,15 @@ button.g-button {
|
|||||||
color: $accentCol;
|
color: $accentCol;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.text {
|
||||||
|
padding: 0;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
color: $accentCol;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Text styles
|
// Text styles
|
||||||
|
|||||||
@@ -107,6 +107,16 @@ export interface IOrderS {
|
|||||||
{
|
{
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
content: string;
|
content: string;
|
||||||
|
|
||||||
|
w5: {
|
||||||
|
enabled: boolean;
|
||||||
|
borderType: string;
|
||||||
|
trackNo: string;
|
||||||
|
maxKm: string;
|
||||||
|
returnWay: string;
|
||||||
|
maxHour: string;
|
||||||
|
tmName: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -163,3 +173,5 @@ export interface IOrderO {
|
|||||||
|
|
||||||
other: string;
|
other: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user