feat: make it a table
This commit is contained in:
@@ -20,6 +20,21 @@ const orders = ref(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const batchPlanning: ProductType[] = [
|
||||||
|
'shirt',
|
||||||
|
'shirt',
|
||||||
|
'shirt',
|
||||||
|
'shirt',
|
||||||
|
'shirt',
|
||||||
|
'jeans',
|
||||||
|
'jeans',
|
||||||
|
'jeans',
|
||||||
|
'shoes',
|
||||||
|
'shoes',
|
||||||
|
'hat',
|
||||||
|
'hat'
|
||||||
|
]
|
||||||
|
|
||||||
const levelingPlanning: ProductType[] = [
|
const levelingPlanning: ProductType[] = [
|
||||||
'shirt',
|
'shirt',
|
||||||
'shirt',
|
'shirt',
|
||||||
@@ -57,11 +72,12 @@ const createdAt = new Date('2026-01-01').toLocaleDateString(undefined, {
|
|||||||
<div class="text">
|
<div class="text">
|
||||||
<p>
|
<p>
|
||||||
You're selling shirts, jeans and shoes in a little town that is quite
|
You're selling shirts, jeans and shoes in a little town that is quite
|
||||||
specific: every day someone get to your shop and buys 1 item.
|
specific: every hour someone get to your shop and buys 1 item and they
|
||||||
|
won't leave until they are satisfied!
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
You know, from your years of experience, that shirts sell twice as much
|
You know, from your years of experience, that in 3 days, you sell
|
||||||
as
|
approximately 5 shirts, 3 jeans, 2 pairs of shoes and 2 hats.
|
||||||
</p>
|
</p>
|
||||||
<section class="commands">
|
<section class="commands">
|
||||||
<button
|
<button
|
||||||
@@ -102,32 +118,49 @@ const createdAt = new Date('2026-01-01').toLocaleDateString(undefined, {
|
|||||||
reset
|
reset
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button class="button-outline" @click="orders = levelingPlanning">
|
<button class="button-outline" @click="orders = [...levelingPlanning]">
|
||||||
levelling
|
levelling
|
||||||
</button>
|
</button>
|
||||||
|
<button class="button-outline" @click="orders = [...batchPlanning]">
|
||||||
|
batch
|
||||||
|
</button>
|
||||||
</section>
|
</section>
|
||||||
<section class="factory">
|
<section class="factory">
|
||||||
<h2>Factory</h2>
|
<h2>Factory</h2>
|
||||||
|
|
||||||
<ul>
|
<table>
|
||||||
<li v-for="(day, dayIndex) in days" :key="day">
|
<thead>
|
||||||
Day {{ day }}
|
<tr>
|
||||||
<div class="day-production-plan">
|
<th scope="col">Day</th>
|
||||||
<select
|
<th scope="col">Hour 1</th>
|
||||||
v-for="(hour, hourIndex) in hours"
|
<th scope="col">Hour 2</th>
|
||||||
v-model="orders[orderIndex(dayIndex, hourIndex)]"
|
<th scope="col">Hour 3</th>
|
||||||
:name="`day-${day}-hour-${hour}`"
|
<th scope="col">Hour 4</th>
|
||||||
:id="`day-${day}-hour-${hour}`"
|
</tr>
|
||||||
:disabled="heijunkaStore.validatedPlanning"
|
</thead>
|
||||||
>
|
<tbody>
|
||||||
<option value="shirt">Shirt</option>
|
<tr v-for="(day, dayIndex) in days" :key="day">
|
||||||
<option value="jeans">Jeans</option>
|
<th scope="row">Day {{ day }}</th>
|
||||||
<option value="shoes">Shoes</option>
|
<td v-for="(hour, hourIndex) in hours">
|
||||||
<option value="hat">Hat</option>
|
<select
|
||||||
</select>
|
v-model="orders[orderIndex(dayIndex, hourIndex)]"
|
||||||
</div>
|
:name="`day-${day}-hour-${hour}`"
|
||||||
</li>
|
:id="`day-${day}-hour-${hour}`"
|
||||||
</ul>
|
:disabled="heijunkaStore.validatedPlanning"
|
||||||
|
>
|
||||||
|
<option value="shirt">Shirt</option>
|
||||||
|
<option value="jeans">Jeans</option>
|
||||||
|
<option value="shoes">Shoes</option>
|
||||||
|
<option value="hat">Hat</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="dashboard">
|
||||||
|
Mean lead time: {{ heijunkaStore.meanLeadTime }}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="shop">
|
<section class="shop">
|
||||||
@@ -309,6 +342,26 @@ const createdAt = new Date('2026-01-01').toLocaleDateString(undefined, {
|
|||||||
<section class="dashboard">
|
<section class="dashboard">
|
||||||
Mean lead time: {{ heijunkaStore.meanLeadTime }}
|
Mean lead time: {{ heijunkaStore.meanLeadTime }}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The longer the lead time is, the longer it takes to have return on
|
||||||
|
investment. You paid for the raw material, the workforce, the machines
|
||||||
|
but until the client receives the product you won't get paid.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The more stock there is, the more latent payments there are and the more
|
||||||
|
paymeents are still waiting, the more you need to be good at planning
|
||||||
|
batches.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Producing a bit of everything with small batches is the way to go and
|
||||||
|
that's the core of Heijunka
|
||||||
|
</p>
|
||||||
|
<h2>What heijunka needs: SMED</h2>
|
||||||
|
<p>
|
||||||
|
We didn't talk here about how we manage products that need different
|
||||||
|
time to be produced.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
@@ -329,12 +382,6 @@ li {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.day-production-plan {
|
|
||||||
display: flex;
|
|
||||||
gap: 0.5rem;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shop {
|
.shop {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
|||||||
@@ -153,11 +153,6 @@ export const useHeijunkaStore = defineStore('heijunka', {
|
|||||||
Math.ceil(state.meta.currentHour / NUMBER_OF_HOURS_PER_DAY),
|
Math.ceil(state.meta.currentHour / NUMBER_OF_HOURS_PER_DAY),
|
||||||
gameEnded: (state) =>
|
gameEnded: (state) =>
|
||||||
state.meta.currentHour >= NUMBER_OF_DAYS * NUMBER_OF_HOURS_PER_DAY,
|
state.meta.currentHour >= NUMBER_OF_DAYS * NUMBER_OF_HOURS_PER_DAY,
|
||||||
meanLeadTime: (state) =>
|
meanLeadTime: (state) => getMean(state.orders.map((o) => o.leadTime))
|
||||||
getMean(
|
|
||||||
state.orders
|
|
||||||
.filter((o) => o.status === 'received')
|
|
||||||
.map((o) => o.leadTime)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user