Feature: notify on click why entity is disabled

This commit is contained in:
Jose Olarte III
2025-07-04 19:12:56 +08:00
parent 17721ea448
commit 993aa005fa
5 changed files with 103 additions and 7 deletions

View File

@@ -19,6 +19,8 @@ with dynamic labeling and grid display. * * @author Matthew Raymer */
:you-selectable="youSelectable"
:show-all-route="showAllRoute"
:show-all-query-params="showAllQueryParams"
:notify="notify"
:conflict-context="conflictContext"
@entity-selected="handleEntitySelected"
/>
@@ -36,6 +38,7 @@ import { Component, Prop, Vue, Emit } from "vue-facing-decorator";
import EntityGrid from "./EntityGrid.vue";
import { Contact } from "../db/tables/contacts";
import { PlanData } from "../interfaces/records";
import { NotificationIface } from "../constants/app";
/**
* Entity data interface for giver/receiver
@@ -67,6 +70,7 @@ interface EntitySelectionEvent {
* - Show All navigation with context preservation
* - Cancel functionality
* - Event delegation for entity selection
* - Warning notifications for conflicted entities
*/
@Component({
components: {
@@ -130,6 +134,10 @@ export default class EntitySelectionStep extends Vue {
@Prop()
receiver?: EntityData | null;
/** Notification function from parent component */
@Prop()
notify?: (notification: NotificationIface, timeout?: number) => void;
/**
* Computed step label based on context
*/
@@ -143,6 +151,17 @@ export default class EntitySelectionStep extends Vue {
}
}
/**
* Computed conflict context for better error messages
*/
get conflictContext(): string {
if (this.stepType === "giver") {
return "recipient";
} else {
return "giver";
}
}
/**
* Whether to show projects in the grid
*/