feat(branches): add director assignment status and update overview view
Some checks failed
Deploy to production / deploy (push) Failing after 1m18s
Some checks failed
Deploy to production / deploy (push) Failing after 1m18s
This commit is contained in:
@@ -346,6 +346,12 @@
|
||||
<strong>{{ branch.region.name }}</strong>
|
||||
<div class="overview-entry-card__meta">
|
||||
<span>{{ $t(`falukant.overview.branches.level.${branch.branchType.labelTr}`) }}</span>
|
||||
<span
|
||||
class="branch-director-status"
|
||||
:class="{ 'branch-director-status--assigned': branch.hasDirector }"
|
||||
>
|
||||
{{ $t(`falukant.overview.branches.director.${branch.hasDirector ? 'assigned' : 'unassigned'}`) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="button-secondary" @click="openBranch(branch.id)">{{ $t('falukant.overview.summary.open') }}</button>
|
||||
@@ -631,6 +637,7 @@ export default {
|
||||
this.socket.off("children_update");
|
||||
this.socket.off("falukantBranchUpdate");
|
||||
this.socket.off("stock_change");
|
||||
this.socket.off("directorchanged");
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -661,6 +668,9 @@ export default {
|
||||
this.socket.on("stock_change", (data) => {
|
||||
this.handleEvent({ event: 'stock_change', ...data });
|
||||
});
|
||||
this.socket.on("directorchanged", (data) => {
|
||||
this.handleEvent({ event: 'directorchanged', ...(data || {}) });
|
||||
});
|
||||
} else {
|
||||
// Versuche es nach kurzer Verzögerung erneut
|
||||
setTimeout(() => {
|
||||
@@ -723,6 +733,7 @@ export default {
|
||||
case 'falukantUpdateProductionCertificate':
|
||||
case 'children_update':
|
||||
case 'falukantBranchUpdate':
|
||||
case 'directorchanged':
|
||||
this.queueOverviewRefresh();
|
||||
break;
|
||||
case 'production_ready':
|
||||
@@ -1256,6 +1267,14 @@ export default {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.branch-director-status {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.branch-director-status--assigned {
|
||||
color: var(--color-success, #218838);
|
||||
}
|
||||
|
||||
.overview-entry-card--action {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user