Feature: notify on click why entity is disabled
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user