Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for user-ticket requirements on purchase order creation #324

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

fforres
Copy link
Member

@fforres fforres commented Dec 2, 2024

No description provided.

Copy link

github-actions bot commented Dec 2, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 86.37% 20139 / 23316
🔵 Statements 86.37% 20139 / 23316
🔵 Functions 79.87% 520 / 651
🔵 Branches 80.86% 1581 / 1955
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/datasources/db/schema.ts 100% 100% 100% 100%
src/datasources/db/ticketRequirements.ts 100% 100% 100% 100%
src/generated/types.ts 100% 100% 100% 100%
src/schema/ticket/helpers.ts 96.34% 83.33% 100% 96.34% 148-149, 152-157
src/schema/ticket/types.ts 72.16% 88.88% 81.25% 72.16% 80-121, 159-160, 182-191
src/schema/ticketAddons/helpers/createUpdateAddonMutationHelpers.ts 86.28% 89.06% 87.5% 86.28% 53-58, 134-139, 162-186, 247-278, 429-434, 456-457, 496-497
src/schema/userTickets/mutations/claimUserTicket/index.ts 92.22% 81.91% 100% 92.22% 125-126, 235-240, 246-251, 254-259, 356-361, 408-413, 435-440, 653, 677-682, 711-716, 728-733
src/tests/fixtures/index.ts 98.52% 81.38% 95.55% 98.52% 204-205, 222-223, 639, 813-817, 820, 824, 921-922
Generated in workflow #1370 for commit deade5d by the Vitest Coverage Report Action

@fforres fforres force-pushed the fforres/check_for_requirements branch from dc9bcfc to c20f37c Compare December 2, 2024 15:09
where: (ut, { and, eq, inArray }) =>
and(
eq(ut.userId, userId),
inArray(ut.approvalStatus, [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creo que tenemos una variable para esto porque se volvió recurrente en la App

ACCESSIBLE_USER_TICKET_APPROVAL_STATUSES

expect,
beforeEach,
expectTypeOf,
} from "vitest";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cuidado este warning

@@ -0,0 +1,23 @@
CREATE TABLE IF NOT EXISTS "ticket_requirements" (
"ticket_id" uuid NOT NULL,
"required_ticket_id" uuid NOT NULL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SI tenemos requirement_type creo que este ID es complicado! Al menos que tengamos un campo adicional para required_category_id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants