Compare commits
8 Commits
e84b7e7fa5
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b952c310f | |||
| a07db93423 | |||
| 77948d89ee | |||
| cfcc474f6e | |||
| 61f280a726 | |||
| 9007f09f7b | |||
| fd42de74fc | |||
| 2c3dc9d082 |
@@ -0,0 +1,13 @@
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Contract: kri-front-common
|
||||
Source: .agent/consumer-references/change-and-verification.md
|
||||
-->
|
||||
|
||||
# KriFrontCommon Change and Verification
|
||||
|
||||
- Pin or constrain the package version according to the consumer repository's dependency policy and commit its lockfile changes.
|
||||
- Review release notes and the actual affected API before upgrading.
|
||||
- Run the consumer's focused type-check, test, and build commands after an upgrade.
|
||||
- Keep `.agent/project.md` near 2-3 KiB as a routing document. Move conditional schemas, endpoint inventories, examples, and issue history to routed `.agent/references/` documents instead of deleting them.
|
||||
- Do not modify KriFrontCommon or another consumer repository unless it is explicitly included in the approved task scope.
|
||||
@@ -0,0 +1,15 @@
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Contract: kri-front-common
|
||||
Source: .agent/consumer-references/package-and-runtime.md
|
||||
-->
|
||||
|
||||
# KriFrontCommon Package and Runtime Contract
|
||||
|
||||
- Use the package root for runtime-neutral object, URL, date, string, and shared type utilities.
|
||||
- Use a focused subpath such as `@kri/common/http`, `@kri/common/browser`, `@kri/common/server`, `@kri/common/security`, `@kri/common/hooks`, `@kri/common/query`, `@kri/common/config`, `@kri/common/jotai`, or `@kri/common/noti-hub` for the corresponding capability.
|
||||
- Keep browser, server, and runtime-neutral imports on their intended side of the application boundary.
|
||||
- A consumer that uses React hooks, TanStack Query, or Jotai integrations must provide the compatible optional peer dependency required by its selected entry point.
|
||||
- Preserve the project's established HTTP client, authentication, error-policy, query-client, storage, and environment conventions when adopting a shared helper.
|
||||
- Validate external data at runtime; a shared TypeScript type alone does not validate an API response or persisted value.
|
||||
- Prefer named public exports and retain the consumer project's current module system and bundler conventions.
|
||||
13
.agent-harness/references/kri-front-common/react-compiler.md
Normal file
13
.agent-harness/references/kri-front-common/react-compiler.md
Normal file
@@ -0,0 +1,13 @@
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Contract: kri-front-common
|
||||
Source: .agent/consumer-references/react-compiler.md
|
||||
-->
|
||||
|
||||
# React Compiler and Manual Memoization
|
||||
|
||||
- `createKriNextConfig` enables `reactCompiler: true` unless the project overrides it; confirm the effective configuration.
|
||||
- When enabled, rely on React Compiler instead of adding `useMemo`, `useCallback`, or `React.memo` as a routine performance precaution.
|
||||
- Use manual memoization only for required reference stability, an Effect or third-party contract, compiler-incompatible code, or a measured performance problem.
|
||||
- Preserve existing memoization unless approved and verified for removal.
|
||||
- Use `"use memo"` or `"use no memo"` only for a documented compiler boundary.
|
||||
@@ -0,0 +1,11 @@
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Contract: kri-ui-registry
|
||||
Source: .agent/consumer-references/editor-html-compatibility.md
|
||||
-->
|
||||
|
||||
# KriEditor HTML Compatibility
|
||||
|
||||
- `enableImageMap` opt-in preserves `map`, nested `area`, and `img.usemap` HTML in WYSIWYG mode; consumers remain responsible for sanitizing URLs and attributes according to their server policy.
|
||||
- Use `htmlSanitizer` when a consumer must apply a stricter HTML policy than the editor's default DOMPurify profile.
|
||||
- Use `getWysiwygCompatibility` to keep lossy HTML in HTML mode. The callback must return `compatible: false` when WYSIWYG parsing would remove or materially rewrite content.
|
||||
@@ -0,0 +1,23 @@
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Contract: kri-ui-registry
|
||||
Source: .agent/consumer-references/installation-and-adaptation.md
|
||||
-->
|
||||
|
||||
# KriUiRegistry Installation and Adaptation
|
||||
|
||||
## Installation and Ownership
|
||||
|
||||
- Inspect the registry item and its dependencies before installation. Use the shadcn CLI with the approved registry endpoint under `https://ui-registry.kric.com/r/` instead of copying files from `dist/r` manually.
|
||||
- `kri-data-table` uses the TanStack Table v8 API. Keep `@tanstack/react-table` within the supported `^8.21.3` range and do not upgrade it to v9 until KriUiRegistry provides an explicitly migrated component contract.
|
||||
- Respect the consumer project's component aliases, target paths, package manager, styling system, React version, and existing design tokens.
|
||||
- The shadcn workflow copies component source into the consumer repository. After installation, treat that copy as project-owned code; do not assume registry updates propagate automatically.
|
||||
- Do not overwrite an existing project component without reviewing the diff and confirming that local behavior and accessibility are preserved.
|
||||
- Keep package and lockfile changes produced by an installation within the approved scope.
|
||||
|
||||
## Adaptation and Verification
|
||||
|
||||
- Adapt business data and application behavior outside the shared component when possible. Avoid embedding project-specific API, route, authentication, or environment logic into a reusable component.
|
||||
- Preserve the installed component's public props, accessibility, keyboard behavior, responsive layout, and loading, empty, error, and disabled states unless the task explicitly changes them.
|
||||
- If the registry lacks a generally reusable capability, propose it in KriUiRegistry; do not modify that repository unless it is explicitly in scope.
|
||||
- Run the consumer repository's focused type-check, lint, tests, and build after installation or upgrade.
|
||||
@@ -1,9 +1,18 @@
|
||||
## Generated Next.js Repository Rules
|
||||
# k-musical-manage-front Project Instruction Router
|
||||
|
||||
- This frontend application was generated by `@kri/create-next-app`.
|
||||
- Keep the generated Next.js routing, server/client boundary, authentication, environment, state, query, and application-shell conventions unless an approved task changes them.
|
||||
- Prefer shadcn and approved KRI UI Registry components over new local primitives when a suitable component exists.
|
||||
- Do not create new TypeScript type or interface names ending in `Dto` or `DTO`.
|
||||
- Consume shared frontend behavior from `@kri/common` and the KRI UI Registry instead of copying provider implementations into this repository.
|
||||
- `AGENTS.md` and `CLAUDE.md` are central-harness generated outputs. Never edit them directly; update `.agent/profile.yml` or `.agent/project.md` and recompose.
|
||||
- Run `npm run typecheck` and `npm run build` after relevant source or configuration changes.
|
||||
## Required Project References
|
||||
|
||||
Before each related task, read the current contents of every matching reference below, even if it was read earlier in the session.
|
||||
|
||||
| Task scope | Required reference |
|
||||
|---|---|
|
||||
| Any substantive analysis, planning, implementation, debugging, review, or documentation work in this repository | `.agent/references/repository-rules.md` |
|
||||
|
||||
If a task spans multiple scopes, read every matching reference. Do not assume remembered content is current.
|
||||
|
||||
## Harness Workflow
|
||||
|
||||
- `AGENTS.md` and `CLAUDE.md` are generated outputs. Never edit them directly.
|
||||
- Edit `.agent/project.md` only when routing changes. Store durable project detail in `.agent/references/`.
|
||||
- A reference-only content change does not require recomposition when its route is unchanged. Run harness verification to validate routing and UTF-8.
|
||||
- Recompose and verify after changing `.agent/project.md`, `.agent/profile.yml`, or another composed instruction source.
|
||||
|
||||
9
.agent/references/repository-rules.md
Normal file
9
.agent/references/repository-rules.md
Normal file
@@ -0,0 +1,9 @@
|
||||
## Generated Next.js Repository Rules
|
||||
|
||||
- This frontend application was generated by `@kri/create-next-app`.
|
||||
- Keep the generated Next.js routing, server/client boundary, authentication, environment, state, query, and application-shell conventions unless an approved task changes them.
|
||||
- Prefer shadcn and approved KRI UI Registry components over new local primitives when a suitable component exists.
|
||||
- Do not create new TypeScript type or interface names ending in `Dto` or `DTO`.
|
||||
- Consume shared frontend behavior from `@kri/common` and the KRI UI Registry instead of copying provider implementations into this repository.
|
||||
- `AGENTS.md` and `CLAUDE.md` are central-harness generated outputs. Never edit them directly; update `.agent/profile.yml` or `.agent/project.md` and recompose.
|
||||
- Run `npm run typecheck` and `npm run build` after relevant source or configuration changes.
|
||||
41
.agents/skills/attention-aware-communication/SKILL.md
Normal file
41
.agents/skills/attention-aware-communication/SKILL.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: attention-aware-communication
|
||||
description: Shape substantive answers, progress updates, and completion reports for fast, accurate reading without reducing the underlying work.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/attention-aware-communication/SKILL.md
|
||||
-->
|
||||
# Attention-Aware Communication
|
||||
|
||||
This skill changes presentation only. Investigate, implement, and verify as deeply as the task requires.
|
||||
|
||||
## Default: Attention-kind
|
||||
|
||||
- Put the bottom line in the first sentence and use plain Korean.
|
||||
- Say the least that fully answers, then stop. Remove preambles, padding, repetition, and closing restatements.
|
||||
- Never omit a number, scope condition, risk, prerequisite, uncertainty, or other fact that could cause the user to act incorrectly.
|
||||
- For genuine breadth, explain the one or two most important points first, name the remaining areas, and let the user choose whether to expand them. Do not use this to defer required caveats or a complete focused answer.
|
||||
- When the user asks for a detailed explanation, walkthrough, rationale, or full picture, suspend brevity and provide the necessary detail in scannable sections.
|
||||
- When asked for a deliverable such as a command, message, snippet, or commit text, return the deliverable without unnecessary framing unless safety or correctness requires context.
|
||||
- Ask one blocking question at a time and put it last. Keep working when a non-blocking assumption is safe.
|
||||
|
||||
## Progress and Completion: Rundown
|
||||
|
||||
Use Rundown formatting when a task has multiple steps or mixed states:
|
||||
|
||||
- Start with a one-line outcome that includes any blocker.
|
||||
- Distinguish verified completion, work in progress, work not started, and unknown state. Omit empty categories.
|
||||
- Put each blocker or material risk on its own line.
|
||||
- Report only observed states. Mark an unknown as unknown and state what check would resolve it.
|
||||
- End with the next action or a small numbered choice only when the user must decide.
|
||||
|
||||
## Explicit-Only: Spartan
|
||||
|
||||
Use Spartan style only when the user explicitly asks for it:
|
||||
|
||||
- Lead with the complete answer in one sentence.
|
||||
- Be terse, blunt, and direct; remove warmth, hedging, transitions, narration, and summaries.
|
||||
- Keep all load-bearing facts, warnings, and conditions even when they make the answer longer.
|
||||
- If the user also asks for depth, provide the full detail in short, separated blocks.
|
||||
37
.agents/skills/karpathy-guidelines/SKILL.md
Normal file
37
.agents/skills/karpathy-guidelines/SKILL.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: karpathy-guidelines
|
||||
description: Keep implementation, refactoring, and code review assumption-aware, simple, surgical, and tied to verifiable success criteria.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/karpathy-guidelines/SKILL.md
|
||||
-->
|
||||
# Karpathy Guidelines
|
||||
|
||||
Use these guidelines while implementing, refactoring, or reviewing code. They refine execution quality but do not expand the approved task scope.
|
||||
|
||||
## Think Before Coding
|
||||
|
||||
- Inspect the relevant code and repository conventions before choosing a solution.
|
||||
- Surface an assumption when different choices would materially change behavior, compatibility, data, or scope.
|
||||
- Ask only when the decision cannot be discovered safely and a reasonable assumption would be risky. Otherwise proceed with the smallest reasonable assumption and report it.
|
||||
|
||||
## Simplicity First
|
||||
|
||||
- Implement the smallest complete solution that satisfies the observable requirement.
|
||||
- Do not add speculative abstractions, extension points, configuration, fallback paths, or dependencies for hypothetical future use.
|
||||
- Prefer an existing repository pattern or standard-library capability over a new local framework.
|
||||
|
||||
## Surgical Changes
|
||||
|
||||
- Every changed line must trace to the approved objective, required validation, or a necessary compatibility adjustment.
|
||||
- Preserve existing naming, structure, public behavior, and formatting outside that boundary.
|
||||
- Do not mix the task with unrelated cleanup. Remove dead code, duplication, or ceremony introduced by the current change before finishing.
|
||||
|
||||
## Goal-Driven Execution
|
||||
|
||||
- Translate the request into observable success criteria before implementation.
|
||||
- Choose the narrowest check that can fail for the behavior being changed, then run broader repository checks when appropriate.
|
||||
- Iterate only within the approved scope until the criteria pass or a concrete blocker is established.
|
||||
- Before reporting completion, inspect the final diff for unnecessary code and use `verification-before-completion` for fresh evidence.
|
||||
29
.agents/skills/project-reference-loader/SKILL.md
Normal file
29
.agents/skills/project-reference-loader/SKILL.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
name: project-reference-loader
|
||||
description: Load the current project-specific and shared reference documents routed by AGENTS.md before substantive repository analysis, implementation, debugging, review, or planning.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/project-reference-loader/SKILL.md
|
||||
-->
|
||||
# Project Reference Loader
|
||||
|
||||
Use the repository's generated `AGENTS.md` as the routing entrypoint.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Find the `Required Project References` and shared-contract reference routes that match the current task.
|
||||
2. Read the current contents of every matching file before relying on remembered project behavior, even when the file was read earlier in the session.
|
||||
3. If the task crosses multiple scopes, read every matching reference. Do not load unrelated references merely because they exist.
|
||||
4. Treat routed references as binding project instructions within their stated scope. Resolve conflicts using the precedence rules in `AGENTS.md`.
|
||||
5. If a required reference is missing, unreadable, outside the repository, or internally inconsistent, stop the affected work and report the exact problem instead of guessing.
|
||||
|
||||
## Change Handling
|
||||
|
||||
- Edit authored project detail under `.agent/references/` when the durable rule belongs only to that repository.
|
||||
- Edit the provider's `.agent/consumer-references/` when the rule is part of a shared consumer contract.
|
||||
- Never edit generated `.agent-harness/references/` copies directly.
|
||||
- Changing `.agent/references/` does not require recomposing `AGENTS.md` when its route is unchanged; changing routing, `project.md`, `consumer.md`, or shared reference sources does.
|
||||
|
||||
Before completion, confirm that the references used still exist and that the result does not contradict them. This skill does not expand authorization to edit, commit, push, deploy, connect to external systems, or perform destructive operations.
|
||||
38
.agents/skills/verification-before-completion/SKILL.md
Normal file
38
.agents/skills/verification-before-completion/SKILL.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: verification-before-completion
|
||||
description: Require fresh, claim-specific evidence before reporting work complete, fixed, passing, ready, or safe to commit or publish.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/verification-before-completion/SKILL.md
|
||||
-->
|
||||
# Verification Before Completion
|
||||
|
||||
No completion claim without fresh evidence. This workflow verifies status; it does not authorize a commit, push, deployment, database operation, or other protected action.
|
||||
|
||||
## Verification Gate
|
||||
|
||||
Before making a success claim:
|
||||
|
||||
1. State the exact claim internally and identify which observable check can prove or disprove it.
|
||||
2. Run the relevant command or inspection fresh after the final change. Use repository-defined commands; do not invent a substitute that proves a different property.
|
||||
3. Read the complete result needed for the claim, including the exit code, failure count, skipped checks, and generated changes.
|
||||
4. Compare the evidence with the claim and the approved acceptance criteria.
|
||||
5. Report only the status supported by that evidence.
|
||||
|
||||
## Evidence Rules
|
||||
|
||||
- A passing lint does not prove compilation, a passing build does not prove runtime behavior, and a passing narrow test does not prove unrelated requirements.
|
||||
- For a regression test, establish that it is capable of detecting the defect when practical; do not treat an always-passing test as proof.
|
||||
- Recheck the worktree or final diff after generators, formatters, tests, or builds that may create or alter files.
|
||||
- Separate verified results, failures, checks not run, and pre-existing failures. Never quietly merge them into a success statement.
|
||||
- For delegated work, inspect the returned changes and run the relevant verification yourself before accepting the completion claim.
|
||||
- For absence or universal claims such as “no occurrences” or “all projects,” use a check whose scope actually covers the claim.
|
||||
|
||||
## Reporting
|
||||
|
||||
- Cite the commands or inspections actually run and summarize their observed results.
|
||||
- If a required check cannot run, state the actual incomplete or blocked status and the exact reason.
|
||||
- Do not use “should work,” “probably passes,” “seems correct,” or similar language as a substitute for verification.
|
||||
- Do not claim completion while a required check is failing or while known correctness, encoding, security, or generated-output drift remains unresolved.
|
||||
41
.claude/skills/attention-aware-communication/SKILL.md
Normal file
41
.claude/skills/attention-aware-communication/SKILL.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: attention-aware-communication
|
||||
description: Shape substantive answers, progress updates, and completion reports for fast, accurate reading without reducing the underlying work.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/attention-aware-communication/SKILL.md
|
||||
-->
|
||||
# Attention-Aware Communication
|
||||
|
||||
This skill changes presentation only. Investigate, implement, and verify as deeply as the task requires.
|
||||
|
||||
## Default: Attention-kind
|
||||
|
||||
- Put the bottom line in the first sentence and use plain Korean.
|
||||
- Say the least that fully answers, then stop. Remove preambles, padding, repetition, and closing restatements.
|
||||
- Never omit a number, scope condition, risk, prerequisite, uncertainty, or other fact that could cause the user to act incorrectly.
|
||||
- For genuine breadth, explain the one or two most important points first, name the remaining areas, and let the user choose whether to expand them. Do not use this to defer required caveats or a complete focused answer.
|
||||
- When the user asks for a detailed explanation, walkthrough, rationale, or full picture, suspend brevity and provide the necessary detail in scannable sections.
|
||||
- When asked for a deliverable such as a command, message, snippet, or commit text, return the deliverable without unnecessary framing unless safety or correctness requires context.
|
||||
- Ask one blocking question at a time and put it last. Keep working when a non-blocking assumption is safe.
|
||||
|
||||
## Progress and Completion: Rundown
|
||||
|
||||
Use Rundown formatting when a task has multiple steps or mixed states:
|
||||
|
||||
- Start with a one-line outcome that includes any blocker.
|
||||
- Distinguish verified completion, work in progress, work not started, and unknown state. Omit empty categories.
|
||||
- Put each blocker or material risk on its own line.
|
||||
- Report only observed states. Mark an unknown as unknown and state what check would resolve it.
|
||||
- End with the next action or a small numbered choice only when the user must decide.
|
||||
|
||||
## Explicit-Only: Spartan
|
||||
|
||||
Use Spartan style only when the user explicitly asks for it:
|
||||
|
||||
- Lead with the complete answer in one sentence.
|
||||
- Be terse, blunt, and direct; remove warmth, hedging, transitions, narration, and summaries.
|
||||
- Keep all load-bearing facts, warnings, and conditions even when they make the answer longer.
|
||||
- If the user also asks for depth, provide the full detail in short, separated blocks.
|
||||
37
.claude/skills/karpathy-guidelines/SKILL.md
Normal file
37
.claude/skills/karpathy-guidelines/SKILL.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: karpathy-guidelines
|
||||
description: Keep implementation, refactoring, and code review assumption-aware, simple, surgical, and tied to verifiable success criteria.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/karpathy-guidelines/SKILL.md
|
||||
-->
|
||||
# Karpathy Guidelines
|
||||
|
||||
Use these guidelines while implementing, refactoring, or reviewing code. They refine execution quality but do not expand the approved task scope.
|
||||
|
||||
## Think Before Coding
|
||||
|
||||
- Inspect the relevant code and repository conventions before choosing a solution.
|
||||
- Surface an assumption when different choices would materially change behavior, compatibility, data, or scope.
|
||||
- Ask only when the decision cannot be discovered safely and a reasonable assumption would be risky. Otherwise proceed with the smallest reasonable assumption and report it.
|
||||
|
||||
## Simplicity First
|
||||
|
||||
- Implement the smallest complete solution that satisfies the observable requirement.
|
||||
- Do not add speculative abstractions, extension points, configuration, fallback paths, or dependencies for hypothetical future use.
|
||||
- Prefer an existing repository pattern or standard-library capability over a new local framework.
|
||||
|
||||
## Surgical Changes
|
||||
|
||||
- Every changed line must trace to the approved objective, required validation, or a necessary compatibility adjustment.
|
||||
- Preserve existing naming, structure, public behavior, and formatting outside that boundary.
|
||||
- Do not mix the task with unrelated cleanup. Remove dead code, duplication, or ceremony introduced by the current change before finishing.
|
||||
|
||||
## Goal-Driven Execution
|
||||
|
||||
- Translate the request into observable success criteria before implementation.
|
||||
- Choose the narrowest check that can fail for the behavior being changed, then run broader repository checks when appropriate.
|
||||
- Iterate only within the approved scope until the criteria pass or a concrete blocker is established.
|
||||
- Before reporting completion, inspect the final diff for unnecessary code and use `verification-before-completion` for fresh evidence.
|
||||
29
.claude/skills/project-reference-loader/SKILL.md
Normal file
29
.claude/skills/project-reference-loader/SKILL.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
name: project-reference-loader
|
||||
description: Load the current project-specific and shared reference documents routed by AGENTS.md before substantive repository analysis, implementation, debugging, review, or planning.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/project-reference-loader/SKILL.md
|
||||
-->
|
||||
# Project Reference Loader
|
||||
|
||||
Use the repository's generated `AGENTS.md` as the routing entrypoint.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Find the `Required Project References` and shared-contract reference routes that match the current task.
|
||||
2. Read the current contents of every matching file before relying on remembered project behavior, even when the file was read earlier in the session.
|
||||
3. If the task crosses multiple scopes, read every matching reference. Do not load unrelated references merely because they exist.
|
||||
4. Treat routed references as binding project instructions within their stated scope. Resolve conflicts using the precedence rules in `AGENTS.md`.
|
||||
5. If a required reference is missing, unreadable, outside the repository, or internally inconsistent, stop the affected work and report the exact problem instead of guessing.
|
||||
|
||||
## Change Handling
|
||||
|
||||
- Edit authored project detail under `.agent/references/` when the durable rule belongs only to that repository.
|
||||
- Edit the provider's `.agent/consumer-references/` when the rule is part of a shared consumer contract.
|
||||
- Never edit generated `.agent-harness/references/` copies directly.
|
||||
- Changing `.agent/references/` does not require recomposing `AGENTS.md` when its route is unchanged; changing routing, `project.md`, `consumer.md`, or shared reference sources does.
|
||||
|
||||
Before completion, confirm that the references used still exist and that the result does not contradict them. This skill does not expand authorization to edit, commit, push, deploy, connect to external systems, or perform destructive operations.
|
||||
38
.claude/skills/verification-before-completion/SKILL.md
Normal file
38
.claude/skills/verification-before-completion/SKILL.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: verification-before-completion
|
||||
description: Require fresh, claim-specific evidence before reporting work complete, fixed, passing, ready, or safe to commit or publish.
|
||||
---
|
||||
|
||||
<!--
|
||||
GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY.
|
||||
Source: skills/verification-before-completion/SKILL.md
|
||||
-->
|
||||
# Verification Before Completion
|
||||
|
||||
No completion claim without fresh evidence. This workflow verifies status; it does not authorize a commit, push, deployment, database operation, or other protected action.
|
||||
|
||||
## Verification Gate
|
||||
|
||||
Before making a success claim:
|
||||
|
||||
1. State the exact claim internally and identify which observable check can prove or disprove it.
|
||||
2. Run the relevant command or inspection fresh after the final change. Use repository-defined commands; do not invent a substitute that proves a different property.
|
||||
3. Read the complete result needed for the claim, including the exit code, failure count, skipped checks, and generated changes.
|
||||
4. Compare the evidence with the claim and the approved acceptance criteria.
|
||||
5. Report only the status supported by that evidence.
|
||||
|
||||
## Evidence Rules
|
||||
|
||||
- A passing lint does not prove compilation, a passing build does not prove runtime behavior, and a passing narrow test does not prove unrelated requirements.
|
||||
- For a regression test, establish that it is capable of detecting the defect when practical; do not treat an always-passing test as proof.
|
||||
- Recheck the worktree or final diff after generators, formatters, tests, or builds that may create or alter files.
|
||||
- Separate verified results, failures, checks not run, and pre-existing failures. Never quietly merge them into a success statement.
|
||||
- For delegated work, inspect the returned changes and run the relevant verification yourself before accepting the completion claim.
|
||||
- For absence or universal claims such as “no occurrences” or “all projects,” use a check whose scope actually covers the claim.
|
||||
|
||||
## Reporting
|
||||
|
||||
- Cite the commands or inspections actually run and summarize their observed results.
|
||||
- If a required check cannot run, state the actual incomplete or blocked status and the exact reason.
|
||||
- Do not use “should work,” “probably passes,” “seems correct,” or similar language as a substitute for verification.
|
||||
- Do not claim completion while a required check is failing or while known correctness, encoding, security, or generated-output drift remains unresolved.
|
||||
158
AGENTS.md
158
AGENTS.md
@@ -35,6 +35,13 @@ Later and more specific instructions may override earlier general instructions o
|
||||
- Lead with the result or decision, then provide only the detail needed to verify it.
|
||||
- Do not create or retain a full session transcript.
|
||||
|
||||
### Attention-Aware Response Style
|
||||
|
||||
- Use `attention-aware-communication` for substantive answers, progress updates, and completion reports.
|
||||
- Default to concise, bottom-line-first Korean without omitting a condition, risk, number, or uncertainty needed for a correct decision.
|
||||
- Give full detail when the user requests depth. Use Spartan style only when explicitly requested.
|
||||
- Presentation rules never reduce investigation, implementation, validation, or reporting obligations.
|
||||
|
||||
## Work Authorization
|
||||
|
||||
- The default workflow is discussion first and explicit execution approval second.
|
||||
@@ -152,6 +159,13 @@ Preferred human-facing tools:
|
||||
- If a possible secret is discovered, do not repeat it. Report only its location, type, and recommended containment action.
|
||||
- Do not rotate, revoke, copy, or otherwise modify credentials unless that exact action is explicitly authorized.
|
||||
|
||||
## Workflow Skills
|
||||
|
||||
- Use `project-reference-loader` before substantive repository analysis, planning, implementation, debugging, or review. Read only the current project and shared references routed for that task, and reread them for each related task even if they were loaded earlier in the session.
|
||||
- Use `karpathy-guidelines` when implementing, refactoring, or reviewing code. It keeps assumptions visible, changes surgical, and success criteria verifiable.
|
||||
- Use `verification-before-completion` before claiming that work is complete, fixed, passing, ready, or safe to commit or publish.
|
||||
- A skill does not expand task scope or authorize Git publication, database execution, deployment, destructive actions, or external communication.
|
||||
|
||||
## Validation
|
||||
|
||||
- Discover supported build, test, lint, type-check, and formatting commands from repository files and project instructions. Do not invent commands.
|
||||
@@ -216,6 +230,7 @@ When implementation is complete, report in Korean:
|
||||
- Treat the current React version, component style, state management, routing, styling, and test approach as authoritative.
|
||||
- Do not perform unrelated class-to-hook, JavaScript-to-TypeScript, state-library, styling-system, or React-to-Next.js migrations.
|
||||
- Keep components focused and follow the repository's established split between presentation, state, data access, and side effects.
|
||||
- Do not use nested ternary expressions. Use clear `if`/`else` branches, early returns, or well-named intermediate variables instead; a single, non-nested ternary is acceptable only when it remains immediately readable.
|
||||
- Keep effects dependency-correct and clean up subscriptions, timers, listeners, and in-flight work where applicable.
|
||||
- Use stable semantic keys and preserve accessibility, loading, empty, error, disabled, and success states.
|
||||
- Preserve public component props and shared UI contracts unless a coordinated breaking change is explicitly approved.
|
||||
@@ -235,72 +250,109 @@ When implementation is complete, report in Korean:
|
||||
|
||||
## KriFrontCommon Consumer Contract
|
||||
|
||||
### Package Usage
|
||||
|
||||
- Consume this contract through the published `@kri/common` package and only through entry points declared in its `package.json` `exports` map.
|
||||
- Use the package root for runtime-neutral object, URL, date, string, and shared type utilities.
|
||||
- Use a focused subpath such as `@kri/common/http`, `@kri/common/browser`, `@kri/common/server`, `@kri/common/security`, `@kri/common/hooks`, `@kri/common/query`, `@kri/common/config`, `@kri/common/jotai`, or `@kri/common/noti-hub` for the corresponding capability.
|
||||
- Consume the published `@kri/common` package only through entry points declared by its `package.json` `exports` map.
|
||||
- Do not import from `@kri/common/src/*`, `@kri/common/dist/*`, or another undeclared deep path.
|
||||
- Do not copy or fork a shared utility locally merely to avoid using an available public entry point. Propose a backward-compatible library addition when the shared contract is genuinely missing.
|
||||
|
||||
### Runtime and Optional Integrations
|
||||
|
||||
- Keep browser, server, and runtime-neutral imports on their intended side of the application boundary.
|
||||
- A consumer that uses React hooks, TanStack Query, or Jotai integrations must provide the compatible optional peer dependency required by its selected entry point.
|
||||
- Preserve the project's established HTTP client, authentication, error-policy, query-client, storage, and environment conventions when adopting a shared helper.
|
||||
- Validate external data at runtime; a shared TypeScript type alone does not validate an API response or persisted value.
|
||||
- Prefer named public exports and retain the consumer project's current module system and bundler conventions.
|
||||
|
||||
### React Compiler and Manual Memoization
|
||||
|
||||
- `createKriNextConfig` enables `reactCompiler: true` unless the project overrides it; confirm the effective configuration.
|
||||
- When enabled, rely on React Compiler instead of adding `useMemo`, `useCallback`, or `React.memo` as a routine performance precaution.
|
||||
- Use manual memoization only for required reference stability, an Effect or third-party contract, compiler-incompatible code, or a measured performance problem.
|
||||
- Preserve existing memoization unless approved and verified for removal. Use `"use memo"` or `"use no memo"` only for a documented compiler boundary.
|
||||
|
||||
### Project Instruction Budget
|
||||
|
||||
- Keep `.agent/project.md` at or below 8 KiB (8,192 bytes) as the normal target. Do not delete material rules merely to meet the budget; move schemas, endpoint inventories, examples, and temporary issue history to linked project documentation, and keep concise read-routing instructions here.
|
||||
|
||||
### Change Safety
|
||||
|
||||
- Pin or constrain the package version according to the consumer repository's dependency policy and commit its lockfile changes.
|
||||
- Review release notes and the actual affected API before upgrading. Run the consumer's focused type-check, test, and build commands after an upgrade.
|
||||
- Prefer a public shared helper or an approved backward-compatible library addition over copying or forking shared behavior locally.
|
||||
- Do not modify KriFrontCommon or another consumer repository unless it is explicitly included in the approved task scope.
|
||||
|
||||
## KriUiRegistry Consumer Contract
|
||||
### Required Shared References
|
||||
|
||||
### UI Component Selection
|
||||
Before each related task, read the current contents of every matching reference, even if it was read earlier in the session.
|
||||
|
||||
| Task scope | Required reference |
|
||||
|---|---|
|
||||
| Package entry points, runtime boundaries, HTTP, authentication, state, storage, environment, or optional peer integrations | `.agent-harness/references/kri-front-common/package-and-runtime.md` |
|
||||
| React rendering performance, memoization, or React Compiler behavior | `.agent-harness/references/kri-front-common/react-compiler.md` |
|
||||
| Package upgrade, dependency changes, lockfile, or verification | `.agent-harness/references/kri-front-common/change-and-verification.md` |
|
||||
|
||||
If a task spans multiple scopes, read every matching reference. Generated files under `.agent-harness/references/` are read-only copies; edit KriFrontCommon's `.agent/consumer.md` or `.agent/consumer-references/` and recompose instead.
|
||||
|
||||
## Noti-hub SMS Types
|
||||
|
||||
- `MessageType.SMS = 21`, `LMS = 22`, `MMS = 23`; `ChannelType.SMS = 2` is unchanged. `SMS_TYPE_ARRAY` and `SmsType` include all three.
|
||||
- `LMS_MMS = 22` remains a deprecated source-compatibility alias for LMS only. It does not represent MMS. Enum reverse lookup for 22 returns LMS. Use numeric bulk-list paths; the server no longer accepts LMS_MMS in paths. Numeric 21/22/23 bulk-list requests all return the entire SMS channel, not type-filtered lists.
|
||||
- Requests retain their existing URLs/body shapes. The server chooses the actual type per recipient after substitution: attachment -> MMS; otherwise title or UTF-8 body >= 90 bytes -> LMS; otherwise SMS.
|
||||
- Refresh templates from the save response (`tmplatTy`); display actual delivery types from `sendTy`, not the template or result code. A bulk can contain multiple SMS types. LMS/MMS share result codes; use existing server result labels.
|
||||
- SMS, LMS, MMS and KKO use cancellation code 9998. Verify with `npm run typecheck`, `npm run build`, and `node --test tests/noti-hub-sms.test.mjs`.
|
||||
|
||||
## Noti-hub Reservation Cancellation
|
||||
|
||||
- Import cancellation types, constants, and helpers from `@kri/common/noti-hub` only. They are runtime-neutral and require no optional peers.
|
||||
- Individual current cancellation state is determined by resultCode via isReserveCanceledResult; bulk current state is cancellationStatus (NONE/PARTIAL/ALL). These describe current cancellation state, not cancellation eligibility. cancelDt and cancelUser are request history, not current state.
|
||||
- SendResultInfo, SendInfo, and BulkSendInfo expose optional cancelable. Use isSendCancelable(item), which returns true only for cancelable === true, for cancellation eligibility; missing values from older responses are treated as false. Never infer eligibility from cancelDt, result labels, or result codes.
|
||||
- cancelable reflects query-time state and may change before cancellation. Determine the final outcome from SendCancelResponse counts.
|
||||
- sendIdx is the single-cancel identifier, not cmid. It is absent from the latest abbreviated report (/api/v1/report/last/send/...). Request sendIdx must be a positive integer; bulkSendKey is required and at most 32 characters.
|
||||
- EMAIL_RESERVE_CANCELED_RESULT_CODE is 108 for EMAIL. SMS_KKO_RESERVE_CANCELED_RESULT_CODE is 9998 for SMS, LMS, MMS, and KKO. Unknown message types are not recognized as canceled.
|
||||
- Display the server's resultViewLabel/resultLabel ("예약 취소"). There is no separate result-code list API.
|
||||
- HTTP 200 can contain notCancelableCount. parseSendCancelResponse validates nonnegative integer counts and targetCount = canceledCount + alreadyCanceledCount + notCancelableCount, throwing TypeError on invalid data. Bulk targetCount counts currently registered detail rows; response canceledCount counts only cancellations made by that request.
|
||||
- Existing response fields are unchanged; all added fields on existing types are optional. Verify with npm run typecheck and npm run build.
|
||||
|
||||
## HTTP Streaming
|
||||
|
||||
- `@kri/common/http` HTTP clients expose streamGet/streamPost/streamPut/streamPatch/streamDel, returning HttpStreamResponse (status, statusText, headers, url, nullable body).
|
||||
- Streaming shares ordinary authentication, URL, body and HTTP-error policy. Read body incrementally; no automatic JSON/NDJSON/SSE parsing or reconnect is performed.
|
||||
- Streaming options accept an external AbortSignal. Caller cancellation raises AbortError without an HTTP error notification. Cancel the body when it will not be consumed.
|
||||
- timeoutMs covers connection/headers (and an HTTP error body); idleTimeoutMs covers inactivity after successful headers and resets on consumed chunks. Both default to the client's defaultTimeoutMs (60 seconds by default), and 0 disables that timer for streaming only.
|
||||
- Mid-stream transport/time-out errors reach the body reader. HTTP error statuses use existing HttpError handlers before a stream is returned. A 204 response has body=null.
|
||||
- See HTTP_STREAMING.md for examples and node --test tests/http-stream.test.mjs for focused validation after npm run build.
|
||||
|
||||
## KriUiRegistry Consumer Contract
|
||||
|
||||
When implementing or changing frontend UI, use this order:
|
||||
|
||||
1. Reuse an existing shared component in the project when it already meets the requirement.
|
||||
2. Prefer an approved component from KriUiRegistry.
|
||||
3. Otherwise, prefer a suitable shadcn/ui component.
|
||||
4. Create a new custom component only when the preceding options cannot meet the requirement without an unsafe or misleading adaptation.
|
||||
4. Create a custom component only when the preceding options cannot meet the requirement safely.
|
||||
|
||||
### Installation and Ownership
|
||||
### KriAutoComplete Search Scroll
|
||||
|
||||
- Inspect the registry item and its dependencies before installation. Use the shadcn CLI with the approved registry endpoint under `https://ui-registry.kric.com/r/` instead of copying files from `dist/r` manually.
|
||||
- `kri-data-table` uses the TanStack Table v8 API. Keep `@tanstack/react-table` within the supported `^8.21.3` range and do not upgrade it to v9 until KriUiRegistry provides an explicitly migrated component contract.
|
||||
- Respect the consumer project's component aliases, target paths, package manager, styling system, React version, and existing design tokens.
|
||||
- The shadcn workflow copies component source into the consumer repository. After installation, treat that copy as project-owned code; do not assume registry updates propagate automatically.
|
||||
- Do not overwrite an existing project component without reviewing the diff and confirming that local behavior and accessibility are preserved.
|
||||
- Keep package and lockfile changes produced by an installation within the approved scope.
|
||||
- `kri-auto-complete` exposes `resetScrollOnSearch?: boolean` on `KriSingleSelect`, `KriMultiSelect`, and `MultiSelect`. It defaults to `false`, preserving existing behavior.
|
||||
- When enabled, a search value change (including clearing it) resets the option list scroll to the top on the next animation frame in both `filter` and `inputOnly` modes. Async result updates alone do not trigger another reset.
|
||||
|
||||
### Adaptation and Verification
|
||||
### KriAutoComplete Option Tooltip
|
||||
|
||||
- Adapt business data and application behavior outside the shared component when possible. Avoid embedding project-specific API, route, authentication, or environment logic into a reusable component.
|
||||
- Preserve the installed component's public props, accessibility, keyboard behavior, responsive layout, and loading, empty, error, and disabled states unless the task explicitly changes them.
|
||||
- If the registry lacks a generally reusable capability, propose it in KriUiRegistry; do not modify that repository unless it is explicitly in scope.
|
||||
- Run the consumer repository's focused type-check, lint, tests, and build after installation or upgrade.
|
||||
- `kri-auto-complete` exposes `optionTooltip?: 'singleLine' | 'wrap'` and `optionTooltipClassName?: string` on `KriSingleSelect`, `KriMultiSelect`, and `MultiSelect`. It is off by default, preserving existing behavior.
|
||||
- When enabled, hovering an option shows its full `label` in a right-side tooltip. `singleLine` stays on one line until the available viewport width; `wrap` wraps at 28rem. The item depends on the shadcn `tooltip` component and provides its own `TooltipProvider`.
|
||||
|
||||
## Generated Next.js Repository Rules
|
||||
### KriAutoComplete Search Match
|
||||
|
||||
- This frontend application was generated by `@kri/create-next-app`.
|
||||
- Keep the generated Next.js routing, server/client boundary, authentication, environment, state, query, and application-shell conventions unless an approved task changes them.
|
||||
- Prefer shadcn and approved KRI UI Registry components over new local primitives when a suitable component exists.
|
||||
- Do not create new TypeScript type or interface names ending in `Dto` or `DTO`.
|
||||
- Consume shared frontend behavior from `@kri/common` and the KRI UI Registry instead of copying provider implementations into this repository.
|
||||
- `AGENTS.md` and `CLAUDE.md` are central-harness generated outputs. Never edit them directly; update `.agent/profile.yml` or `.agent/project.md` and recompose.
|
||||
- Run `npm run typecheck` and `npm run build` after relevant source or configuration changes.
|
||||
- `kri-auto-complete` exposes `searchMatch?: 'fuzzy' | 'contains'` on `KriSingleSelect`, `KriMultiSelect`, and `MultiSelect`. It defaults to `fuzzy` (cmdk's default subsequence scoring), preserving existing behavior.
|
||||
- `contains` keeps only options whose label or value contains the search text as a case-insensitive substring, in the original option order. It applies only when `searchMode` is `filter`.
|
||||
|
||||
### KriEditor SMS Preview
|
||||
|
||||
- `changeSmsType` reports `SMS | LMS | MMS`. Update consumer callbacks to handle `MMS`; this widens the previous callback contract.
|
||||
- Attachment presence (`smsHasAttachment`) takes priority and reports MMS. Otherwise a title or UTF-8 preview size >= `smsMaxBytes` (default 90) reports LMS; the remainder reports SMS. LMS/MMS share `lmsMaxBytes` (default 2000).
|
||||
- UTF-8 byte counting includes `smsPreviewSuffix` and its separating newline, without storing the suffix in the body.
|
||||
- This is a preview. Use the template-save response for saved `tmplatTy` and delivery-result `sendTy` for actual per-recipient type after server substitution. Registry updates require updating installed consumer copies.
|
||||
|
||||
### Required Shared References
|
||||
|
||||
Before each related task, read the current contents of every matching reference, even if it was read earlier in the session.
|
||||
|
||||
| Task scope | Required reference |
|
||||
|---|---|
|
||||
| Installing, upgrading, adapting, or verifying a registry component | `.agent-harness/references/kri-ui-registry/installation-and-adaptation.md` |
|
||||
| KriEditor HTML, image-map, sanitizer, or WYSIWYG compatibility | `.agent-harness/references/kri-ui-registry/editor-html-compatibility.md` |
|
||||
|
||||
If a task spans multiple scopes, read every matching reference. Generated files under `.agent-harness/references/` are read-only copies; edit KriUiRegistry's `.agent/consumer.md` or `.agent/consumer-references/` and recompose instead.
|
||||
|
||||
# k-musical-manage-front Project Instruction Router
|
||||
|
||||
## Required Project References
|
||||
|
||||
Before each related task, read the current contents of every matching reference below, even if it was read earlier in the session.
|
||||
|
||||
| Task scope | Required reference |
|
||||
|---|---|
|
||||
| Any substantive analysis, planning, implementation, debugging, review, or documentation work in this repository | `.agent/references/repository-rules.md` |
|
||||
|
||||
If a task spans multiple scopes, read every matching reference. Do not assume remembered content is current.
|
||||
|
||||
## Harness Workflow
|
||||
|
||||
- `AGENTS.md` and `CLAUDE.md` are generated outputs. Never edit them directly.
|
||||
- Edit `.agent/project.md` only when routing changes. Store durable project detail in `.agent/references/`.
|
||||
- A reference-only content change does not require recomposition when its route is unchanged. Run harness verification to validate routing and UTF-8.
|
||||
- Recompose and verify after changing `.agent/project.md`, `.agent/profile.yml`, or another composed instruction source.
|
||||
|
||||
@@ -19,7 +19,13 @@ import {
|
||||
useMonitoringApplyUsersQuery,
|
||||
} from "@/query/assign";
|
||||
import {useReviewSlotsQuery} from "@/query/review";
|
||||
import {filterPerformance, getCodeLabel, type PerformanceFilterState} from "@/lib/kmusical/view";
|
||||
import {
|
||||
excludeMastersWithSub,
|
||||
filterPerformance,
|
||||
getApplyPerformanceId,
|
||||
getCodeLabel,
|
||||
type PerformanceFilterState,
|
||||
} from "@/lib/kmusical/view";
|
||||
import {buildPerformanceSmsParams} from "@/lib/kmusical/notification";
|
||||
import {PERFORMANCE_FIELD_LABELS} from "@/lib/kmusical/field-labels";
|
||||
import {REVIEW_TYPE, type PerformanceFull, type ReviewType} from "@/types/kmusical";
|
||||
@@ -54,7 +60,7 @@ const AssignPage = () => {
|
||||
const smsOpen = isDialogOpen("assignSmsSendDialog");
|
||||
const calendarOpen = isDialogOpen("assignCalendarDialog");
|
||||
const {data: detail, refetch: refetchDetail} = usePerformanceQuery(assignOpen ? selectedId : "");
|
||||
const {data: applyUsers = []} = useMonitoringApplyUsersQuery(selectedId);
|
||||
const {data: applyUsers = []} = useMonitoringApplyUsersQuery(getApplyPerformanceId(selectedId));
|
||||
const {data: users = []} = useUserListQuery(MONITORING_USER_ROLE);
|
||||
const suppressAssignCloseRef = useRef(false);
|
||||
const confirmMutation = useConfirmAssignMutation();
|
||||
@@ -64,7 +70,8 @@ const AssignPage = () => {
|
||||
const reviewSlotTypeMap = new Map(reviewSlots.map((slot) => [slot.reviewSlot, slot.reviewType]));
|
||||
const countConfirmedAssigns = (row: PerformanceFull, reviewType: ReviewType) =>
|
||||
row.performanceAssignList.filter((assign) => reviewSlotTypeMap.get(assign.reviewSlot) === reviewType).length;
|
||||
const filteredData = data
|
||||
const assignableData = excludeMastersWithSub(data);
|
||||
const filteredData = assignableData
|
||||
.filter((item) => filterPerformance(item, filters))
|
||||
.sort((a, b) => (b.performanceMonitoringSchedule?.monitoringDate ?? "").localeCompare(a.performanceMonitoringSchedule?.monitoringDate ?? ""));
|
||||
const selected = detail ?? data.find((item) => item.performanceId === selectedId) ?? null;
|
||||
@@ -75,7 +82,7 @@ const AssignPage = () => {
|
||||
const smsTargetUsers = availableUsers.filter((user) => smsTargetIds.includes(user.userId));
|
||||
|
||||
const columns: DataTableColumn<PerformanceFull>[] = [
|
||||
{accessorKey: "performanceId", header: PERFORMANCE_FIELD_LABELS.performanceId, size: 90},
|
||||
{accessorKey: "performanceId", header: PERFORMANCE_FIELD_LABELS.performanceId, size: 90, sortingFn: "text"},
|
||||
{
|
||||
accessorKey: "performanceName",
|
||||
header: PERFORMANCE_FIELD_LABELS.performanceName,
|
||||
@@ -109,7 +116,7 @@ const AssignPage = () => {
|
||||
),
|
||||
enableSorting: false
|
||||
},
|
||||
{id: "applyCount", header: "신청자 수", size: 100, accessorFn: (row) => applyCountMap.get(row.performanceId) ?? 0},
|
||||
{id: "applyCount", header: "신청자 수", size: 100, accessorFn: (row) => applyCountMap.get(getApplyPerformanceId(row.performanceId)) ?? 0},
|
||||
{id: "monitoringAssignCount", header: "모니터링 확정자 수", size: 140, accessorFn: (row) => countConfirmedAssigns(row, REVIEW_TYPE.MONITORING)},
|
||||
{id: "consultingAssignCount", header: "컨설팅 확정자 수", size: 140, accessorFn: (row) => countConfirmedAssigns(row, REVIEW_TYPE.CONSULTING)},
|
||||
];
|
||||
@@ -269,7 +276,7 @@ const AssignPage = () => {
|
||||
<AssignCalendarDialog
|
||||
open={calendarOpen}
|
||||
onOpenChange={(open) => open ? showDialog("assignCalendarDialog") : hideDialog("assignCalendarDialog")}
|
||||
performances={data}
|
||||
performances={assignableData}
|
||||
applyCountMap={applyCountMap}
|
||||
reviewSlots={reviewSlots}
|
||||
reviewers={users}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import {useState} from "react";
|
||||
import {Download, Upload} from "lucide-react";
|
||||
import {CalendarDays, Download, Upload} from "lucide-react";
|
||||
import {Button} from "@/components/ui/button";
|
||||
import {PagePanel} from "@/components/kmusical/PagePanel";
|
||||
import {PerformanceFilterBar} from "@/components/kmusical/PerformanceFilterBar";
|
||||
import {StatusPill} from "@/components/kmusical/StatusPill";
|
||||
import {ExcelRegisterDialog} from "@/components/dialog/ExcelRegisterDialog";
|
||||
import {PerformanceDetailDialog} from "@/components/dialog/PerformanceDetailDialog";
|
||||
import {AssignCalendarDialog} from "@/components/dialog/AssignCalendarDialog";
|
||||
import {DataTable} from "@/components/data-table/DataTable";
|
||||
import type {DataTableColumn} from "@/components/data-table/DataTable.type";
|
||||
import {useCodesQuery} from "@/query/code";
|
||||
@@ -21,11 +22,22 @@ import {
|
||||
useUploadPerformanceExcelMutation,
|
||||
} from "@/query/performance";
|
||||
import {useDownloadReviewOriginalMutation, useReviewSlotsQuery} from "@/query/review";
|
||||
import {filterPerformance, getCodeLabel, isInternalRole, isResearcherRole, type PerformanceFilterState} from "@/lib/kmusical/view";
|
||||
import {useMonitoringApplyUsersCountQuery} from "@/query/assign";
|
||||
import {useUserListQuery} from "@/query/user";
|
||||
import {MONITORING_USER_ROLE} from "@/config/kmusical.config";
|
||||
import {
|
||||
excludeMastersWithSub,
|
||||
filterPerformance,
|
||||
getCodeLabel,
|
||||
isFoundationRole,
|
||||
isInternalRole,
|
||||
isResearcherRole,
|
||||
type PerformanceFilterState,
|
||||
} from "@/lib/kmusical/view";
|
||||
import {getMonitoringStatusDisplay, isReviewComplete} from "@/lib/kmusical/performance-status";
|
||||
import {downloadBlob, downloadExcelBuffer} from "@/lib/kmusical/file";
|
||||
import {PERFORMANCE_FIELD_LABELS} from "@/lib/kmusical/field-labels";
|
||||
import type {PerformanceFull} from "@/types/kmusical";
|
||||
import {REVIEW_TYPE, type PerformanceFull, type PerformanceReviewSlot} from "@/types/kmusical";
|
||||
import {useAuth} from "@/hooks/useAuth";
|
||||
import {useDialog} from "@/hooks/useDialog";
|
||||
import ExcelDownloadButton from "@/components/kmusical/ExcelDownloadButton";
|
||||
@@ -53,13 +65,22 @@ const PerformancePage = () => {
|
||||
const originalMutation = useDownloadReviewOriginalMutation();
|
||||
const detailOpen = isDialogOpen("performanceDetailDialog");
|
||||
const registerOpen = isDialogOpen("performanceExcelRegisterDialog");
|
||||
const calendarOpen = isDialogOpen("assignCalendarDialog");
|
||||
const {data: detail, refetch: refetchDetail} = usePerformanceQuery(detailOpen ? selectedId : "");
|
||||
const canEdit = isInternalRole(auth.user?.userRole);
|
||||
const canDelete = isResearcherRole(auth.user?.userRole);
|
||||
const isFoundation = isFoundationRole(auth.user?.userRole);
|
||||
const isInternal = isInternalRole(auth.user?.userRole);
|
||||
const isResearcher = isResearcherRole(auth.user?.userRole);
|
||||
const canEdit = isInternal || isFoundation;
|
||||
|
||||
const {data: applyCounts = []} = useMonitoringApplyUsersCountQuery(canEdit && calendarOpen);
|
||||
const {data: reviewers = []} = useUserListQuery(MONITORING_USER_ROLE, canEdit && calendarOpen);
|
||||
const applyCountMap = new Map(applyCounts.map((item) => [item.performanceId, item.applyCnt]));
|
||||
|
||||
const visibleData = isMonitoring
|
||||
? data.filter((item) => Boolean(auth.user?.userId && item.performanceAssignList.some((assign) => assign.assignUser === auth.user?.userId)))
|
||||
: data;
|
||||
: isFoundation
|
||||
? excludeMastersWithSub(data)
|
||||
: data;
|
||||
const filteredData = visibleData.filter((item) => filterPerformance(item, filters));
|
||||
|
||||
const downloadReview = async (performance: PerformanceFull, reviewSlot: number) => {
|
||||
@@ -69,9 +90,30 @@ const PerformancePage = () => {
|
||||
downloadBlob(buffer, review.uploadFileName);
|
||||
};
|
||||
|
||||
const renderReviewSlotCell = (performance: PerformanceFull, slot: PerformanceReviewSlot) => {
|
||||
const assign = performance.performanceAssignList.find((item) => item.reviewSlot === slot.reviewSlot);
|
||||
const review = Object.values(performance.performanceReviewMap ?? {}).find((item) => item.reviewSlot === slot.reviewSlot);
|
||||
const display = getMonitoringStatusDisplay(getCodeLabel(codes, "review_status", review?.reviewStatus), {
|
||||
reviewSlot: slot.reviewSlot,
|
||||
reviewType: slot.reviewType,
|
||||
assign,
|
||||
review,
|
||||
});
|
||||
const reviewTypeLabel = slot.reviewType === REVIEW_TYPE.CONSULTING ? "컨설팅" : "모니터링";
|
||||
return (
|
||||
<StatusPill
|
||||
variant={display.variant}
|
||||
onClick={isReviewComplete(review) ? () => downloadReview(performance, slot.reviewSlot) : undefined}
|
||||
tooltip={<span>{isMonitoring ? reviewTypeLabel : `담당자: ${assign?.assignUser || "-"}`}</span>}
|
||||
>
|
||||
{display.label}
|
||||
</StatusPill>
|
||||
);
|
||||
};
|
||||
|
||||
const columns: DataTableColumn<PerformanceFull>[] = [
|
||||
{accessorKey: "performanceNo", header: PERFORMANCE_FIELD_LABELS.performanceNo, size: 60},
|
||||
{accessorKey: "performanceId", header: PERFORMANCE_FIELD_LABELS.performanceId, size: 90},
|
||||
{accessorKey: "performanceId", header: PERFORMANCE_FIELD_LABELS.performanceId, size: 90, sortingFn: "text"},
|
||||
{id: "businessType", header: PERFORMANCE_FIELD_LABELS.businessType, size: 100, cell: ({row}) => getCodeLabel(codes, "business_type", row.original.businessType)},
|
||||
{id: "area", header: PERFORMANCE_FIELD_LABELS.performanceArea, size: 80, cell: ({row}) => getCodeLabel(codes, "area", row.original.performanceArea)},
|
||||
{accessorKey: "artistName", header: PERFORMANCE_FIELD_LABELS.artistName, size: 160},
|
||||
@@ -92,31 +134,26 @@ const PerformancePage = () => {
|
||||
accessorFn: (row) => row.performanceMonitoringSchedule.monitoringTimeInfo ?? 0,
|
||||
cell: ({row}) => !row.original.performanceMonitoringSchedule.monitoringTimeInfo? "미정":`${row.original.performanceMonitoringSchedule.monitoringTimeInfo}`
|
||||
},
|
||||
...reviewSlots.map<DataTableColumn<PerformanceFull>>((slot) => ({
|
||||
id: `review-${slot.reviewSlot}`,
|
||||
header: slot.reviewLabel,
|
||||
size: 110,
|
||||
enableSorting: false,
|
||||
cell: ({row}) => {
|
||||
const assign = row.original.performanceAssignList.find((item) => item.reviewSlot === slot.reviewSlot);
|
||||
const review = Object.values(row.original.performanceReviewMap ?? {}).find((item) => item.reviewSlot === slot.reviewSlot);
|
||||
const display = getMonitoringStatusDisplay(getCodeLabel(codes, "review_status", review?.reviewStatus), {
|
||||
reviewSlot: slot.reviewSlot,
|
||||
reviewType: slot.reviewType,
|
||||
assign,
|
||||
review,
|
||||
});
|
||||
return (
|
||||
<StatusPill
|
||||
variant={display.variant}
|
||||
onClick={isReviewComplete(review) ? () => downloadReview(row.original, slot.reviewSlot) : undefined}
|
||||
tooltip={<span>담당자: {assign?.assignUser || "-"}</span>}
|
||||
>
|
||||
{display.label}
|
||||
</StatusPill>
|
||||
);
|
||||
},
|
||||
})),
|
||||
// 모니터링 계정은 한 사업에 한 번만 배정되므로 본인이 배정된 슬롯 하나만 보여준다.
|
||||
...(isMonitoring
|
||||
? [{
|
||||
id: "review-assigned",
|
||||
header: "모니터링/컨설팅",
|
||||
size: 110,
|
||||
enableSorting: false,
|
||||
cell: ({row}) => {
|
||||
const assign = row.original.performanceAssignList.find((item) => item.assignUser === auth.user?.userId);
|
||||
const slot = reviewSlots.find((item) => item.reviewSlot === assign?.reviewSlot);
|
||||
return slot ? renderReviewSlotCell(row.original, slot) : "-";
|
||||
},
|
||||
} satisfies DataTableColumn<PerformanceFull>]
|
||||
: reviewSlots.map<DataTableColumn<PerformanceFull>>((slot) => ({
|
||||
id: `review-${slot.reviewSlot}`,
|
||||
header: slot.reviewLabel,
|
||||
size: 110,
|
||||
enableSorting: false,
|
||||
cell: ({row}) => renderReviewSlotCell(row.original, slot),
|
||||
}))),
|
||||
];
|
||||
|
||||
const downloadTemplate = async () => {
|
||||
@@ -148,7 +185,12 @@ const PerformancePage = () => {
|
||||
|
||||
<PagePanel className="overflow-x-auto">
|
||||
<div className="mb-3 flex flex-wrap justify-end gap-2">
|
||||
{canEdit && <Button type="button" onClick={() => showDialog("performanceExcelRegisterDialog")}><Upload className="h-4 w-4" />공연 등록</Button>}
|
||||
{canEdit && (
|
||||
<Button type="button" variant="outline" onClick={() => showDialog("assignCalendarDialog")}>
|
||||
<CalendarDays className="h-4 w-4" />배정 캘린더
|
||||
</Button>
|
||||
)}
|
||||
{isInternal && <Button type="button" onClick={() => showDialog("performanceExcelRegisterDialog")}><Upload className="h-4 w-4" />공연 등록</Button>}
|
||||
<ExcelDownloadButton requestExcelExport={downloadPerformances} />
|
||||
</div>
|
||||
<DataTable
|
||||
@@ -173,7 +215,7 @@ const PerformancePage = () => {
|
||||
codes={codes}
|
||||
reviewSlots={reviewSlots}
|
||||
canEdit={canEdit}
|
||||
canDelete={canDelete}
|
||||
canDelete={isResearcher}
|
||||
onSave={async (performance) => {
|
||||
await updateMutation.mutateAsync(performance);
|
||||
await Promise.all([refetchList(), refetchDetail()]);
|
||||
@@ -199,6 +241,17 @@ const PerformancePage = () => {
|
||||
}}
|
||||
isUploading={uploadMutation.isPending}
|
||||
/>
|
||||
|
||||
{canEdit && (
|
||||
<AssignCalendarDialog
|
||||
open={calendarOpen}
|
||||
onOpenChange={(open) => open ? showDialog("assignCalendarDialog") : hideDialog("assignCalendarDialog")}
|
||||
performances={visibleData}
|
||||
applyCountMap={applyCountMap}
|
||||
reviewSlots={reviewSlots}
|
||||
reviewers={reviewers}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ import {Tooltip, TooltipContent, TooltipProvider, TooltipTrigger} from "@/compon
|
||||
import {KriMultiSelect} from "@/components/common/KriAutoComplete";
|
||||
import {StatusPill} from "@/components/kmusical/StatusPill";
|
||||
import {useAllMonitoringApplyUsersQuery} from "@/query/assign";
|
||||
import {getDetailValue, includesText} from "@/lib/kmusical/view";
|
||||
import {getApplyPerformanceId, getDetailValue, includesText} from "@/lib/kmusical/view";
|
||||
import {
|
||||
buildMonthGrid,
|
||||
chunkIntoWeeks,
|
||||
@@ -151,10 +151,12 @@ export function AssignCalendarDialog({
|
||||
list.push(applyUser);
|
||||
applyUsersByPerformanceId.set(applyUser.performanceId, list);
|
||||
}
|
||||
const detailApplyUsers = detailPerformance ? applyUsersByPerformanceId.get(detailPerformance.performanceId) ?? [] : [];
|
||||
const detailApplyUsers = detailPerformance ? applyUsersByPerformanceId.get(getApplyPerformanceId(detailPerformance.performanceId)) ?? [] : [];
|
||||
|
||||
const orderedPerformanceIds = performances.map((performance) => performance.performanceId);
|
||||
const searchedPerformances = performances.filter((performance) => includesText(performance.performanceName, performanceSearch));
|
||||
const searchedPerformances = performances
|
||||
.filter((performance) => includesText(performance.performanceName, performanceSearch))
|
||||
.sort((a, b) => a.performanceId.localeCompare(b.performanceId, "ko"));
|
||||
const allSelected = performances.length > 0 && selectedPerformanceIds.size === performances.length;
|
||||
|
||||
const togglePerformance = (performanceId: string) => {
|
||||
@@ -278,7 +280,7 @@ export function AssignCalendarDialog({
|
||||
colorClassName={PERFORMANCE_BADGE_COLOR_CLASSES[getPerformanceColorSlot(performance.performanceId, orderedPerformanceIds)]}
|
||||
reviewSlots={reviewSlots}
|
||||
userById={userById}
|
||||
applyUsers={applyUsersByPerformanceId.get(performance.performanceId) ?? []}
|
||||
applyUsers={applyUsersByPerformanceId.get(getApplyPerformanceId(performance.performanceId)) ?? []}
|
||||
onClick={() => setSelectedDetailPerformanceId(performance.performanceId)}
|
||||
/>
|
||||
))}
|
||||
@@ -301,7 +303,7 @@ export function AssignCalendarDialog({
|
||||
colorClassName={PERFORMANCE_BADGE_COLOR_CLASSES[getPerformanceColorSlot(performance.performanceId, orderedPerformanceIds)]}
|
||||
reviewSlots={reviewSlots}
|
||||
userById={userById}
|
||||
applyUsers={applyUsersByPerformanceId.get(performance.performanceId) ?? []}
|
||||
applyUsers={applyUsersByPerformanceId.get(getApplyPerformanceId(performance.performanceId)) ?? []}
|
||||
onClick={() => {
|
||||
setExpandedDayKey(null);
|
||||
setSelectedDetailPerformanceId(performance.performanceId);
|
||||
|
||||
@@ -342,7 +342,9 @@ export function PerformanceDetailDialog({
|
||||
<DetailRow label={PERFORMANCE_FIELD_LABELS.ticketReservationStatus}>
|
||||
{isEditing ? <FilterSelect value={String(draft.ticketReservationStatus)} onChange={(value) => updateDraft("ticketReservationStatus", Number(value))} options={codes.ticket_reservation_status ?? []} placeholder="티켓 예약" /> : getCodeLabel(codes, "ticket_reservation_status", draft.ticketReservationStatus)}
|
||||
</DetailRow>
|
||||
<DetailRow label={PERFORMANCE_FIELD_LABELS.ticketReservationMemo}>{isEditing ? <Input value={draft.ticketReservationMemo} onChange={(event) => updateDraft("ticketReservationMemo", event.target.value)} /> : draft.ticketReservationMemo}</DetailRow>
|
||||
{!isMonitoring && (
|
||||
<DetailRow label={PERFORMANCE_FIELD_LABELS.ticketReservationMemo}>{isEditing ? <Input value={draft.ticketReservationMemo} onChange={(event) => updateDraft("ticketReservationMemo", event.target.value)} /> : draft.ticketReservationMemo}</DetailRow>
|
||||
)}
|
||||
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringDate}>{isEditing ? <Input type="date" value={draft.performanceMonitoringSchedule.monitoringDate ?? ""} onChange={(event) => updateSchedule("monitoringDate", event.target.value)} /> : draft.performanceMonitoringSchedule.monitoringDate}</DetailRow>
|
||||
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringTimeInfo}>{isEditing ? <Input value={draft.performanceMonitoringSchedule.monitoringTimeInfo ?? ""} onChange={(event) => updateSchedule("monitoringTimeInfo", event.target.value)} /> : draft.performanceMonitoringSchedule.monitoringTimeInfo}</DetailRow>
|
||||
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringAddress}>{isEditing ? <Input value={draft.performanceMonitoringSchedule.monitoringAddress ?? ""} onChange={(event) => updateSchedule("monitoringAddress", event.target.value)} /> : draft.performanceMonitoringSchedule.monitoringAddress}</DetailRow>
|
||||
@@ -367,26 +369,29 @@ export function PerformanceDetailDialog({
|
||||
/>
|
||||
))}
|
||||
</section>
|
||||
{!isMonitoring && (
|
||||
<section className="rounded-md border">
|
||||
<div className="border-b bg-muted px-3 py-2 font-semibold">관계자 정보</div>
|
||||
<div className="overflow-auto">
|
||||
<table className="kmf-table min-w-[620px]">
|
||||
<thead><tr><th>유형</th><th>이름</th><th>연락처1</th><th>연락처2</th><th>이메일</th></tr></thead>
|
||||
<tbody>
|
||||
{draft.performanceStaff.map((staff, index) => (
|
||||
<tr key={staff.id}>
|
||||
<td>{getCodeLabel(codes, "staff_type", staff.staffType)}</td>
|
||||
<td>{isEditing ? <Input value={staff.staffName} onChange={(event) => updateStaff(index, "staffName", event.target.value)} /> : staff.staffName}</td>
|
||||
<td>{isEditing ? <Input value={staff.staffTel1} onChange={(event) => updateStaff(index, "staffTel1", event.target.value)} /> : staff.staffTel1}</td>
|
||||
<td>{isEditing ? <Input value={staff.staffTel2} onChange={(event) => updateStaff(index, "staffTel2", event.target.value)} /> : staff.staffTel2}</td>
|
||||
<td>{isEditing ? <Input value={staff.staffEmail} onChange={(event) => updateStaff(index, "staffEmail", event.target.value)} /> : staff.staffEmail}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
<section className="rounded-md border">
|
||||
<div className="border-b bg-muted px-3 py-2 font-semibold">관계자 정보</div>
|
||||
<div className="overflow-auto">
|
||||
<table className="kmf-table min-w-[620px]">
|
||||
<thead><tr><th>유형</th><th>이름</th><th>연락처1</th><th>연락처2</th><th>이메일</th></tr></thead>
|
||||
<tbody>
|
||||
{draft.performanceStaff.map((staff, index) => (
|
||||
<tr key={staff.id}>
|
||||
<td>{getCodeLabel(codes, "staff_type", staff.staffType)}</td>
|
||||
<td>{isEditing ? <Input value={staff.staffName} onChange={(event) => updateStaff(index, "staffName", event.target.value)} /> : staff.staffName}</td>
|
||||
<td>{isEditing ? <Input value={staff.staffTel1} onChange={(event) => updateStaff(index, "staffTel1", event.target.value)} /> : staff.staffTel1}</td>
|
||||
<td>{isEditing ? <Input value={staff.staffTel2} onChange={(event) => updateStaff(index, "staffTel2", event.target.value)} /> : staff.staffTel2}</td>
|
||||
<td>{isEditing ? <Input value={staff.staffEmail} onChange={(event) => updateStaff(index, "staffEmail", event.target.value)} /> : staff.staffEmail}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section className="rounded-md border">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {parseLocalDateString, toLocalDateString} from "@/lib/kmusical/date";
|
||||
import {getApplyPerformanceId} from "@/lib/kmusical/view";
|
||||
import type {PerformanceFull, PerformanceReviewSlot} from "@/types/kmusical";
|
||||
|
||||
export const WEEKDAY_LABELS = ["일", "월", "화", "수", "목", "금", "토"] as const;
|
||||
@@ -99,7 +100,7 @@ export const getPerformanceBadgeInfo = (
|
||||
applyCountMap: Map<string, number>,
|
||||
reviewSlots: PerformanceReviewSlot[]
|
||||
): PerformanceBadgeInfo => {
|
||||
const applyCount = applyCountMap.get(performance.performanceId) ?? 0;
|
||||
const applyCount = applyCountMap.get(getApplyPerformanceId(performance.performanceId)) ?? 0;
|
||||
const assignCount = performance.performanceAssignList.length;
|
||||
const requiredAssignCount = reviewSlots.length;
|
||||
const isMatchingComplete = requiredAssignCount > 0 && assignCount >= requiredAssignCount;
|
||||
|
||||
@@ -49,6 +49,23 @@ export const includesText = (value: unknown, keyword: string) => {
|
||||
return String(value ?? "").toLowerCase().includes(keyword.toLowerCase());
|
||||
};
|
||||
|
||||
// 4자리 연번은 sub 공연이며 앞 3자리가 부모 공연 연번이다. 신청은 부모 공연 기준으로 받는다.
|
||||
export const isSubPerformanceId = (performanceId: string) => /^\d{4}$/.test(performanceId);
|
||||
|
||||
export const getApplyPerformanceId = (performanceId: string) =>
|
||||
isSubPerformanceId(performanceId) ? performanceId.slice(0, 3) : performanceId;
|
||||
|
||||
// sub 공연이 있는 마스터 공연을 목록에서 제외한다.
|
||||
export const excludeMastersWithSub = <T extends {performanceId: string}>(performances: T[]): T[] => {
|
||||
const masterIdsWithSub = new Set(
|
||||
performances
|
||||
.map((performance) => performance.performanceId)
|
||||
.filter(isSubPerformanceId)
|
||||
.map(getApplyPerformanceId)
|
||||
);
|
||||
return performances.filter((performance) => !masterIdsWithSub.has(performance.performanceId));
|
||||
};
|
||||
|
||||
export type PerformanceFilterState = {
|
||||
businessType: string[];
|
||||
area: string[];
|
||||
|
||||
@@ -11,9 +11,10 @@ import type {
|
||||
PerformanceAssignRequest,
|
||||
} from "@/types/kmusical";
|
||||
|
||||
export const useMonitoringApplyUsersCountQuery = () => useQuery({
|
||||
export const useMonitoringApplyUsersCountQuery = (enabled = true) => useQuery({
|
||||
queryKey: queryKeys.assign.monitoringApplyUsersCount,
|
||||
queryFn: () => nextApi.get<PerformanceApplyCount[]>("/assign/monitoring/apply-users/count"),
|
||||
enabled,
|
||||
});
|
||||
|
||||
export const useMonitoringApplyUsersQuery = (performanceId: string, options?: {ignoreGlobalLoading?: boolean}) => useQuery({
|
||||
|
||||
@@ -6,9 +6,10 @@ import { nextApi } from "@/lib/http-client";
|
||||
import { queryKeys } from "@/query/key/keys";
|
||||
import type { UserFull } from "@/types/kmusical";
|
||||
|
||||
export const useUserListQuery = (userRole: number) => useQuery({
|
||||
export const useUserListQuery = (userRole: number, enabled = true) => useQuery({
|
||||
queryKey: queryKeys.user.list(userRole),
|
||||
queryFn: () => nextApi.get<UserFull[]>(`/user/list/${userRole}`),
|
||||
enabled,
|
||||
});
|
||||
|
||||
export const useUserQuery = (userId: string) => useQuery({
|
||||
|
||||
Reference in New Issue
Block a user