diff --git a/MINT.postman_collection.json b/MINT.postman_collection.json index 23cdb233cc..3d9a69c7e2 100644 --- a/MINT.postman_collection.json +++ b/MINT.postman_collection.json @@ -1,9 +1,9 @@ { "info": { - "_postman_id": "f8c48fb4-c317-409d-92c7-694ee6bfbd69", + "_postman_id": "040f04e1-e82a-4a0b-88f7-823fee84baa4", "name": "MINT", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "20435042" + "_exporter_id": "20320964" }, "item": [ { @@ -1672,6 +1672,38 @@ }, "response": [] }, + { + "name": "PossibleOperationalSoultionsGetAllWithContacts", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "graphql", + "graphql": { + "query": "query PossibleOperationalSolution{\n \n possibleOperationalSolutions{\n id\n name\n key\n treatAsOther \n pointsOfContact{\n id\n possibleOperationalSolutionID\n name\n email\n isTeam\n role\n } \n }\n}\n", + "variables": "" + } + }, + "url": { + "raw": "{{url}}", + "host": [ + "{{url}}" + ] + } + }, + "response": [] + }, { "name": "CreatePlanDocumentSolutionLinks", "request": { diff --git a/codegen.ts b/codegen.ts index 751472ebd1..2107c589b8 100644 --- a/codegen.ts +++ b/codegen.ts @@ -17,6 +17,7 @@ const config: CodegenConfig = { UUID: 'UUID', Upload: 'Upload' }, + nonOptionalTypename: true, namingConvention: { enumValues: 'change-case-all#upperCase#snakeCase' } diff --git a/migrations/V107__Possible_Solution_Contact.sql b/migrations/V107__Possible_Solution_Contact.sql new file mode 100644 index 0000000000..165227059b --- /dev/null +++ b/migrations/V107__Possible_Solution_Contact.sql @@ -0,0 +1,21 @@ +CREATE TABLE possible_operational_solution_contact ( + id UUID PRIMARY KEY NOT NULL, + possible_operational_solution_id int NOT NULL REFERENCES possible_operational_solution(id), + name zero_string NOT NULL, + email zero_string NOT NULL, + is_team BOOLEAN NOT NULL DEFAULT FALSE, + role zero_string NULL, + + + --META DATA + created_by UUID NOT NULL REFERENCES user_account(id), + created_dts TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, + modified_by UUID REFERENCES user_account(id), + modified_dts TIMESTAMP WITH TIME ZONE +); + +ALTER TABLE possible_operational_solution_contact +ADD CONSTRAINT role_required_when_is_team_false CHECK ( (is_team AND role IS NULL) OR (NOT is_team AND role IS NOT NULL)); + +ALTER TYPE operational_solution_key ADD VALUE 'ISP'; --acronym +ALTER TYPE operational_solution_key ADD VALUE 'MIDS'; --acronym diff --git a/migrations/V108__Possible_Solution_Contact_Entries.sql b/migrations/V108__Possible_Solution_Contact_Entries.sql new file mode 100644 index 0000000000..54a8382108 --- /dev/null +++ b/migrations/V108__Possible_Solution_Contact_Entries.sql @@ -0,0 +1,109 @@ + +INSERT INTO possible_operational_solution("id", "sol_name", "sol_key", "created_by") VALUES +(38, 'Innovation Support Platform', 'ISP', '00000001-0001-0001-0001-000000000001'), +(39, 'Measure and Instrument Development and Support', 'MIDS', '00000001-0001-0001-0001-000000000001'); + + + +WITH pocs(SolutionName, SolutionKey, Name, Email, Role, IsTeam) AS ( + VALUES + +('4innovation', 'INNOVATION', '4i/ACO-OS Team', 'ACO-OIT@cms.hhs.gov', NULL, TRUE), +('4innovation', 'INNOVATION', 'Aparna Vyas', 'aparna.vyas@cms.hhs.gov', 'Project Lead', FALSE), +('4innovation', 'INNOVATION', 'Ashley Corbin', 'ashley.corbin@cms.hhs.gov', 'Subject Matter Expert', FALSE), +('4innovation', 'INNOVATION', 'Nora Fleming', 'nora.fleming@cms.hhs.gov', 'Subject Matter Expert', FALSE), +('Accountable Care Organization - Operational System', 'ACO_OS', '4i/ACO-OS Team', 'ACO-OIT@cms.hhs.gov', NULL, TRUE), +('Accountable Care Organization - Operational System', 'ACO_OS', 'Aparna Vyas', 'aparna.vyas@cms.hhs.gov', 'Project Lead', FALSE), +('Accountable Care Organization - Operational System', 'ACO_OS', 'Ashley Corbin', 'ashley.corbin@cms.hhs.gov', 'Subject Matter Expert', FALSE), +('Accountable Care Organization - Operational System', 'ACO_OS', 'Nora Fleming', 'nora.fleming@cms.hhs.gov', 'Subject Matter Expert', FALSE), +('Automated Plan Payment System', 'APPS', 'Aliza Kim', 'aliza.kim@cms.hhs.gov', 'Project Lead', FALSE), +('Automated Plan Payment System', 'APPS', 'Edgar Howard', 'edgar.howard@cms.hhs.gov', 'Director, Division of Payment Operations', FALSE), +('Beneficiary Claims Data API', 'BCDA', 'BCDA Team', 'bcapi@cms.hhs.gov', NULL, TRUE), +('Beneficiary Claims Data API', 'BCDA', 'Nicole Pham', 'xuanphien.pham@cms.hhs.gov', 'Product Manager', FALSE), +('Centralized Data Exchange', 'CDX', 'Yolanda Villanova', 'yolanda.villanova@cms.hhs.gov', 'Product Owner', FALSE), +('Centralized Data Exchange', 'CDX', 'Hung Van', 'hung.van@cms.hhs.gov', 'Technical Lead', FALSE), +('Chronic Conditions Warehouse', 'CCW', 'Velda McGhee', 'velda.mcghee@cms.hhs.gov', 'CMMI Government Task Lead', FALSE), +('CMS Box', 'CMS_BOX', 'MINT Team', 'MINTTeam@cms.hhs.gov', NULL, TRUE), +('CMS Qualtrics', 'CMS_QUALTRICS', 'MINT Team', 'MINTTeam@cms.hhs.gov', NULL, TRUE), +('Consolidated Business Operations Support Center', 'CBOSC', 'Richard Speights', 'richard.speights@cms.hhs.gov', 'Contracting Officer Representative', FALSE), +('Consolidated Business Operations Support Center', 'CBOSC', 'Don Rocker', 'don.rocker1@cms.hhs.gov', 'Operations and Management Lead ', FALSE), +('CPI Vetting', 'CPI_VETTING', 'MINT Team', 'MINTTeam@cms.hhs.gov', NULL, TRUE), +('Electronic File Transfer', 'EFT', 'MINT Team', 'MINTTeam@cms.hhs.gov', NULL, TRUE), +('Expanded Data Feedback Reporting', 'EDFR', 'Zach Nall', 'r.nall@cms.hhs.gov', 'Product Owner', FALSE), +('GovDelivery', 'GOVDELIVERY', 'Andrew Rushton', 'andrew.rushton@cms.hhs.gov', 'Administrator', FALSE), +('GovDelivery', 'GOVDELIVERY', 'Alison Rigby', 'alison.rigby@cms.hhs.gov', 'Administrator', FALSE), +('GrantSolutions', 'GS', 'Mary Greene', 'mary.greene@cms.hhs.gov', 'Director, Division of Grants Management', FALSE), +('GrantSolutions', 'GS', 'Michelle Brown', 'michelle.brown@cms.hhs.gov', 'Deputy Director, Division of Grants Management', FALSE), +('Healthcare Integrated General Ledger Accounting System', 'HIGLAS', 'Donna Schmidt', 'donna.schmidt@cms.hhs.gov', 'Director, Division of System Support, Operation and Security (DSSOS)', FALSE), +('Health Data Reporting', 'HDR', 'Hung Van', 'hung.van@cms.hhs.gov', 'Technical Lead', FALSE), +('Health Data Reporting', 'HDR', 'Curtis Naumann', 'curtis.naumann@cms.hhs.gov', 'Product Owner', FALSE), +('Health Plan Management System', 'HPMS', 'MINT Team', 'MINTTeam@cms.hhs.gov', NULL, TRUE), +('Innovation Payment Contractor', 'IPC', 'Ron Topper', 'ronald.topper@cms.hhs.gov', 'Director, Division of Budget Operations & Management (DBOM)', FALSE), +('Innovation Payment Contractor', 'IPC', 'Sue Nonemaker', 'sue.nonemaker@cms.hhs.gov', 'Project Lead', FALSE), +('Innovation Payment Contractor', 'IPC', 'Alyssa Larson', 'alyssa.larson@cms.hhs.gov', 'Subject Matter Expert', FALSE), +('Innovation Payment Contractor', 'IPC', 'Philip Tennant', 'philip.tennant@cms.hhs.gov', 'Subject Matter Expert', FALSE), +('Innovation Support Platform', 'ISP', 'Hung Van', 'hung.van@cms.hhs.gov', 'Technical Lead', FALSE), +('Innovation Support Platform', 'ISP', 'Joe Pusateri', 'joe.pusateri@cms.hhs.gov', 'Contracting Officer Representative', FALSE), +('Integrated Data Repository', 'IDR', 'Jim Brogan', 'jim.brogan@cms.hhs.gov', 'Deputy Director, Division of Enterprise Information Management Services', FALSE), +('Integrated Data Repository', 'IDR', 'Murari Selvakesavan', 'murari.selvakesavan@cms.hhs.gov', 'System Owner', FALSE), +('Learning and Diffusion Group', 'LDG', 'Andrew Philip', 'andrew.philip@cms.hhs.gov', 'Director, Division of Model Learning Systems (DMLS)', FALSE), +('Learning and Diffusion Group', 'LDG', 'Taiwanna Messam Lucienne', 'taiwanna.lucienne@cms.hhs.gov', 'Deputy Director, Division of Model Learning Systems (DMLS)', FALSE), +('Learning and Diffusion Group', 'LDG', 'Alexis Malfesi', 'alexis.malfesi@cms.hhs.gov', 'Beneficiary Listening Session Point of Contact', FALSE), +('Learning and Diffusion Group', 'LDG', 'Erin Carrillo', 'erin.carrillo1@cms.hhs.gov', 'Beneficiary Listening Session Point of Contact', FALSE), +('Legal Vertical', 'LV', 'Megan Hyde', 'megan.hyde@cms.hhs.gov', 'Co-team Lead', FALSE), +('Legal Vertical', 'LV', 'Erin Hagenbrok', 'erin.hagenbrok1@cms.hhs.gov', 'Co-team Lead', FALSE), +('Legal Vertical', 'LV', 'Ann Vrabel', 'ann.vrabel1@cms.hhs.gov', 'Division Director', FALSE), +('Legal Vertical', 'LV', 'Melanie Dang', 'melanie.dang1@cms.hhs.gov', 'Deputy Division Director', FALSE), +('Master Data Management', 'MDM', 'Celia Shaunessy', 'celia.shaunessy@cms.hhs.gov', 'CMMI/BSG Point of Contact', FALSE), +('Master Data Management', 'MDM', 'Felicia Addai', 'felicia.addai2@cms.hhs.gov', 'CMMI/BSG Project Support', FALSE), +('Master Data Management', 'MDM', 'Miyani Treva', 'miyani.treva@cms.hhs.gov', 'Overlaps Operations Support', FALSE), +('Master Data Management', 'MDM', 'Sameera Gudipati', 'sameera.gudipati1@cms.hhs.gov', 'OIT Point of Contact', FALSE), +('Master Data Management', 'MDM', 'Glenn Eyler', 'glenn.eyler@cms.hhs.gov', 'OIT Government Task Lead', FALSE), +('Measure and Instrument Development and Support', 'MIDS', 'Dustin Allison', 'dustin.allison@cms.hhs.gov', 'Quality Vertical Program Analyst', FALSE), +('Measure and Instrument Development and Support', 'MIDS', 'Teresa Winder-Wells', 'teresa.winder-wells@cms.hhs.gov', 'Contracting Officer Representative, Division of Centralized Contracts and Services (DCCS)', FALSE), +('Measure and Instrument Development and Support', 'MIDS', 'Tim Day', 'timothy.day@cms.hhs.gov', 'Quality Subject Matter Expert (QSME)', FALSE), +('Measure and Instrument Development and Support', 'MIDS', 'Jim Gerber', 'james.gerber@cms.hhs.gov', 'Director, Division of Portfolio Management & Strategy', FALSE), +('Medicare Advantage Prescription Drug System', 'MARX', 'MINT Team', 'MINTTeam@cms.hhs.gov', NULL, TRUE), +('Outlook Mailbox', 'OUTLOOK_MAILBOX', 'MINT Team', 'MINTTeam@cms.hhs.gov', NULL, TRUE), +('Quality Vertical', 'QV', 'Susannah Bernheim', 'susannah.bernheim@cms.hhs.gov', 'Chief Quality Officer and Senior Advisor to the CMMI Front Office, Quality Vertical Lead', FALSE), +('Quality Vertical', 'QV', 'Dustin Allison', 'dustin.allison1@cms.hhs.gov', 'Program Analyst', FALSE), +('Quality Vertical', 'QV', 'Sasha Gibbel', 'sasha.gibbel@cms.hhs.gov', 'Quality Analyst', FALSE), +('Quality Vertical', 'QV', 'Whitney Saint-Fleur', 'whitney.saintfleur@cms.hhs.gov', 'Quality Analyst', FALSE), +('Research, Measurement, Assessment, Design, and Analysis', 'RMADA', 'Joe Pusateri', 'joseph.pusateri@cms.hhs.gov', 'Contracting Officer Representative', FALSE), +('Salesforce Application Review and Scoring', 'ARS', 'Elia Cossis', 'elia.cossis@cms.hhs.gov', 'Platform Lead', FALSE), +('Salesforce Application Review and Scoring', 'ARS', 'Chinelo Johnson', 'echinelo.johnson@cms.hhs.gov', 'Point of Contact', FALSE), +('Salesforce CONNECT', 'CONNECT', 'Elia Cossis', 'elia.cossis@cms.hhs.gov', 'Platform Lead', FALSE), +('Salesforce CONNECT', 'CONNECT', 'Chinelo Johnson', 'echinelo.johnson@cms.hhs.gov', 'Point of Contact', FALSE), +('Salesforce Letter of Intent', 'LOI', 'Elia Cossis', 'elia.cossis@cms.hhs.gov', 'Platform Lead', FALSE), +('Salesforce Letter of Intent', 'LOI', 'Chinelo Johnson', 'echinelo.johnson@cms.hhs.gov', 'Point of Contact', FALSE), +('Salesforce Project Officer Support Tool / Portal', 'POST_PORTAL', 'Elia Cossis', 'elia.cossis@cms.hhs.gov', 'Platform Lead', FALSE), +('Salesforce Project Officer Support Tool / Portal', 'POST_PORTAL', 'Chinelo Johnson', 'echinelo.johnson@cms.hhs.gov', 'Point of Contact', FALSE), +('Salesforce Request for Application', 'RFA', 'Elia Cossis', 'elia.cossis@cms.hhs.gov', 'Platform Lead', FALSE), +('Salesforce Request for Application', 'RFA', 'Chinelo Johnson', 'echinelo.johnson@cms.hhs.gov', 'Point of Contact', FALSE), +('Shared Systems', 'SHARED_SYSTEMS', 'Donna Schmidt', 'donna.schmidt@cms.hhs.gov', 'Director, Division of System Support, Operation and Security (DSSOS)', FALSE), +('Shared Systems', 'SHARED_SYSTEMS', 'Madhu Annadata', 'madhu.annadata@cms.hhs.gov', 'Subject Matter Expert', FALSE) +) + +INSERT INTO possible_operational_solution_contact( + id, + possible_operational_solution_id, + name, + email, + role, + is_team, + created_by, + created_dts +) + +SELECT + gen_random_uuid() AS id, + pos.id as possible_operational_solution_id, + pocs.name AS name, + pocs.email AS email, + pocs.role AS role, + pocs.IsTeam as is_team, + '00000001-0001-0001-0001-000000000001' AS created_by, --System account + current_timestamp AS created_dts + +FROM pocs +JOIN possible_operational_solution pos on CAST(pos.sol_key as TEXT) = pocs.solutionkey diff --git a/pkg/graph/generated/generated.go b/pkg/graph/generated/generated.go index 04c972f16c..2e3ac3a125 100644 --- a/pkg/graph/generated/generated.go +++ b/pkg/graph/generated/generated.go @@ -56,6 +56,7 @@ type ResolverRoot interface { PlanParticipantsAndProviders() PlanParticipantsAndProvidersResolver PlanPayments() PlanPaymentsResolver PossibleOperationalNeed() PossibleOperationalNeedResolver + PossibleOperationalSolution() PossibleOperationalSolutionResolver Query() QueryResolver Subscription() SubscriptionResolver } @@ -839,9 +840,25 @@ type ComplexityRoot struct { ModifiedByUserAccount func(childComplexity int) int ModifiedDts func(childComplexity int) int Name func(childComplexity int) int + PointsOfContact func(childComplexity int) int TreatAsOther func(childComplexity int) int } + PossibleOperationalSolutionContact struct { + CreatedBy func(childComplexity int) int + CreatedByUserAccount func(childComplexity int) int + CreatedDts func(childComplexity int) int + Email func(childComplexity int) int + ID func(childComplexity int) int + IsTeam func(childComplexity int) int + ModifiedBy func(childComplexity int) int + ModifiedByUserAccount func(childComplexity int) int + ModifiedDts func(childComplexity int) int + Name func(childComplexity int) int + PossibleOperationalSolutionID func(childComplexity int) int + Role func(childComplexity int) int + } + PrepareForClearance struct { LatestClearanceDts func(childComplexity int) int Status func(childComplexity int) int @@ -1085,6 +1102,9 @@ type PlanPaymentsResolver interface { type PossibleOperationalNeedResolver interface { PossibleSolutions(ctx context.Context, obj *models.PossibleOperationalNeed) ([]*models.PossibleOperationalSolution, error) } +type PossibleOperationalSolutionResolver interface { + PointsOfContact(ctx context.Context, obj *models.PossibleOperationalSolution) ([]*models.PossibleOperationalSolutionContact, error) +} type QueryResolver interface { CurrentUser(ctx context.Context) (*model.CurrentUser, error) ModelPlan(ctx context.Context, id uuid.UUID) (*models.ModelPlan, error) @@ -6102,6 +6122,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PossibleOperationalSolution.Name(childComplexity), true + case "PossibleOperationalSolution.pointsOfContact": + if e.complexity.PossibleOperationalSolution.PointsOfContact == nil { + break + } + + return e.complexity.PossibleOperationalSolution.PointsOfContact(childComplexity), true + case "PossibleOperationalSolution.treatAsOther": if e.complexity.PossibleOperationalSolution.TreatAsOther == nil { break @@ -6109,6 +6136,90 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PossibleOperationalSolution.TreatAsOther(childComplexity), true + case "PossibleOperationalSolutionContact.createdBy": + if e.complexity.PossibleOperationalSolutionContact.CreatedBy == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.CreatedBy(childComplexity), true + + case "PossibleOperationalSolutionContact.createdByUserAccount": + if e.complexity.PossibleOperationalSolutionContact.CreatedByUserAccount == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.CreatedByUserAccount(childComplexity), true + + case "PossibleOperationalSolutionContact.createdDts": + if e.complexity.PossibleOperationalSolutionContact.CreatedDts == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.CreatedDts(childComplexity), true + + case "PossibleOperationalSolutionContact.email": + if e.complexity.PossibleOperationalSolutionContact.Email == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.Email(childComplexity), true + + case "PossibleOperationalSolutionContact.id": + if e.complexity.PossibleOperationalSolutionContact.ID == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.ID(childComplexity), true + + case "PossibleOperationalSolutionContact.isTeam": + if e.complexity.PossibleOperationalSolutionContact.IsTeam == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.IsTeam(childComplexity), true + + case "PossibleOperationalSolutionContact.modifiedBy": + if e.complexity.PossibleOperationalSolutionContact.ModifiedBy == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.ModifiedBy(childComplexity), true + + case "PossibleOperationalSolutionContact.modifiedByUserAccount": + if e.complexity.PossibleOperationalSolutionContact.ModifiedByUserAccount == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.ModifiedByUserAccount(childComplexity), true + + case "PossibleOperationalSolutionContact.modifiedDts": + if e.complexity.PossibleOperationalSolutionContact.ModifiedDts == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.ModifiedDts(childComplexity), true + + case "PossibleOperationalSolutionContact.name": + if e.complexity.PossibleOperationalSolutionContact.Name == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.Name(childComplexity), true + + case "PossibleOperationalSolutionContact.possibleOperationalSolutionID": + if e.complexity.PossibleOperationalSolutionContact.PossibleOperationalSolutionID == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.PossibleOperationalSolutionID(childComplexity), true + + case "PossibleOperationalSolutionContact.role": + if e.complexity.PossibleOperationalSolutionContact.Role == nil { + break + } + + return e.complexity.PossibleOperationalSolutionContact.Role(childComplexity), true + case "PrepareForClearance.latestClearanceDts": if e.complexity.PrepareForClearance.LatestClearanceDts == nil { break @@ -6787,6 +6898,7 @@ type PossibleOperationalSolution { name: String! key: OperationalSolutionKey! treatAsOther: Boolean! + pointsOfContact: [PossibleOperationalSolutionContact!]! createdBy: UUID! createdByUserAccount: UserAccount! @@ -6796,6 +6908,27 @@ type PossibleOperationalSolution { modifiedDts: Time } +""" +PossibleOperationalSolutionContact represents a contact for a possible operational solution +""" +type PossibleOperationalSolutionContact { + id: UUID! + possibleOperationalSolutionID: Int! + + name: String! + email: String! + isTeam: Boolean! + role: String + + + createdBy: UUID! + createdByUserAccount: UserAccount! + createdDts: Time! + modifiedBy: UUID + modifiedByUserAccount: UserAccount + modifiedDts: Time +} + """ ModelPlanChanges represents the possible changes you can make to a model plan when updating it. Fields explicitly set with NULL will be unset, and omitted fields will be left unchanged. @@ -8985,6 +9118,8 @@ enum OperationalSolutionKey{ RFA SHARED_SYSTEMS BCDA + ISP + MIDS } enum OperationalSolutionSubtaskStatus { @@ -43686,8 +43821,444 @@ func (ec *executionContext) fieldContext_PlanPayments_readyForClearanceByUserAcc return fc, nil } -func (ec *executionContext) _PlanPayments_readyForClearanceDts(ctx context.Context, field graphql.CollectedField, obj *models.PlanPayments) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PlanPayments_readyForClearanceDts(ctx, field) +func (ec *executionContext) _PlanPayments_readyForClearanceDts(ctx context.Context, field graphql.CollectedField, obj *models.PlanPayments) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PlanPayments_readyForClearanceDts(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ReadyForClearanceDts, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*time.Time) + fc.Result = res + return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PlanPayments_readyForClearanceDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PlanPayments", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Time does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PlanPayments_status(ctx context.Context, field graphql.CollectedField, obj *models.PlanPayments) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PlanPayments_status(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Status, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(models.TaskStatus) + fc.Result = res + return ec.marshalNTaskStatus2githubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐTaskStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PlanPayments_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PlanPayments", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type TaskStatus does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalNeed_id(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalNeed_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalNeed", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalNeed_possibleSolutions(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_possibleSolutions(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.PossibleOperationalNeed().PossibleSolutions(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*models.PossibleOperationalSolution) + fc.Result = res + return ec.marshalNPossibleOperationalSolution2ᚕᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐPossibleOperationalSolutionᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalNeed_possibleSolutions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalNeed", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_PossibleOperationalSolution_id(ctx, field) + case "name": + return ec.fieldContext_PossibleOperationalSolution_name(ctx, field) + case "key": + return ec.fieldContext_PossibleOperationalSolution_key(ctx, field) + case "treatAsOther": + return ec.fieldContext_PossibleOperationalSolution_treatAsOther(ctx, field) + case "pointsOfContact": + return ec.fieldContext_PossibleOperationalSolution_pointsOfContact(ctx, field) + case "createdBy": + return ec.fieldContext_PossibleOperationalSolution_createdBy(ctx, field) + case "createdByUserAccount": + return ec.fieldContext_PossibleOperationalSolution_createdByUserAccount(ctx, field) + case "createdDts": + return ec.fieldContext_PossibleOperationalSolution_createdDts(ctx, field) + case "modifiedBy": + return ec.fieldContext_PossibleOperationalSolution_modifiedBy(ctx, field) + case "modifiedByUserAccount": + return ec.fieldContext_PossibleOperationalSolution_modifiedByUserAccount(ctx, field) + case "modifiedDts": + return ec.fieldContext_PossibleOperationalSolution_modifiedDts(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PossibleOperationalSolution", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalNeed_name(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalNeed_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalNeed", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalNeed_key(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(models.OperationalNeedKey) + fc.Result = res + return ec.marshalNOperationalNeedKey2githubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐOperationalNeedKey(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalNeed_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalNeed", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type OperationalNeedKey does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalNeed_section(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_section(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Section, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(models.TaskListSection) + fc.Result = res + return ec.marshalOTaskListSection2githubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐTaskListSection(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalNeed_section(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalNeed", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type TaskListSection does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalNeed_createdBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_createdBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(uuid.UUID) + fc.Result = res + return ec.marshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalNeed_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalNeed", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type UUID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalNeed_createdByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_createdByUserAccount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedByUserAccount(ctx), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*authentication.UserAccount) + fc.Result = res + return ec.marshalNUserAccount2ᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋauthenticationᚐUserAccount(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalNeed_createdByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalNeed", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_UserAccount_id(ctx, field) + case "username": + return ec.fieldContext_UserAccount_username(ctx, field) + case "isEUAID": + return ec.fieldContext_UserAccount_isEUAID(ctx, field) + case "commonName": + return ec.fieldContext_UserAccount_commonName(ctx, field) + case "locale": + return ec.fieldContext_UserAccount_locale(ctx, field) + case "email": + return ec.fieldContext_UserAccount_email(ctx, field) + case "givenName": + return ec.fieldContext_UserAccount_givenName(ctx, field) + case "familyName": + return ec.fieldContext_UserAccount_familyName(ctx, field) + case "zoneInfo": + return ec.fieldContext_UserAccount_zoneInfo(ctx, field) + case "hasLoggedIn": + return ec.fieldContext_UserAccount_hasLoggedIn(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type UserAccount", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalNeed_createdDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_createdDts(ctx, field) if err != nil { return graphql.Null } @@ -43700,23 +44271,26 @@ func (ec *executionContext) _PlanPayments_readyForClearanceDts(ctx context.Conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ReadyForClearanceDts, nil + return obj.CreatedDts, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*time.Time) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PlanPayments_readyForClearanceDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalNeed_createdDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PlanPayments", + Object: "PossibleOperationalNeed", Field: field, IsMethod: false, IsResolver: false, @@ -43727,8 +44301,8 @@ func (ec *executionContext) fieldContext_PlanPayments_readyForClearanceDts(ctx c return fc, nil } -func (ec *executionContext) _PlanPayments_status(ctx context.Context, field graphql.CollectedField, obj *models.PlanPayments) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PlanPayments_status(ctx, field) +func (ec *executionContext) _PossibleOperationalNeed_modifiedBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_modifiedBy(ctx, field) if err != nil { return graphql.Null } @@ -43741,38 +44315,35 @@ func (ec *executionContext) _PlanPayments_status(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.ModifiedBy, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(models.TaskStatus) + res := resTmp.(*uuid.UUID) fc.Result = res - return ec.marshalNTaskStatus2githubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐTaskStatus(ctx, field.Selections, res) + return ec.marshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PlanPayments_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalNeed_modifiedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PlanPayments", + Object: "PossibleOperationalNeed", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type TaskStatus does not have child fields") + return nil, errors.New("field of type UUID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_id(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_id(ctx, field) +func (ec *executionContext) _PossibleOperationalNeed_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_modifiedByUserAccount(ctx, field) if err != nil { return graphql.Null } @@ -43785,38 +44356,98 @@ func (ec *executionContext) _PossibleOperationalNeed_id(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.ModifiedByUserAccount(ctx), nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") + return graphql.Null + } + res := resTmp.(*authentication.UserAccount) + fc.Result = res + return ec.marshalOUserAccount2ᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋauthenticationᚐUserAccount(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalNeed_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalNeed", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_UserAccount_id(ctx, field) + case "username": + return ec.fieldContext_UserAccount_username(ctx, field) + case "isEUAID": + return ec.fieldContext_UserAccount_isEUAID(ctx, field) + case "commonName": + return ec.fieldContext_UserAccount_commonName(ctx, field) + case "locale": + return ec.fieldContext_UserAccount_locale(ctx, field) + case "email": + return ec.fieldContext_UserAccount_email(ctx, field) + case "givenName": + return ec.fieldContext_UserAccount_givenName(ctx, field) + case "familyName": + return ec.fieldContext_UserAccount_familyName(ctx, field) + case "zoneInfo": + return ec.fieldContext_UserAccount_zoneInfo(ctx, field) + case "hasLoggedIn": + return ec.fieldContext_UserAccount_hasLoggedIn(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type UserAccount", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalNeed_modifiedDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalNeed_modifiedDts(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ModifiedDts, nil + }) + if err != nil { + ec.Error(ctx, err) return graphql.Null } - res := resTmp.(int) + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*time.Time) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalNeed_modifiedDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PossibleOperationalNeed", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_possibleSolutions(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_possibleSolutions(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_id(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_id(ctx, field) if err != nil { return graphql.Null } @@ -43829,7 +44460,7 @@ func (ec *executionContext) _PossibleOperationalNeed_possibleSolutions(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.PossibleOperationalNeed().PossibleSolutions(rctx, obj) + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) @@ -43841,48 +44472,26 @@ func (ec *executionContext) _PossibleOperationalNeed_possibleSolutions(ctx conte } return graphql.Null } - res := resTmp.([]*models.PossibleOperationalSolution) + res := resTmp.(int) fc.Result = res - return ec.marshalNPossibleOperationalSolution2ᚕᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐPossibleOperationalSolutionᚄ(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_possibleSolutions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_PossibleOperationalSolution_id(ctx, field) - case "name": - return ec.fieldContext_PossibleOperationalSolution_name(ctx, field) - case "key": - return ec.fieldContext_PossibleOperationalSolution_key(ctx, field) - case "treatAsOther": - return ec.fieldContext_PossibleOperationalSolution_treatAsOther(ctx, field) - case "createdBy": - return ec.fieldContext_PossibleOperationalSolution_createdBy(ctx, field) - case "createdByUserAccount": - return ec.fieldContext_PossibleOperationalSolution_createdByUserAccount(ctx, field) - case "createdDts": - return ec.fieldContext_PossibleOperationalSolution_createdDts(ctx, field) - case "modifiedBy": - return ec.fieldContext_PossibleOperationalSolution_modifiedBy(ctx, field) - case "modifiedByUserAccount": - return ec.fieldContext_PossibleOperationalSolution_modifiedByUserAccount(ctx, field) - case "modifiedDts": - return ec.fieldContext_PossibleOperationalSolution_modifiedDts(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PossibleOperationalSolution", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_name(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_name(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_name(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_name(ctx, field) if err != nil { return graphql.Null } @@ -43912,9 +44521,9 @@ func (ec *executionContext) _PossibleOperationalNeed_name(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, IsMethod: false, IsResolver: false, @@ -43925,8 +44534,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalNeed_name(ctx contex return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_key(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_key(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_key(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_key(ctx, field) if err != nil { return graphql.Null } @@ -43951,26 +44560,26 @@ func (ec *executionContext) _PossibleOperationalNeed_key(ctx context.Context, fi } return graphql.Null } - res := resTmp.(models.OperationalNeedKey) + res := resTmp.(models.OperationalSolutionKey) fc.Result = res - return ec.marshalNOperationalNeedKey2githubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐOperationalNeedKey(ctx, field.Selections, res) + return ec.marshalNOperationalSolutionKey2githubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐOperationalSolutionKey(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OperationalNeedKey does not have child fields") + return nil, errors.New("field of type OperationalSolutionKey does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_section(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_section(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_treatAsOther(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_treatAsOther(ctx, field) if err != nil { return graphql.Null } @@ -43983,35 +44592,108 @@ func (ec *executionContext) _PossibleOperationalNeed_section(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Section, nil + return obj.TreatAsOther, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(models.TaskListSection) + res := resTmp.(bool) fc.Result = res - return ec.marshalOTaskListSection2githubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐTaskListSection(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_section(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_treatAsOther(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type TaskListSection does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_createdBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_createdBy(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_pointsOfContact(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_pointsOfContact(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.PossibleOperationalSolution().PointsOfContact(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*models.PossibleOperationalSolutionContact) + fc.Result = res + return ec.marshalNPossibleOperationalSolutionContact2ᚕᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐPossibleOperationalSolutionContactᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalSolution_pointsOfContact(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalSolution", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_PossibleOperationalSolutionContact_id(ctx, field) + case "possibleOperationalSolutionID": + return ec.fieldContext_PossibleOperationalSolutionContact_possibleOperationalSolutionID(ctx, field) + case "name": + return ec.fieldContext_PossibleOperationalSolutionContact_name(ctx, field) + case "email": + return ec.fieldContext_PossibleOperationalSolutionContact_email(ctx, field) + case "isTeam": + return ec.fieldContext_PossibleOperationalSolutionContact_isTeam(ctx, field) + case "role": + return ec.fieldContext_PossibleOperationalSolutionContact_role(ctx, field) + case "createdBy": + return ec.fieldContext_PossibleOperationalSolutionContact_createdBy(ctx, field) + case "createdByUserAccount": + return ec.fieldContext_PossibleOperationalSolutionContact_createdByUserAccount(ctx, field) + case "createdDts": + return ec.fieldContext_PossibleOperationalSolutionContact_createdDts(ctx, field) + case "modifiedBy": + return ec.fieldContext_PossibleOperationalSolutionContact_modifiedBy(ctx, field) + case "modifiedByUserAccount": + return ec.fieldContext_PossibleOperationalSolutionContact_modifiedByUserAccount(ctx, field) + case "modifiedDts": + return ec.fieldContext_PossibleOperationalSolutionContact_modifiedDts(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PossibleOperationalSolutionContact", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalSolution_createdBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_createdBy(ctx, field) if err != nil { return graphql.Null } @@ -44041,9 +44723,9 @@ func (ec *executionContext) _PossibleOperationalNeed_createdBy(ctx context.Conte return ec.marshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, IsMethod: false, IsResolver: false, @@ -44054,8 +44736,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalNeed_createdBy(ctx c return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_createdByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_createdByUserAccount(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_createdByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_createdByUserAccount(ctx, field) if err != nil { return graphql.Null } @@ -44085,9 +44767,9 @@ func (ec *executionContext) _PossibleOperationalNeed_createdByUserAccount(ctx co return ec.marshalNUserAccount2ᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋauthenticationᚐUserAccount(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_createdByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_createdByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, IsMethod: true, IsResolver: false, @@ -44120,8 +44802,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalNeed_createdByUserAc return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_createdDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_createdDts(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_createdDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_createdDts(ctx, field) if err != nil { return graphql.Null } @@ -44151,9 +44833,9 @@ func (ec *executionContext) _PossibleOperationalNeed_createdDts(ctx context.Cont return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_createdDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_createdDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, IsMethod: false, IsResolver: false, @@ -44164,8 +44846,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalNeed_createdDts(ctx return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_modifiedBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_modifiedBy(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_modifiedBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_modifiedBy(ctx, field) if err != nil { return graphql.Null } @@ -44192,9 +44874,9 @@ func (ec *executionContext) _PossibleOperationalNeed_modifiedBy(ctx context.Cont return ec.marshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_modifiedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_modifiedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, IsMethod: false, IsResolver: false, @@ -44205,8 +44887,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalNeed_modifiedBy(ctx return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_modifiedByUserAccount(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_modifiedByUserAccount(ctx, field) if err != nil { return graphql.Null } @@ -44233,9 +44915,9 @@ func (ec *executionContext) _PossibleOperationalNeed_modifiedByUserAccount(ctx c return ec.marshalOUserAccount2ᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋauthenticationᚐUserAccount(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, IsMethod: true, IsResolver: false, @@ -44268,8 +44950,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalNeed_modifiedByUserA return fc, nil } -func (ec *executionContext) _PossibleOperationalNeed_modifiedDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalNeed) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalNeed_modifiedDts(ctx, field) +func (ec *executionContext) _PossibleOperationalSolution_modifiedDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolution_modifiedDts(ctx, field) if err != nil { return graphql.Null } @@ -44296,9 +44978,9 @@ func (ec *executionContext) _PossibleOperationalNeed_modifiedDts(ctx context.Con return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalNeed_modifiedDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolution_modifiedDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalNeed", + Object: "PossibleOperationalSolution", Field: field, IsMethod: false, IsResolver: false, @@ -44309,8 +44991,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalNeed_modifiedDts(ctx return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_id(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_id(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_id(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_id(ctx, field) if err != nil { return graphql.Null } @@ -44335,14 +45017,58 @@ func (ec *executionContext) _PossibleOperationalSolution_id(ctx context.Context, } return graphql.Null } + res := resTmp.(uuid.UUID) + fc.Result = res + return ec.marshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalSolutionContact", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type UUID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalSolutionContact_possibleOperationalSolutionID(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_possibleOperationalSolutionID(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PossibleOperationalSolutionID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } res := resTmp.(int) fc.Result = res return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_possibleOperationalSolutionID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: false, IsResolver: false, @@ -44353,8 +45079,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalSolution_id(ctx cont return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_name(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_name(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_name(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_name(ctx, field) if err != nil { return graphql.Null } @@ -44384,9 +45110,9 @@ func (ec *executionContext) _PossibleOperationalSolution_name(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: false, IsResolver: false, @@ -44397,8 +45123,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalSolution_name(ctx co return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_key(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_key(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_email(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_email(ctx, field) if err != nil { return graphql.Null } @@ -44411,7 +45137,7 @@ func (ec *executionContext) _PossibleOperationalSolution_key(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Key, nil + return obj.Email, nil }) if err != nil { ec.Error(ctx, err) @@ -44423,26 +45149,26 @@ func (ec *executionContext) _PossibleOperationalSolution_key(ctx context.Context } return graphql.Null } - res := resTmp.(models.OperationalSolutionKey) + res := resTmp.(string) fc.Result = res - return ec.marshalNOperationalSolutionKey2githubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐOperationalSolutionKey(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_email(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type OperationalSolutionKey does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_treatAsOther(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_treatAsOther(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_isTeam(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_isTeam(ctx, field) if err != nil { return graphql.Null } @@ -44455,7 +45181,7 @@ func (ec *executionContext) _PossibleOperationalSolution_treatAsOther(ctx contex }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TreatAsOther, nil + return obj.IsTeam, nil }) if err != nil { ec.Error(ctx, err) @@ -44472,9 +45198,9 @@ func (ec *executionContext) _PossibleOperationalSolution_treatAsOther(ctx contex return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_treatAsOther(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_isTeam(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: false, IsResolver: false, @@ -44485,8 +45211,49 @@ func (ec *executionContext) fieldContext_PossibleOperationalSolution_treatAsOthe return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_createdBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_createdBy(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_role(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_role(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Role, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_role(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PossibleOperationalSolutionContact", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PossibleOperationalSolutionContact_createdBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_createdBy(ctx, field) if err != nil { return graphql.Null } @@ -44516,9 +45283,9 @@ func (ec *executionContext) _PossibleOperationalSolution_createdBy(ctx context.C return ec.marshalNUUID2githubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: false, IsResolver: false, @@ -44529,8 +45296,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalSolution_createdBy(c return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_createdByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_createdByUserAccount(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_createdByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_createdByUserAccount(ctx, field) if err != nil { return graphql.Null } @@ -44560,9 +45327,9 @@ func (ec *executionContext) _PossibleOperationalSolution_createdByUserAccount(ct return ec.marshalNUserAccount2ᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋauthenticationᚐUserAccount(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_createdByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_createdByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: true, IsResolver: false, @@ -44595,8 +45362,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalSolution_createdByUs return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_createdDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_createdDts(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_createdDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_createdDts(ctx, field) if err != nil { return graphql.Null } @@ -44626,9 +45393,9 @@ func (ec *executionContext) _PossibleOperationalSolution_createdDts(ctx context. return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_createdDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_createdDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: false, IsResolver: false, @@ -44639,8 +45406,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalSolution_createdDts( return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_modifiedBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_modifiedBy(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_modifiedBy(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_modifiedBy(ctx, field) if err != nil { return graphql.Null } @@ -44667,9 +45434,9 @@ func (ec *executionContext) _PossibleOperationalSolution_modifiedBy(ctx context. return ec.marshalOUUID2ᚖgithubᚗcomᚋgoogleᚋuuidᚐUUID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_modifiedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_modifiedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: false, IsResolver: false, @@ -44680,8 +45447,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalSolution_modifiedBy( return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_modifiedByUserAccount(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_modifiedByUserAccount(ctx, field) if err != nil { return graphql.Null } @@ -44708,9 +45475,9 @@ func (ec *executionContext) _PossibleOperationalSolution_modifiedByUserAccount(c return ec.marshalOUserAccount2ᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋauthenticationᚐUserAccount(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_modifiedByUserAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: true, IsResolver: false, @@ -44743,8 +45510,8 @@ func (ec *executionContext) fieldContext_PossibleOperationalSolution_modifiedByU return fc, nil } -func (ec *executionContext) _PossibleOperationalSolution_modifiedDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolution) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PossibleOperationalSolution_modifiedDts(ctx, field) +func (ec *executionContext) _PossibleOperationalSolutionContact_modifiedDts(ctx context.Context, field graphql.CollectedField, obj *models.PossibleOperationalSolutionContact) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PossibleOperationalSolutionContact_modifiedDts(ctx, field) if err != nil { return graphql.Null } @@ -44771,9 +45538,9 @@ func (ec *executionContext) _PossibleOperationalSolution_modifiedDts(ctx context return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PossibleOperationalSolution_modifiedDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PossibleOperationalSolutionContact_modifiedDts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PossibleOperationalSolution", + Object: "PossibleOperationalSolutionContact", Field: field, IsMethod: false, IsResolver: false, @@ -46744,6 +47511,8 @@ func (ec *executionContext) fieldContext_Query_possibleOperationalSolutions(ctx return ec.fieldContext_PossibleOperationalSolution_key(ctx, field) case "treatAsOther": return ec.fieldContext_PossibleOperationalSolution_treatAsOther(ctx, field) + case "pointsOfContact": + return ec.fieldContext_PossibleOperationalSolution_pointsOfContact(ctx, field) case "createdBy": return ec.fieldContext_PossibleOperationalSolution_createdBy(ctx, field) case "createdByUserAccount": @@ -57804,28 +58573,145 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "anticipatedPaymentFrequencyOther": - out.Values[i] = ec._PlanPayments_anticipatedPaymentFrequencyOther(ctx, field, obj) - case "anticipatedPaymentFrequencyNote": - out.Values[i] = ec._PlanPayments_anticipatedPaymentFrequencyNote(ctx, field, obj) - case "willRecoverPayments": - out.Values[i] = ec._PlanPayments_willRecoverPayments(ctx, field, obj) - case "willRecoverPaymentsNote": - out.Values[i] = ec._PlanPayments_willRecoverPaymentsNote(ctx, field, obj) - case "anticipateReconcilingPaymentsRetrospectively": - out.Values[i] = ec._PlanPayments_anticipateReconcilingPaymentsRetrospectively(ctx, field, obj) - case "anticipateReconcilingPaymentsRetrospectivelyNote": - out.Values[i] = ec._PlanPayments_anticipateReconcilingPaymentsRetrospectivelyNote(ctx, field, obj) - case "paymentStartDate": - out.Values[i] = ec._PlanPayments_paymentStartDate(ctx, field, obj) - case "paymentStartDateNote": - out.Values[i] = ec._PlanPayments_paymentStartDateNote(ctx, field, obj) - case "createdBy": - out.Values[i] = ec._PlanPayments_createdBy(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "createdByUserAccount": + case "anticipatedPaymentFrequencyOther": + out.Values[i] = ec._PlanPayments_anticipatedPaymentFrequencyOther(ctx, field, obj) + case "anticipatedPaymentFrequencyNote": + out.Values[i] = ec._PlanPayments_anticipatedPaymentFrequencyNote(ctx, field, obj) + case "willRecoverPayments": + out.Values[i] = ec._PlanPayments_willRecoverPayments(ctx, field, obj) + case "willRecoverPaymentsNote": + out.Values[i] = ec._PlanPayments_willRecoverPaymentsNote(ctx, field, obj) + case "anticipateReconcilingPaymentsRetrospectively": + out.Values[i] = ec._PlanPayments_anticipateReconcilingPaymentsRetrospectively(ctx, field, obj) + case "anticipateReconcilingPaymentsRetrospectivelyNote": + out.Values[i] = ec._PlanPayments_anticipateReconcilingPaymentsRetrospectivelyNote(ctx, field, obj) + case "paymentStartDate": + out.Values[i] = ec._PlanPayments_paymentStartDate(ctx, field, obj) + case "paymentStartDateNote": + out.Values[i] = ec._PlanPayments_paymentStartDateNote(ctx, field, obj) + case "createdBy": + out.Values[i] = ec._PlanPayments_createdBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "createdByUserAccount": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PlanPayments_createdByUserAccount(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "createdDts": + out.Values[i] = ec._PlanPayments_createdDts(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "modifiedBy": + out.Values[i] = ec._PlanPayments_modifiedBy(ctx, field, obj) + case "modifiedByUserAccount": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PlanPayments_modifiedByUserAccount(ctx, field, obj) + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "modifiedDts": + out.Values[i] = ec._PlanPayments_modifiedDts(ctx, field, obj) + case "readyForReviewBy": + out.Values[i] = ec._PlanPayments_readyForReviewBy(ctx, field, obj) + case "readyForReviewByUserAccount": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PlanPayments_readyForReviewByUserAccount(ctx, field, obj) + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "readyForReviewDts": + out.Values[i] = ec._PlanPayments_readyForReviewDts(ctx, field, obj) + case "readyForClearanceBy": + out.Values[i] = ec._PlanPayments_readyForClearanceBy(ctx, field, obj) + case "readyForClearanceByUserAccount": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -57834,10 +58720,7 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PlanPayments_createdByUserAccount(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._PlanPayments_readyForClearanceByUserAccount(ctx, field, obj) return res } @@ -57861,14 +58744,53 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "createdDts": - out.Values[i] = ec._PlanPayments_createdDts(ctx, field, obj) + case "readyForClearanceDts": + out.Values[i] = ec._PlanPayments_readyForClearanceDts(ctx, field, obj) + case "status": + out.Values[i] = ec._PlanPayments_status(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "modifiedBy": - out.Values[i] = ec._PlanPayments_modifiedBy(ctx, field, obj) - case "modifiedByUserAccount": + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var possibleOperationalNeedImplementors = []string{"PossibleOperationalNeed"} + +func (ec *executionContext) _PossibleOperationalNeed(ctx context.Context, sel ast.SelectionSet, obj *models.PossibleOperationalNeed) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, possibleOperationalNeedImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("PossibleOperationalNeed") + case "id": + out.Values[i] = ec._PossibleOperationalNeed_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "possibleSolutions": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -57877,7 +58799,10 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PlanPayments_modifiedByUserAccount(ctx, field, obj) + res = ec._PossibleOperationalNeed_possibleSolutions(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -57901,11 +58826,24 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "modifiedDts": - out.Values[i] = ec._PlanPayments_modifiedDts(ctx, field, obj) - case "readyForReviewBy": - out.Values[i] = ec._PlanPayments_readyForReviewBy(ctx, field, obj) - case "readyForReviewByUserAccount": + case "name": + out.Values[i] = ec._PossibleOperationalNeed_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "key": + out.Values[i] = ec._PossibleOperationalNeed_key(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "section": + out.Values[i] = ec._PossibleOperationalNeed_section(ctx, field, obj) + case "createdBy": + out.Values[i] = ec._PossibleOperationalNeed_createdBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "createdByUserAccount": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -57914,7 +58852,10 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PlanPayments_readyForReviewByUserAccount(ctx, field, obj) + res = ec._PossibleOperationalNeed_createdByUserAccount(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -57938,11 +58879,14 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "readyForReviewDts": - out.Values[i] = ec._PlanPayments_readyForReviewDts(ctx, field, obj) - case "readyForClearanceBy": - out.Values[i] = ec._PlanPayments_readyForClearanceBy(ctx, field, obj) - case "readyForClearanceByUserAccount": + case "createdDts": + out.Values[i] = ec._PossibleOperationalNeed_createdDts(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "modifiedBy": + out.Values[i] = ec._PossibleOperationalNeed_modifiedBy(ctx, field, obj) + case "modifiedByUserAccount": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -57951,7 +58895,7 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PlanPayments_readyForClearanceByUserAccount(ctx, field, obj) + res = ec._PossibleOperationalNeed_modifiedByUserAccount(ctx, field, obj) return res } @@ -57975,13 +58919,8 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "readyForClearanceDts": - out.Values[i] = ec._PlanPayments_readyForClearanceDts(ctx, field, obj) - case "status": - out.Values[i] = ec._PlanPayments_status(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } + case "modifiedDts": + out.Values[i] = ec._PossibleOperationalNeed_modifiedDts(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -58005,23 +58944,38 @@ func (ec *executionContext) _PlanPayments(ctx context.Context, sel ast.Selection return out } -var possibleOperationalNeedImplementors = []string{"PossibleOperationalNeed"} +var possibleOperationalSolutionImplementors = []string{"PossibleOperationalSolution"} -func (ec *executionContext) _PossibleOperationalNeed(ctx context.Context, sel ast.SelectionSet, obj *models.PossibleOperationalNeed) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, possibleOperationalNeedImplementors) +func (ec *executionContext) _PossibleOperationalSolution(ctx context.Context, sel ast.SelectionSet, obj *models.PossibleOperationalSolution) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, possibleOperationalSolutionImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PossibleOperationalNeed") + out.Values[i] = graphql.MarshalString("PossibleOperationalSolution") case "id": - out.Values[i] = ec._PossibleOperationalNeed_id(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolution_id(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "possibleSolutions": + case "name": + out.Values[i] = ec._PossibleOperationalSolution_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "key": + out.Values[i] = ec._PossibleOperationalSolution_key(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "treatAsOther": + out.Values[i] = ec._PossibleOperationalSolution_treatAsOther(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "pointsOfContact": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -58030,7 +58984,7 @@ func (ec *executionContext) _PossibleOperationalNeed(ctx context.Context, sel as ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PossibleOperationalNeed_possibleSolutions(ctx, field, obj) + res = ec._PossibleOperationalSolution_pointsOfContact(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -58057,20 +59011,8 @@ func (ec *executionContext) _PossibleOperationalNeed(ctx context.Context, sel as } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "name": - out.Values[i] = ec._PossibleOperationalNeed_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "key": - out.Values[i] = ec._PossibleOperationalNeed_key(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "section": - out.Values[i] = ec._PossibleOperationalNeed_section(ctx, field, obj) case "createdBy": - out.Values[i] = ec._PossibleOperationalNeed_createdBy(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolution_createdBy(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } @@ -58083,7 +59025,7 @@ func (ec *executionContext) _PossibleOperationalNeed(ctx context.Context, sel as ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PossibleOperationalNeed_createdByUserAccount(ctx, field, obj) + res = ec._PossibleOperationalSolution_createdByUserAccount(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -58111,12 +59053,12 @@ func (ec *executionContext) _PossibleOperationalNeed(ctx context.Context, sel as out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "createdDts": - out.Values[i] = ec._PossibleOperationalNeed_createdDts(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolution_createdDts(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } case "modifiedBy": - out.Values[i] = ec._PossibleOperationalNeed_modifiedBy(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolution_modifiedBy(ctx, field, obj) case "modifiedByUserAccount": field := field @@ -58126,7 +59068,7 @@ func (ec *executionContext) _PossibleOperationalNeed(ctx context.Context, sel as ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PossibleOperationalNeed_modifiedByUserAccount(ctx, field, obj) + res = ec._PossibleOperationalSolution_modifiedByUserAccount(ctx, field, obj) return res } @@ -58151,7 +59093,7 @@ func (ec *executionContext) _PossibleOperationalNeed(ctx context.Context, sel as out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "modifiedDts": - out.Values[i] = ec._PossibleOperationalNeed_modifiedDts(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolution_modifiedDts(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -58175,39 +59117,46 @@ func (ec *executionContext) _PossibleOperationalNeed(ctx context.Context, sel as return out } -var possibleOperationalSolutionImplementors = []string{"PossibleOperationalSolution"} +var possibleOperationalSolutionContactImplementors = []string{"PossibleOperationalSolutionContact"} -func (ec *executionContext) _PossibleOperationalSolution(ctx context.Context, sel ast.SelectionSet, obj *models.PossibleOperationalSolution) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, possibleOperationalSolutionImplementors) +func (ec *executionContext) _PossibleOperationalSolutionContact(ctx context.Context, sel ast.SelectionSet, obj *models.PossibleOperationalSolutionContact) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, possibleOperationalSolutionContactImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PossibleOperationalSolution") + out.Values[i] = graphql.MarshalString("PossibleOperationalSolutionContact") case "id": - out.Values[i] = ec._PossibleOperationalSolution_id(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolutionContact_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "possibleOperationalSolutionID": + out.Values[i] = ec._PossibleOperationalSolutionContact_possibleOperationalSolutionID(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } case "name": - out.Values[i] = ec._PossibleOperationalSolution_name(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolutionContact_name(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "key": - out.Values[i] = ec._PossibleOperationalSolution_key(ctx, field, obj) + case "email": + out.Values[i] = ec._PossibleOperationalSolutionContact_email(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "treatAsOther": - out.Values[i] = ec._PossibleOperationalSolution_treatAsOther(ctx, field, obj) + case "isTeam": + out.Values[i] = ec._PossibleOperationalSolutionContact_isTeam(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } + case "role": + out.Values[i] = ec._PossibleOperationalSolutionContact_role(ctx, field, obj) case "createdBy": - out.Values[i] = ec._PossibleOperationalSolution_createdBy(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolutionContact_createdBy(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } @@ -58220,7 +59169,7 @@ func (ec *executionContext) _PossibleOperationalSolution(ctx context.Context, se ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PossibleOperationalSolution_createdByUserAccount(ctx, field, obj) + res = ec._PossibleOperationalSolutionContact_createdByUserAccount(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -58248,12 +59197,12 @@ func (ec *executionContext) _PossibleOperationalSolution(ctx context.Context, se out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "createdDts": - out.Values[i] = ec._PossibleOperationalSolution_createdDts(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolutionContact_createdDts(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } case "modifiedBy": - out.Values[i] = ec._PossibleOperationalSolution_modifiedBy(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolutionContact_modifiedBy(ctx, field, obj) case "modifiedByUserAccount": field := field @@ -58263,7 +59212,7 @@ func (ec *executionContext) _PossibleOperationalSolution(ctx context.Context, se ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PossibleOperationalSolution_modifiedByUserAccount(ctx, field, obj) + res = ec._PossibleOperationalSolutionContact_modifiedByUserAccount(ctx, field, obj) return res } @@ -58288,7 +59237,7 @@ func (ec *executionContext) _PossibleOperationalSolution(ctx context.Context, se out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "modifiedDts": - out.Values[i] = ec._PossibleOperationalSolution_modifiedDts(ctx, field, obj) + out.Values[i] = ec._PossibleOperationalSolutionContact_modifiedDts(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -63057,6 +64006,60 @@ func (ec *executionContext) marshalNPossibleOperationalSolution2ᚖgithubᚗcom return ec._PossibleOperationalSolution(ctx, sel, v) } +func (ec *executionContext) marshalNPossibleOperationalSolutionContact2ᚕᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐPossibleOperationalSolutionContactᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.PossibleOperationalSolutionContact) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNPossibleOperationalSolutionContact2ᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐPossibleOperationalSolutionContact(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNPossibleOperationalSolutionContact2ᚖgithubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋmodelsᚐPossibleOperationalSolutionContact(ctx context.Context, sel ast.SelectionSet, v *models.PossibleOperationalSolutionContact) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._PossibleOperationalSolutionContact(ctx, sel, v) +} + func (ec *executionContext) marshalNPrepareForClearance2githubᚗcomᚋcmsgovᚋmintᚑappᚋpkgᚋgraphᚋmodelᚐPrepareForClearance(ctx context.Context, sel ast.SelectionSet, v model.PrepareForClearance) graphql.Marshaler { return ec._PrepareForClearance(ctx, sel, &v) } diff --git a/pkg/graph/resolvers/possible_operational_solution_contact.go b/pkg/graph/resolvers/possible_operational_solution_contact.go new file mode 100644 index 0000000000..10b0a539b3 --- /dev/null +++ b/pkg/graph/resolvers/possible_operational_solution_contact.go @@ -0,0 +1,26 @@ +package resolvers + +import ( + "context" + + "github.com/cmsgov/mint-app/pkg/models" + "github.com/cmsgov/mint-app/pkg/storage/loaders" +) + +// PossibleOperationalSolutionContactsGetByPossibleSolutionID returns all the contacts associated with a possible operational solution +// it uses a data loader to ensure efficient querying +func PossibleOperationalSolutionContactsGetByPossibleSolutionID(ctx context.Context, possibleSolutionID int) ([]*models.PossibleOperationalSolutionContact, error) { + allLoaders := loaders.Loaders(ctx) + contactLoader := allLoaders.PossibleOperationSolutionContactLoader + key := loaders.NewKeyArgs() + key.Args[loaders.DLPosOperationalSolutionKey] = possibleSolutionID + + thunk := contactLoader.Loader.Load(ctx, key) + result, err := thunk() + + if err != nil { + return nil, err + } + + return result.([]*models.PossibleOperationalSolutionContact), nil +} diff --git a/pkg/graph/resolvers/possible_operational_solution_contact_test.go b/pkg/graph/resolvers/possible_operational_solution_contact_test.go new file mode 100644 index 0000000000..0e5d8e8173 --- /dev/null +++ b/pkg/graph/resolvers/possible_operational_solution_contact_test.go @@ -0,0 +1,51 @@ +package resolvers + +import ( + "context" + "fmt" + + "golang.org/x/sync/errgroup" +) + +func (suite *ResolverSuite) TestPossibleOperationalSolutionContactsGetByPossibleSolutionID() { + + contacts, err := PossibleOperationalSolutionContactsGetByPossibleSolutionID(suite.testConfigs.Context, 1) + suite.NoError(err) + suite.NotNil(contacts) + suite.Len(contacts, 4) //currently there are four solutions for solution 1 ( 4innovation (4i) ) + +} + +func (suite *ResolverSuite) TestPossibleOperationalSolutionContactsDataLoader() { + possibleSolutions, err := PossibleOperationalSolutionCollectionGetAll(suite.testConfigs.Logger, suite.testConfigs.Store) + suite.NoError(err) + suite.NotEmpty(possibleSolutions) + + g, ctx := errgroup.WithContext(suite.testConfigs.Context) + + for _, posSol := range possibleSolutions { + solID := posSol.ID + theFunc := func() error { + return verifySolutionContactLoader(ctx, solID) + } + g.Go(theFunc) + + } + err = g.Wait() + suite.NoError(err) +} + +func verifySolutionContactLoader(ctx context.Context, solutionID int) error { + contacts, err := PossibleOperationalSolutionContactsGetByPossibleSolutionID(ctx, solutionID) + if err != nil { + return err + } + if len(contacts) < 1 { + return nil // Not all possible operational solutions have contacts. + } + if solutionID != contacts[0].PossibleOperationalSolutionID { + return fmt.Errorf("op solution contact returned operational solution ID %d, expected %d", contacts[0].PossibleOperationalSolutionID, solutionID) + } + return nil + +} diff --git a/pkg/graph/schema.graphql b/pkg/graph/schema.graphql index 354c1b31e3..7da616e3ed 100644 --- a/pkg/graph/schema.graphql +++ b/pkg/graph/schema.graphql @@ -115,6 +115,7 @@ type PossibleOperationalSolution { name: String! key: OperationalSolutionKey! treatAsOther: Boolean! + pointsOfContact: [PossibleOperationalSolutionContact!]! createdBy: UUID! createdByUserAccount: UserAccount! @@ -124,6 +125,27 @@ type PossibleOperationalSolution { modifiedDts: Time } +""" +PossibleOperationalSolutionContact represents a contact for a possible operational solution +""" +type PossibleOperationalSolutionContact { + id: UUID! + possibleOperationalSolutionID: Int! + + name: String! + email: String! + isTeam: Boolean! + role: String + + + createdBy: UUID! + createdByUserAccount: UserAccount! + createdDts: Time! + modifiedBy: UUID + modifiedByUserAccount: UserAccount + modifiedDts: Time +} + """ ModelPlanChanges represents the possible changes you can make to a model plan when updating it. Fields explicitly set with NULL will be unset, and omitted fields will be left unchanged. @@ -2313,6 +2335,8 @@ enum OperationalSolutionKey{ RFA SHARED_SYSTEMS BCDA + ISP + MIDS } enum OperationalSolutionSubtaskStatus { diff --git a/pkg/graph/schema.resolvers.go b/pkg/graph/schema.resolvers.go index 7e14a95b3a..9a99222b30 100644 --- a/pkg/graph/schema.resolvers.go +++ b/pkg/graph/schema.resolvers.go @@ -794,6 +794,11 @@ func (r *possibleOperationalNeedResolver) PossibleSolutions(ctx context.Context, return resolvers.PossibleOperationalSolutionCollectionGetByNeedType(logger, obj.Key, r.store) } +// PointsOfContact is the resolver for the pointsOfContact field. +func (r *possibleOperationalSolutionResolver) PointsOfContact(ctx context.Context, obj *models.PossibleOperationalSolution) ([]*models.PossibleOperationalSolutionContact, error) { + return resolvers.PossibleOperationalSolutionContactsGetByPossibleSolutionID(ctx, obj.ID) +} + // CurrentUser is the resolver for the currentUser field. func (r *queryResolver) CurrentUser(ctx context.Context) (*model.CurrentUser, error) { ldUser := flags.Principal(ctx) @@ -1032,6 +1037,11 @@ func (r *Resolver) PossibleOperationalNeed() generated.PossibleOperationalNeedRe return &possibleOperationalNeedResolver{r} } +// PossibleOperationalSolution returns generated.PossibleOperationalSolutionResolver implementation. +func (r *Resolver) PossibleOperationalSolution() generated.PossibleOperationalSolutionResolver { + return &possibleOperationalSolutionResolver{r} +} + // Query returns generated.QueryResolver implementation. func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } @@ -1053,5 +1063,6 @@ type planOpsEvalAndLearningResolver struct{ *Resolver } type planParticipantsAndProvidersResolver struct{ *Resolver } type planPaymentsResolver struct{ *Resolver } type possibleOperationalNeedResolver struct{ *Resolver } +type possibleOperationalSolutionResolver struct{ *Resolver } type queryResolver struct{ *Resolver } type subscriptionResolver struct{ *Resolver } diff --git a/pkg/models/possible_operational_solution.go b/pkg/models/possible_operational_solution.go index 16f5892d5b..bc4713860b 100644 --- a/pkg/models/possible_operational_solution.go +++ b/pkg/models/possible_operational_solution.go @@ -53,4 +53,6 @@ const ( OpSKRfa OperationalSolutionKey = "RFA" OpSKSharedSystems OperationalSolutionKey = "SHARED_SYSTEMS" OpSKBCDA OperationalSolutionKey = "BCDA" + OpSKISP OperationalSolutionKey = "ISP" + OpSKMIDS OperationalSolutionKey = "MIDS" ) diff --git a/pkg/models/possible_operational_solution_contact.go b/pkg/models/possible_operational_solution_contact.go new file mode 100644 index 0000000000..8bfab32b72 --- /dev/null +++ b/pkg/models/possible_operational_solution_contact.go @@ -0,0 +1,12 @@ +package models + +// PossibleOperationalSolutionContact represents a contact for a possible operational solution +type PossibleOperationalSolutionContact struct { + baseStruct + PossibleOperationalSolutionID int `db:"possible_operational_solution_id" json:"possibleOperationalSolutionID"` + + Name string `db:"name" json:"name"` + Email string `db:"email" json:"email"` + IsTeam bool `db:"isTeam" json:"is_team"` + Role *string `db:"role" json:"role"` +} diff --git a/pkg/storage/SQL/possible_operational_solution_contact/collection_get_by_possible_solution_id.sql b/pkg/storage/SQL/possible_operational_solution_contact/collection_get_by_possible_solution_id.sql new file mode 100644 index 0000000000..015cc7d86a --- /dev/null +++ b/pkg/storage/SQL/possible_operational_solution_contact/collection_get_by_possible_solution_id.sql @@ -0,0 +1,20 @@ +WITH QUERIED_IDS AS ( + /*Translate the input to a table */ + SELECT possible_operational_solution_id + FROM + JSON_TO_RECORDSET(:paramTableJSON) + AS x("possible_operational_solution_id" int) --noqa +) + +SELECT + posc.id, + posc.possible_operational_solution_id, + posc.name, + posc.email, + posc.role, + posc.created_by, + posc.created_dts, + posc.modified_by, + posc.modified_dts +FROM QUERIED_IDS AS qIDs +INNER JOIN possible_operational_solution_contact AS posc ON posc.possible_operational_solution_id = qIDs.possible_operational_solution_id; diff --git a/pkg/storage/loaders/data_loaders.go b/pkg/storage/loaders/data_loaders.go index c2363931ca..0ab652142f 100644 --- a/pkg/storage/loaders/data_loaders.go +++ b/pkg/storage/loaders/data_loaders.go @@ -23,6 +23,8 @@ type DataLoaders struct { ExistingModelLinkLoader *WrappedDataLoader ExistingModelLoader *WrappedDataLoader ModelPlanLoader *WrappedDataLoader + + PossibleOperationSolutionContactLoader *WrappedDataLoader } // NewDataLoaders instantiates data loaders for the middleware @@ -52,6 +54,8 @@ func NewDataLoaders(store *storage.Store) *DataLoaders { loaders.ExistingModelLoader = newWrappedDataLoader(loaders.GetExistingModelByModelPlanID) loaders.ModelPlanLoader = newWrappedDataLoader(loaders.GetModelPlanByModelPlanID) + loaders.PossibleOperationSolutionContactLoader = newWrappedDataLoader(loaders.PossibleOperationalSolutionContactsGetByPossibleSolutionID) + return loaders } diff --git a/pkg/storage/loaders/possible_operational_solution_contact_loader.go b/pkg/storage/loaders/possible_operational_solution_contact_loader.go new file mode 100644 index 0000000000..16bb481578 --- /dev/null +++ b/pkg/storage/loaders/possible_operational_solution_contact_loader.go @@ -0,0 +1,69 @@ +package loaders + +import ( + "context" + "fmt" + + "github.com/graph-gophers/dataloader" + "go.uber.org/zap" + + "github.com/cmsgov/mint-app/pkg/appcontext" + "github.com/cmsgov/mint-app/pkg/models" +) + +// These constants represent the different values of ModelCategory +const ( + // DLPosOperationalSolutionKey is the key used to store and retrieve the possible operational solution id key + DLPosOperationalSolutionKey string = "possible_operational_solution_id" +) + +// PossibleOperationalSolutionContactsGetByPossibleSolutionID uses a DataLoader to aggreggate a SQL call and return all contacts in one query +func (loaders *DataLoaders) PossibleOperationalSolutionContactsGetByPossibleSolutionID(ctx context.Context, keys dataloader.Keys) []*dataloader.Result { + dr := loaders.DataReader + + logger := appcontext.ZLogger(ctx) + arrayCK, err := ConvertToKeyArgsArray(keys) + if err != nil { + logger.Error("issue converting keys for data loader in Possible Operational Solution Contact", zap.Error(*err)) + } + marshaledParams, err := arrayCK.ToJSONArray() + if err != nil { + logger.Error("issue converting keys to JSON for data loader in Possible Operational Solution Contact", zap.Error(*err)) + } + + contacts, loadErr := dr.Store.PossibleOperationalSolutionContactsGetByPossibleSolutionIDLOADER(logger, marshaledParams) + if loadErr != nil { + return []*dataloader.Result{{Data: nil, Error: loadErr}} + + } + contactsByID := map[string][]*models.PossibleOperationalSolutionContact{} + + for _, contact := range contacts { + key := fmt.Sprint(contact.PossibleOperationalSolutionID) + slice, ok := contactsByID[key] + if ok { // There is already a slice in the array + slice = append(slice, contact) // Add existing to slice + contactsByID[key] = slice + continue + } + contactsByID[key] = []*models.PossibleOperationalSolutionContact{contact} + } + + // RETURN IN THE SAME ORDER REQUESTED + output := make([]*dataloader.Result, len(keys)) + for index, key := range keys { + ck, ok := key.Raw().(KeyArgs) + if ok { + resKey := fmt.Sprint(ck.Args[DLPosOperationalSolutionKey]) + contacts := contactsByID[resKey] // If a contact is not found, it will return a zero state result eg empty array. + + output[index] = &dataloader.Result{Data: contacts, Error: nil} + + } else { + err := fmt.Errorf("could not retrive key from %s", key.String()) + output[index] = &dataloader.Result{Data: nil, Error: err} + } + } + return output + +} diff --git a/pkg/storage/possible_operational_solution_contactStore.go b/pkg/storage/possible_operational_solution_contactStore.go new file mode 100644 index 0000000000..49b1ad7a82 --- /dev/null +++ b/pkg/storage/possible_operational_solution_contactStore.go @@ -0,0 +1,41 @@ +package storage + +import ( + _ "embed" + + "go.uber.org/zap" + + "github.com/cmsgov/mint-app/pkg/models" +) + +//go:embed SQL/possible_operational_solution_contact/collection_get_by_possible_solution_id.sql +var possibleOperationalSolutionContactsGetByPossibleSolutionIDLOADERSQL string + +// PossibleOperationalSolutionContactsGetByPossibleSolutionIDLOADER returns +// Solution contacts that match the paramTable JSON +func (s *Store) PossibleOperationalSolutionContactsGetByPossibleSolutionIDLOADER( + _ *zap.Logger, + paramTableJSON string, +) ([]*models.PossibleOperationalSolutionContact, error) { + + // paramtableJSON should have possibleSolutionID as a key + var contacts []*models.PossibleOperationalSolutionContact + + stmt, err := s.db.PrepareNamed(possibleOperationalSolutionContactsGetByPossibleSolutionIDLOADERSQL) + if err != nil { + return nil, err + } + defer stmt.Close() + + arg := map[string]interface{}{ + "paramTableJSON": paramTableJSON, + } + + err = stmt.Select(&contacts, arg) //this returns more than one + if err != nil { + return nil, err + } + + return contacts, nil + +} diff --git a/src/data/mock/solutions.ts b/src/data/mock/solutions.ts new file mode 100644 index 0000000000..5ae12adff7 --- /dev/null +++ b/src/data/mock/solutions.ts @@ -0,0 +1,82 @@ +import GetPossibleSolutions from 'gql/apolloGQL/Solutions/GetPossibleSolutions'; +import { OperationalSolutionKey } from 'gql/gen/graphql'; + +export const pointsOfContact = [ + { + __typename: 'PossibleOperationalSolutionContact', + id: '1267967874323', + name: 'John Mint', + email: 'john.mint@oddball.io', + isTeam: false, + role: 'Project lead' + } +]; + +export const possibleSolutionsMock = [ + { + request: { + query: GetPossibleSolutions + }, + result: { + data: { + possibleOperationalSolutions: [ + { + __typname: 'PossibleOperationalSolution', + id: '1267679i6867663', + key: OperationalSolutionKey.INNOVATION, + pointsOfContact: [...pointsOfContact] + }, + { + __typname: 'PossibleOperationalSolution', + id: '2345256', + key: OperationalSolutionKey.ACO_OS, + pointsOfContact: [ + { + __typename: 'PossibleOperationalSolutionContact', + id: '235234', + name: '4Inn/Aco', + email: '4inn.mint@oddball.io', + isTeam: true, + role: '' + } + ] + }, + { + __typname: 'PossibleOperationalSolution', + id: '78968679', + key: OperationalSolutionKey.APPS, + pointsOfContact: [ + { + __typename: 'PossibleOperationalSolutionContact', + id: '454576365436', + name: 'Brandon Bee', + email: 'bee.mint@oddball.io', + isTeam: false, + role: 'CMMI Government Task Lead' + } + ] + }, + { + __typname: 'PossibleOperationalSolution', + id: '116785636', + key: OperationalSolutionKey.RMADA, + pointsOfContact: [ + { + __typename: 'PossibleOperationalSolutionContact', + id: '4512341356', + name: 'Alicia Thomas', + email: 'at.mint@oddball.io', + isTeam: false, + role: 'Beneficiary Listening Session Point of Contact' + } + ] + } + ] + } + } + } +]; + +const allMocks = [...possibleSolutionsMock]; + +export default allMocks; diff --git a/src/gql/apolloGQL/Solutions/GetPossibleSolutions.ts b/src/gql/apolloGQL/Solutions/GetPossibleSolutions.ts new file mode 100644 index 0000000000..77c52c03f0 --- /dev/null +++ b/src/gql/apolloGQL/Solutions/GetPossibleSolutions.ts @@ -0,0 +1,17 @@ +import { graphql } from '../../gen/gql'; + +export default graphql(/* GraphQL */ ` + query GetPossibleSolutions { + possibleOperationalSolutions { + id + key + pointsOfContact { + id + name + email + isTeam + role + } + } + } +`); diff --git a/src/gql/gen/gql.ts b/src/gql/gen/gql.ts index 33183f5185..1bb2f6c818 100644 --- a/src/gql/gen/gql.ts +++ b/src/gql/gen/gql.ts @@ -18,6 +18,7 @@ const documents = { "\n query GetFunding($id: UUID!) {\n modelPlan(id: $id) {\n id\n modelName\n payments {\n id\n fundingSource\n fundingSourceTrustFundType\n fundingSourceOther\n fundingSourceNote\n fundingSourceR\n fundingSourceRTrustFundType\n fundingSourceROther\n fundingSourceRNote\n payRecipients\n payRecipientsOtherSpecification\n payRecipientsNote\n payType\n payTypeNote\n payClaims\n }\n operationalNeeds {\n modifiedDts\n }\n }\n }\n": types.GetFundingDocument, "\n mutation UpdatePayments($id: UUID!, $changes: PlanPaymentsChanges!) {\n updatePlanPayments(id: $id, changes: $changes) {\n id\n }\n }\n": types.UpdatePaymentsDocument, "\n mutation CreateShareModelPlan(\n $modelPlanID: UUID!\n $viewFilter: ModelViewFilter\n $receiverEmails: [String!]!\n $optionalMessage: String\n ) {\n shareModelPlan(\n modelPlanID: $modelPlanID\n viewFilter: $viewFilter\n receiverEmails: $receiverEmails\n optionalMessage: $optionalMessage\n )\n }\n": types.CreateShareModelPlanDocument, + "\n query GetPossibleSolutions {\n possibleOperationalSolutions {\n id\n key\n pointsOfContact {\n id\n name\n email\n isTeam\n role\n }\n }\n }\n": types.GetPossibleSolutionsDocument, "\n query GetNDA {\n ndaInfo {\n agreed\n agreedDts\n }\n }\n": types.GetNdaDocument, }; @@ -55,6 +56,10 @@ export function graphql(source: "\n mutation UpdatePayments($id: UUID!, $change * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql(source: "\n mutation CreateShareModelPlan(\n $modelPlanID: UUID!\n $viewFilter: ModelViewFilter\n $receiverEmails: [String!]!\n $optionalMessage: String\n ) {\n shareModelPlan(\n modelPlanID: $modelPlanID\n viewFilter: $viewFilter\n receiverEmails: $receiverEmails\n optionalMessage: $optionalMessage\n )\n }\n"): (typeof documents)["\n mutation CreateShareModelPlan(\n $modelPlanID: UUID!\n $viewFilter: ModelViewFilter\n $receiverEmails: [String!]!\n $optionalMessage: String\n ) {\n shareModelPlan(\n modelPlanID: $modelPlanID\n viewFilter: $viewFilter\n receiverEmails: $receiverEmails\n optionalMessage: $optionalMessage\n )\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query GetPossibleSolutions {\n possibleOperationalSolutions {\n id\n key\n pointsOfContact {\n id\n name\n email\n isTeam\n role\n }\n }\n }\n"): (typeof documents)["\n query GetPossibleSolutions {\n possibleOperationalSolutions {\n id\n key\n pointsOfContact {\n id\n name\n email\n isTeam\n role\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/src/gql/gen/graphql.ts b/src/gql/gen/graphql.ts index 9a0fcccf74..4ca95cb5e7 100644 --- a/src/gql/gen/graphql.ts +++ b/src/gql/gen/graphql.ts @@ -69,7 +69,7 @@ export enum AnticipatedPaymentFrequencyType { } export type AuditChange = { - __typename?: 'AuditChange'; + __typename: 'AuditChange'; action: Scalars['String']['output']; fields: Scalars['Map']['output']; foreignKey?: Maybe; @@ -148,7 +148,7 @@ export type ChangeHistorySortParams = { }; export type ChangeTableRecord = { - __typename?: 'ChangeTableRecord'; + __typename: 'ChangeTableRecord'; action: Scalars['String']['output']; fields: ChangedFields; foreignKey?: Maybe; @@ -173,7 +173,7 @@ export enum ChangeType { } export type ChangedFields = { - __typename?: 'ChangedFields'; + __typename: 'ChangedFields'; changes: Array; }; @@ -214,7 +214,7 @@ export type CreateOperationalSolutionSubtaskInput = { /** The current user of the application */ export type CurrentUser = { - __typename?: 'CurrentUser'; + __typename: 'CurrentUser'; launchDarkly: LaunchDarklySettings; }; @@ -272,7 +272,7 @@ export enum DataToSendParticipantsType { } export type DateHistogramAggregationBucket = { - __typename?: 'DateHistogramAggregationBucket'; + __typename: 'DateHistogramAggregationBucket'; docCount: Scalars['Int']['output']; key: Scalars['String']['output']; maxModifiedDts: Scalars['Time']['output']; @@ -281,7 +281,7 @@ export type DateHistogramAggregationBucket = { /** DiscussionReply represents a discussion reply */ export type DiscussionReply = { - __typename?: 'DiscussionReply'; + __typename: 'DiscussionReply'; content?: Maybe; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; @@ -316,7 +316,7 @@ export type DiscussionReplyCreateInput = { }; export type DiscussionRoleSelection = { - __typename?: 'DiscussionRoleSelection'; + __typename: 'DiscussionRoleSelection'; userRole: DiscussionUserRole; userRoleDescription?: Maybe; }; @@ -359,7 +359,7 @@ export enum EvaluationApproachType { /** ExistingModel represents a model that already exists outside of the scope of MINT */ export type ExistingModel = { - __typename?: 'ExistingModel'; + __typename: 'ExistingModel'; authority?: Maybe; category?: Maybe; createdBy: Scalars['UUID']['output']; @@ -384,7 +384,7 @@ export type ExistingModel = { }; export type ExistingModelLink = { - __typename?: 'ExistingModelLink'; + __typename: 'ExistingModelLink'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -400,14 +400,14 @@ export type ExistingModelLink = { }; export type Field = { - __typename?: 'Field'; + __typename: 'Field'; name: Scalars['String']['output']; nameCamelCase: Scalars['String']['output']; value: FieldValue; }; export type FieldValue = { - __typename?: 'FieldValue'; + __typename: 'FieldValue'; new?: Maybe; old?: Maybe; }; @@ -480,7 +480,7 @@ export enum KeyCharacteristic { /** The current user's Launch Darkly key */ export type LaunchDarklySettings = { - __typename?: 'LaunchDarklySettings'; + __typename: 'LaunchDarklySettings'; signedHash: Scalars['String']['output']; userKey: Scalars['String']['output']; }; @@ -516,7 +516,7 @@ export enum ModelLearningSystemType { /** ModelPlan represent the data point for plans about a model. It is the central data type in the application */ export type ModelPlan = { - __typename?: 'ModelPlan'; + __typename: 'ModelPlan'; abbreviation?: Maybe; archived: Scalars['Boolean']['output']; basics: PlanBasics; @@ -615,7 +615,7 @@ export enum MonitoringFileType { /** Mutations definition for the schema */ export type Mutation = { - __typename?: 'Mutation'; + __typename: 'Mutation'; addOrUpdateCustomOperationalNeed: OperationalNeed; addPlanFavorite: PlanFavorite; agreeToNDA: NdaInfo; @@ -943,7 +943,7 @@ export type MutationUploadNewPlanDocumentArgs = { /** NDAInfo represents whether a user has agreed to an NDA or not. If agreed to previously, there will be a datestamp visible */ export type NdaInfo = { - __typename?: 'NDAInfo'; + __typename: 'NDAInfo'; agreed: Scalars['Boolean']['output']; agreedDts?: Maybe; }; @@ -972,7 +972,7 @@ export enum OpSolutionStatus { } export type OperationalNeed = { - __typename?: 'OperationalNeed'; + __typename: 'OperationalNeed'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -1029,7 +1029,7 @@ export enum OperationalNeedKey { } export type OperationalSolution = { - __typename?: 'OperationalSolution'; + __typename: 'OperationalSolution'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -1092,11 +1092,13 @@ export enum OperationalSolutionKey { INNOVATION = 'INNOVATION', INTERNAL_STAFF = 'INTERNAL_STAFF', IPC = 'IPC', + ISP = 'ISP', LDG = 'LDG', LOI = 'LOI', LV = 'LV', MARX = 'MARX', MDM = 'MDM', + MIDS = 'MIDS', OTHER_NEW_PROCESS = 'OTHER_NEW_PROCESS', OUTLOOK_MAILBOX = 'OUTLOOK_MAILBOX', POST_PORTAL = 'POST_PORTAL', @@ -1107,7 +1109,7 @@ export enum OperationalSolutionKey { } export type OperationalSolutionSubtask = { - __typename?: 'OperationalSolutionSubtask'; + __typename: 'OperationalSolutionSubtask'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -1203,7 +1205,7 @@ export enum PayType { /** Represents plan basics */ export type PlanBasics = { - __typename?: 'PlanBasics'; + __typename: 'PlanBasics'; additionalModelCategories: Array; amsModelID?: Maybe; announced?: Maybe; @@ -1280,7 +1282,7 @@ export type PlanBasicsChanges = { /** Plan Beneficiaries represents the the beneficiaries section of the task list */ export type PlanBeneficiaries = { - __typename?: 'PlanBeneficiaries'; + __typename: 'PlanBeneficiaries'; beneficiaries: Array; beneficiariesNote?: Maybe; beneficiariesOther?: Maybe; @@ -1346,7 +1348,7 @@ export type PlanBeneficiariesChanges = { /** PlanCollaborator represents a collaborator on a plan */ export type PlanCollaborator = { - __typename?: 'PlanCollaborator'; + __typename: 'PlanCollaborator'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -1368,7 +1370,7 @@ export type PlanCollaboratorCreateInput = { }; export type PlanCrTdl = { - __typename?: 'PlanCrTdl'; + __typename: 'PlanCrTdl'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -1400,7 +1402,7 @@ export type PlanCrTdlCreateInput = { /** PlanDiscussion represents plan discussion */ export type PlanDiscussion = { - __typename?: 'PlanDiscussion'; + __typename: 'PlanDiscussion'; content?: Maybe; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; @@ -1437,7 +1439,7 @@ export type PlanDiscussionCreateInput = { /** PlanDocument represents a document on a plan */ export type PlanDocument = { - __typename?: 'PlanDocument'; + __typename: 'PlanDocument'; bucket: Scalars['String']['output']; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; @@ -1488,7 +1490,7 @@ export type PlanDocumentLinkInput = { }; export type PlanDocumentSolutionLink = { - __typename?: 'PlanDocumentSolutionLink'; + __typename: 'PlanDocumentSolutionLink'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -1501,7 +1503,7 @@ export type PlanDocumentSolutionLink = { }; export type PlanFavorite = { - __typename?: 'PlanFavorite'; + __typename: 'PlanFavorite'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -1516,7 +1518,7 @@ export type PlanFavorite = { /** PlanGeneralCharacteristics represents a plan general characteristics object */ export type PlanGeneralCharacteristics = { - __typename?: 'PlanGeneralCharacteristics'; + __typename: 'PlanGeneralCharacteristics'; additionalServicesInvolved?: Maybe; additionalServicesInvolvedDescription?: Maybe; additionalServicesInvolvedNote?: Maybe; @@ -1644,7 +1646,7 @@ export type PlanGeneralCharacteristicsChanges = { /** PlanOpsEvalAndLearning represents the task list section that deals with information regarding the Ops Eval and Learning */ export type PlanOpsEvalAndLearning = { - __typename?: 'PlanOpsEvalAndLearning'; + __typename: 'PlanOpsEvalAndLearning'; agencyOrStateHelp: Array; agencyOrStateHelpNote?: Maybe; agencyOrStateHelpOther?: Maybe; @@ -1860,7 +1862,7 @@ export type PlanOpsEvalAndLearningChanges = { /** PlanParticipantsAndProviders is the task list section that deals with information regarding all Providers and Participants */ export type PlanParticipantsAndProviders = { - __typename?: 'PlanParticipantsAndProviders'; + __typename: 'PlanParticipantsAndProviders'; communicationMethod: Array; communicationMethodOther?: Maybe; communicationNote?: Maybe; @@ -1982,7 +1984,7 @@ export type PlanParticipantsAndProvidersChanges = { /** PlanPayments is the task list section that deals with information regarding Payments */ export type PlanPayments = { - __typename?: 'PlanPayments'; + __typename: 'PlanPayments'; affectsMedicareSecondaryPayerClaims?: Maybe; affectsMedicareSecondaryPayerClaimsHow?: Maybe; affectsMedicareSecondaryPayerClaimsNote?: Maybe; @@ -2123,7 +2125,7 @@ export type PlanPaymentsChanges = { }; export type PossibleOperationalNeed = { - __typename?: 'PossibleOperationalNeed'; + __typename: 'PossibleOperationalNeed'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -2138,7 +2140,7 @@ export type PossibleOperationalNeed = { }; export type PossibleOperationalSolution = { - __typename?: 'PossibleOperationalSolution'; + __typename: 'PossibleOperationalSolution'; createdBy: Scalars['UUID']['output']; createdByUserAccount: UserAccount; createdDts: Scalars['Time']['output']; @@ -2148,11 +2150,29 @@ export type PossibleOperationalSolution = { modifiedByUserAccount?: Maybe; modifiedDts?: Maybe; name: Scalars['String']['output']; + pointsOfContact: Array; treatAsOther: Scalars['Boolean']['output']; }; +/** PossibleOperationalSolutionContact represents a contact for a possible operational solution */ +export type PossibleOperationalSolutionContact = { + __typename: 'PossibleOperationalSolutionContact'; + createdBy: Scalars['UUID']['output']; + createdByUserAccount: UserAccount; + createdDts: Scalars['Time']['output']; + email: Scalars['String']['output']; + id: Scalars['UUID']['output']; + isTeam: Scalars['Boolean']['output']; + modifiedBy?: Maybe; + modifiedByUserAccount?: Maybe; + modifiedDts?: Maybe; + name: Scalars['String']['output']; + possibleOperationalSolutionID: Scalars['Int']['output']; + role?: Maybe; +}; + export type PrepareForClearance = { - __typename?: 'PrepareForClearance'; + __typename: 'PrepareForClearance'; latestClearanceDts?: Maybe; status: PrepareForClearanceStatus; }; @@ -2185,7 +2205,7 @@ export enum ProviderLeaveType { /** Query definition for the schema */ export type Query = { - __typename?: 'Query'; + __typename: 'Query'; auditChanges: Array; crTdl: PlanCrTdl; currentUser: CurrentUser; @@ -2474,7 +2494,7 @@ export enum StakeholdersType { } export type Subscription = { - __typename?: 'Subscription'; + __typename: 'Subscription'; onLockTaskListSectionContext: TaskListSectionLockStatusChanged; onTaskListSectionLocksChanged: TaskListSectionLockStatusChanged; }; @@ -2500,7 +2520,7 @@ export enum TaskListSection { } export type TaskListSectionLockStatus = { - __typename?: 'TaskListSectionLockStatus'; + __typename: 'TaskListSectionLockStatus'; isAssessment: Scalars['Boolean']['output']; lockedByUserAccount: UserAccount; modelPlanID: Scalars['UUID']['output']; @@ -2508,7 +2528,7 @@ export type TaskListSectionLockStatus = { }; export type TaskListSectionLockStatusChanged = { - __typename?: 'TaskListSectionLockStatusChanged'; + __typename: 'TaskListSectionLockStatusChanged'; actionType: ActionType; changeType: ChangeType; lockStatus: TaskListSectionLockStatus; @@ -2561,7 +2581,7 @@ export type UpdateOperationalSolutionSubtaskInput = { }; export type UserAccount = { - __typename?: 'UserAccount'; + __typename: 'UserAccount'; commonName: Scalars['String']['output']; email: Scalars['String']['output']; familyName: Scalars['String']['output']; @@ -2576,7 +2596,7 @@ export type UserAccount = { /** Represents a person response from the Okta API */ export type UserInfo = { - __typename?: 'UserInfo'; + __typename: 'UserInfo'; displayName: Scalars['String']['output']; email: Scalars['String']['output']; firstName: Scalars['String']['output']; @@ -2595,21 +2615,21 @@ export type CreatReportAProblemMutationVariables = Exact<{ }>; -export type CreatReportAProblemMutation = { __typename?: 'Mutation', reportAProblem: boolean }; +export type CreatReportAProblemMutation = { __typename: 'Mutation', reportAProblem: boolean }; export type CreatSendFeedbackMutationVariables = Exact<{ input: SendFeedbackEmailInput; }>; -export type CreatSendFeedbackMutation = { __typename?: 'Mutation', sendFeedbackEmail: boolean }; +export type CreatSendFeedbackMutation = { __typename: 'Mutation', sendFeedbackEmail: boolean }; export type GetFundingQueryVariables = Exact<{ id: Scalars['UUID']['input']; }>; -export type GetFundingQuery = { __typename?: 'Query', modelPlan: { __typename?: 'ModelPlan', id: UUID, modelName: string, payments: { __typename?: 'PlanPayments', id: UUID, fundingSource: Array, fundingSourceTrustFundType: Array, fundingSourceOther?: string | null, fundingSourceNote?: string | null, fundingSourceR: Array, fundingSourceRTrustFundType: Array, fundingSourceROther?: string | null, fundingSourceRNote?: string | null, payRecipients: Array, payRecipientsOtherSpecification?: string | null, payRecipientsNote?: string | null, payType: Array, payTypeNote?: string | null, payClaims: Array }, operationalNeeds: Array<{ __typename?: 'OperationalNeed', modifiedDts?: Time | null }> } }; +export type GetFundingQuery = { __typename: 'Query', modelPlan: { __typename: 'ModelPlan', id: UUID, modelName: string, payments: { __typename: 'PlanPayments', id: UUID, fundingSource: Array, fundingSourceTrustFundType: Array, fundingSourceOther?: string | null, fundingSourceNote?: string | null, fundingSourceR: Array, fundingSourceRTrustFundType: Array, fundingSourceROther?: string | null, fundingSourceRNote?: string | null, payRecipients: Array, payRecipientsOtherSpecification?: string | null, payRecipientsNote?: string | null, payType: Array, payTypeNote?: string | null, payClaims: Array }, operationalNeeds: Array<{ __typename: 'OperationalNeed', modifiedDts?: Time | null }> } }; export type UpdatePaymentsMutationVariables = Exact<{ id: Scalars['UUID']['input']; @@ -2617,7 +2637,7 @@ export type UpdatePaymentsMutationVariables = Exact<{ }>; -export type UpdatePaymentsMutation = { __typename?: 'Mutation', updatePlanPayments: { __typename?: 'PlanPayments', id: UUID } }; +export type UpdatePaymentsMutation = { __typename: 'Mutation', updatePlanPayments: { __typename: 'PlanPayments', id: UUID } }; export type CreateShareModelPlanMutationVariables = Exact<{ modelPlanID: Scalars['UUID']['input']; @@ -2627,12 +2647,17 @@ export type CreateShareModelPlanMutationVariables = Exact<{ }>; -export type CreateShareModelPlanMutation = { __typename?: 'Mutation', shareModelPlan: boolean }; +export type CreateShareModelPlanMutation = { __typename: 'Mutation', shareModelPlan: boolean }; + +export type GetPossibleSolutionsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GetPossibleSolutionsQuery = { __typename: 'Query', possibleOperationalSolutions: Array<{ __typename: 'PossibleOperationalSolution', id: number, key: OperationalSolutionKey, pointsOfContact: Array<{ __typename: 'PossibleOperationalSolutionContact', id: UUID, name: string, email: string, isTeam: boolean, role?: string | null }> }> }; export type GetNdaQueryVariables = Exact<{ [key: string]: never; }>; -export type GetNdaQuery = { __typename?: 'Query', ndaInfo: { __typename?: 'NDAInfo', agreed: boolean, agreedDts?: Time | null } }; +export type GetNdaQuery = { __typename: 'Query', ndaInfo: { __typename: 'NDAInfo', agreed: boolean, agreedDts?: Time | null } }; export const CreatReportAProblemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreatReportAProblem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ReportAProblemInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"reportAProblem"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; @@ -2640,4 +2665,5 @@ export const CreatSendFeedbackDocument = {"kind":"Document","definitions":[{"kin export const GetFundingDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetFunding"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"modelPlan"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"payments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fundingSource"}},{"kind":"Field","name":{"kind":"Name","value":"fundingSourceTrustFundType"}},{"kind":"Field","name":{"kind":"Name","value":"fundingSourceOther"}},{"kind":"Field","name":{"kind":"Name","value":"fundingSourceNote"}},{"kind":"Field","name":{"kind":"Name","value":"fundingSourceR"}},{"kind":"Field","name":{"kind":"Name","value":"fundingSourceRTrustFundType"}},{"kind":"Field","name":{"kind":"Name","value":"fundingSourceROther"}},{"kind":"Field","name":{"kind":"Name","value":"fundingSourceRNote"}},{"kind":"Field","name":{"kind":"Name","value":"payRecipients"}},{"kind":"Field","name":{"kind":"Name","value":"payRecipientsOtherSpecification"}},{"kind":"Field","name":{"kind":"Name","value":"payRecipientsNote"}},{"kind":"Field","name":{"kind":"Name","value":"payType"}},{"kind":"Field","name":{"kind":"Name","value":"payTypeNote"}},{"kind":"Field","name":{"kind":"Name","value":"payClaims"}}]}},{"kind":"Field","name":{"kind":"Name","value":"operationalNeeds"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"modifiedDts"}}]}}]}}]}}]} as unknown as DocumentNode; export const UpdatePaymentsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdatePayments"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"changes"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PlanPaymentsChanges"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updatePlanPayments"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"changes"},"value":{"kind":"Variable","name":{"kind":"Name","value":"changes"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; export const CreateShareModelPlanDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateShareModelPlan"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"modelPlanID"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ModelViewFilter"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"receiverEmails"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"optionalMessage"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"shareModelPlan"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"modelPlanID"},"value":{"kind":"Variable","name":{"kind":"Name","value":"modelPlanID"}}},{"kind":"Argument","name":{"kind":"Name","value":"viewFilter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewFilter"}}},{"kind":"Argument","name":{"kind":"Name","value":"receiverEmails"},"value":{"kind":"Variable","name":{"kind":"Name","value":"receiverEmails"}}},{"kind":"Argument","name":{"kind":"Name","value":"optionalMessage"},"value":{"kind":"Variable","name":{"kind":"Name","value":"optionalMessage"}}}]}]}}]} as unknown as DocumentNode; +export const GetPossibleSolutionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetPossibleSolutions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"possibleOperationalSolutions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"pointsOfContact"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"isTeam"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]}}]} as unknown as DocumentNode; export const GetNdaDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetNDA"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ndaInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"agreed"}},{"kind":"Field","name":{"kind":"Name","value":"agreedDts"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/src/hooks/useHelpSolutions.ts b/src/hooks/useHelpSolutions.ts new file mode 100644 index 0000000000..f6971d83f1 --- /dev/null +++ b/src/hooks/useHelpSolutions.ts @@ -0,0 +1,46 @@ +// Hook to fetch solution contacts and map to FE help solution map + +import { useMemo } from 'react'; +import GetPossibleSolutions from 'gql/apolloGQL/Solutions/GetPossibleSolutions'; +import { GetPossibleSolutionsQuery } from 'gql/gen/graphql'; + +import { + HelpSolutionBaseType, + helpSolutions, + HelpSolutionType +} from 'views/HelpAndKnowledge/SolutionsHelp/solutionsMap'; + +import useCacheQuery from './useCacheQuery'; + +export const mapContactsToSolutions = ( + solutions: HelpSolutionBaseType[], + contactSolutions: GetPossibleSolutionsQuery['possibleOperationalSolutions'] +): HelpSolutionType[] => { + return solutions.map(solution => { + // Find fetch possible solution that corresponds to the FE `enum` mapped solution + const foundSolution = contactSolutions?.find( + contactSolution => solution.enum === contactSolution.key + ); + + // Add fetch pointsOfContact field to existing FE solution map + return { + ...solution, + pointsOfContact: foundSolution?.pointsOfContact + }; + }); +}; + +const useHelpSolution = (): HelpSolutionType[] => { + const { data } = useCacheQuery(GetPossibleSolutions); + + const helpSolutionsWithContacts = useMemo(() => { + return mapContactsToSolutions( + helpSolutions, + data?.possibleOperationalSolutions || [] + ); + }, [data?.possibleOperationalSolutions]); + + return helpSolutionsWithContacts; +}; + +export default useHelpSolution; diff --git a/src/hooks/useModalSolutionState.ts b/src/hooks/useModalSolutionState.ts index dd2c0639f1..46860d0fbf 100644 --- a/src/hooks/useModalSolutionState.ts +++ b/src/hooks/useModalSolutionState.ts @@ -6,10 +6,9 @@ import { useLocation } from 'react-router-dom'; import usePrevLocation from 'hooks/usePrevious'; import { findSolutionByRouteParam } from 'views/HelpAndKnowledge/SolutionsHelp'; -import { - helpSolutions, - HelpSolutionType -} from 'views/HelpAndKnowledge/SolutionsHelp/solutionsMap'; +import { HelpSolutionType } from 'views/HelpAndKnowledge/SolutionsHelp/solutionsMap'; + +import useHelpSolution from './useHelpSolutions'; type SolutionModalState = { prevPathname: string; @@ -22,6 +21,8 @@ const useModalSolutionState = ( ): SolutionModalState => { const location = useLocation(); + const helpSolutions = useHelpSolution(); + const params = new URLSearchParams(location.search); const solutionDetail = params.get('solution'); diff --git a/src/setupTests.ts b/src/setupTests.ts index e3a08b33c8..bfd6c88951 100644 --- a/src/setupTests.ts +++ b/src/setupTests.ts @@ -9,3 +9,8 @@ configure({ adapter: new Adapter() }); // Fill in some missing functions that aren't shimmed by jsdom. window.URL.createObjectURL = vi.fn(); + +// Fill in some scroll functions +// Usually for alerts and form field attention +window.scroll = vi.fn; +Element.prototype.scrollIntoView = vi.fn; diff --git a/src/types/graphql-global-types.ts b/src/types/graphql-global-types.ts index bf0f661fc6..27370d202a 100644 --- a/src/types/graphql-global-types.ts +++ b/src/types/graphql-global-types.ts @@ -389,11 +389,13 @@ export enum OperationalSolutionKey { INNOVATION = "INNOVATION", INTERNAL_STAFF = "INTERNAL_STAFF", IPC = "IPC", + ISP = "ISP", LDG = "LDG", LOI = "LOI", LV = "LV", MARX = "MARX", MDM = "MDM", + MIDS = "MIDS", OTHER_NEW_PROCESS = "OTHER_NEW_PROCESS", OUTLOOK_MAILBOX = "OUTLOOK_MAILBOX", POST_PORTAL = "POST_PORTAL", diff --git a/src/views/Feedback/ReportAProblem/index.test.tsx b/src/views/Feedback/ReportAProblem/index.test.tsx index 67425b10f6..d9abfd673b 100644 --- a/src/views/Feedback/ReportAProblem/index.test.tsx +++ b/src/views/Feedback/ReportAProblem/index.test.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { MemoryRouter, Route } from 'react-router-dom'; -import { MockedProvider } from '@apollo/client/testing'; import { render, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import CreateReportAProblem from 'gql/apolloGQL/Feedback/CreateReportAProblem'; import { ReportAProblemSection, ReportAProblemSeverity } from 'gql/gen/graphql'; +import VerboseMockedProvider from 'utils/testing/MockedProvider'; + import ReportAProblem from '.'; const mocks = [ @@ -21,7 +22,7 @@ const mocks = [ whatDoing: 'Nothing much', whatWentWrong: 'Everything', severity: ReportAProblemSeverity.DELAYED_TASK, - severityOther: null + severityOther: '' } } }, @@ -33,14 +34,16 @@ const mocks = [ } ]; +window.scrollTo = vi.fn; + describe('Report a problem form', () => { it('submits the "Report a problem" form successfully', async () => { const { findByText, getByRole, getByTestId } = render( - + - + ); @@ -79,9 +82,9 @@ describe('Report a problem form', () => { const { asFragment } = render( - + - + ); diff --git a/src/views/HelpAndKnowledge/Articles/HighLevelProjectPlan/index.test.tsx b/src/views/HelpAndKnowledge/Articles/HighLevelProjectPlan/index.test.tsx index 55f75c6eb0..ca931ee7ce 100644 --- a/src/views/HelpAndKnowledge/Articles/HighLevelProjectPlan/index.test.tsx +++ b/src/views/HelpAndKnowledge/Articles/HighLevelProjectPlan/index.test.tsx @@ -2,8 +2,13 @@ import React from 'react'; import { MemoryRouter, Route } from 'react-router-dom'; import { render } from '@testing-library/react'; +import { possibleSolutionsMock } from 'data/mock/solutions'; +import VerboseMockedProvider from 'utils/testing/MockedProvider'; + import HighLevelProjectPlan from '.'; +const mocks = [...possibleSolutionsMock]; + describe('High Level Project Plan Article', () => { it('matches snapshot', async () => { const { asFragment } = render( @@ -11,7 +16,9 @@ describe('High Level Project Plan Article', () => { initialEntries={['/help-and-knowledge/high-level-project-plan']} > - + + + ); diff --git a/src/views/HelpAndKnowledge/Articles/HighLevelProjectPlan/index.tsx b/src/views/HelpAndKnowledge/Articles/HighLevelProjectPlan/index.tsx index fd381ac3a5..2ff8f4efef 100644 --- a/src/views/HelpAndKnowledge/Articles/HighLevelProjectPlan/index.tsx +++ b/src/views/HelpAndKnowledge/Articles/HighLevelProjectPlan/index.tsx @@ -15,10 +15,10 @@ import MainContent from 'components/MainContent'; import PageHeading from 'components/PageHeading'; import RelatedArticles from 'components/RelatedArticles'; import ExternalLink from 'components/shared/ExternalLink'; +import useHelpSolution from 'hooks/useHelpSolutions'; import useModalSolutionState from 'hooks/useModalSolutionState'; import { findSolutionByRouteParam } from 'views/HelpAndKnowledge/SolutionsHelp'; import SolutionDetailsModal from 'views/HelpAndKnowledge/SolutionsHelp/SolutionDetails/Modal'; -import { helpSolutions } from 'views/HelpAndKnowledge/SolutionsHelp/solutionsMap'; import Table from './table'; @@ -34,6 +34,8 @@ const HighLevelProjectPlan = () => { const { t: highLevelT } = useTranslation('highLevelProjectPlans'); const { t: generalT } = useTranslation('general'); + const helpSolutions = useHelpSolution(); + const { prevPathname, selectedSolution: solution } = useModalSolutionState( null ); diff --git a/src/views/HelpAndKnowledge/Articles/SixPagerMeeting/index.test.tsx b/src/views/HelpAndKnowledge/Articles/SixPagerMeeting/index.test.tsx index fced3c7707..9cd21f8712 100644 --- a/src/views/HelpAndKnowledge/Articles/SixPagerMeeting/index.test.tsx +++ b/src/views/HelpAndKnowledge/Articles/SixPagerMeeting/index.test.tsx @@ -2,13 +2,20 @@ import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { render } from '@testing-library/react'; +import { possibleSolutionsMock } from 'data/mock/solutions'; +import VerboseMockedProvider from 'utils/testing/MockedProvider'; + import SixPagerMeeting from './index'; +const mocks = [...possibleSolutionsMock]; + describe('SixPagerMeeting', () => { it('matches the snapshot', () => { const { asFragment } = render( - + + + ); expect(asFragment()).toMatchSnapshot(); diff --git a/src/views/HelpAndKnowledge/SolutionsHelp/SolutionDetails/Modal/index.tsx b/src/views/HelpAndKnowledge/SolutionsHelp/SolutionDetails/Modal/index.tsx index ef238b2b7e..8901f93893 100644 --- a/src/views/HelpAndKnowledge/SolutionsHelp/SolutionDetails/Modal/index.tsx +++ b/src/views/HelpAndKnowledge/SolutionsHelp/SolutionDetails/Modal/index.tsx @@ -160,7 +160,7 @@ const SolutionDetailsModal = ({ paramActive /> - + - + )} diff --git a/src/views/HelpAndKnowledge/SolutionsHelp/SolutionDetails/PointsOfContact/__snapshots__/index.test.tsx.snap b/src/views/HelpAndKnowledge/SolutionsHelp/SolutionDetails/PointsOfContact/__snapshots__/index.test.tsx.snap index 0353ed5072..7afa9a700e 100644 --- a/src/views/HelpAndKnowledge/SolutionsHelp/SolutionDetails/PointsOfContact/__snapshots__/index.test.tsx.snap +++ b/src/views/HelpAndKnowledge/SolutionsHelp/SolutionDetails/PointsOfContact/__snapshots__/index.test.tsx.snap @@ -9,6 +9,12 @@ exports[`IT Solutions Points of Contact Components > matches the snapshot > 4inn Points of contact
+
+

+ System owner +

  • matches the snapshot > 4inn class="usa-card__container radius-md padding-2 margin-bottom-2 margin-x-0" >
    -

    - 4i/ACO-OS Team -

    + Office of Information Technology
    -
  • - -
  • -
    -

    - Aparna Vyas + Enterprise Systems Solutions Group, Division of Applications Development and Support

    -
    - -
  • +
    +

    + Contractors +

  • matches the snapshot > 4inn class="usa-card__container radius-md padding-2 margin-bottom-2 margin-x-0" >
    -

    - Ashley Corbin -

    + Innovative Design, Development, and Operations Contract (IDDOC)
    - -
  • - -
  • -
    -

    - Nora Fleming + Softrams

    -
    - -
  • +
    + + +`; + +exports[`IT Solutions Points of Contact Components > matches the snapshot > Accountable Care Organization - Operational System 1`] = ` + +
    +

    + Points of contact +

    +
    @@ -290,7 +152,7 @@ exports[`IT Solutions Points of Contact Components > matches the snapshot > 4inn `; -exports[`IT Solutions Points of Contact Components > matches the snapshot > Accountable Care Organization - Operational System 1`] = ` +exports[`IT Solutions Points of Contact Components > matches the snapshot > Automated Plan Payment System 1`] = `

    matches the snapshot > Acco Points of contact

    +
    +

    + System owner +

  • matches the snapshot > Acco class="usa-card__container radius-md padding-2 margin-bottom-2 margin-x-0" >
    -

    - 4i/ACO-OS Team -

    + Center for Medicare
    - - ACO-OIT@cms.hhs.gov - - - - - + Medicare Plan Payment Group, Division of Payment Operations +
  • +
    +
    +
    +`; + +exports[`IT Solutions Points of Contact Components > matches the snapshot > Beneficiary Claims Data API 1`] = ` + +
    +

    + Points of contact +

    +
    +
    +

    + System owner +

  • matches the snapshot > Acco class="usa-card__container radius-md padding-2 margin-bottom-2 margin-x-0" >
    -

    - Aparna Vyas -

    + Office of Enterprise Data and Analytics
    -
  • +
    +
    +
    +`; + +exports[`IT Solutions Points of Contact Components > matches the snapshot > CMS Box 1`] = ` + +
    +

    + Points of contact +

    +
    +
    + +`; + +exports[`IT Solutions Points of Contact Components > matches the snapshot > CMS Qualtrics 1`] = ` + +
    +

    + Points of contact +

    +
    +
    + +`; + +exports[`IT Solutions Points of Contact Components > matches the snapshot > CPI Vetting 1`] = ` + +
    +

    + Points of contact +

    +
    +
    + +`; + +exports[`IT Solutions Points of Contact Components > matches the snapshot > Centralized Data Exchange 1`] = ` + +
    +

    + Points of contact +

    +
    +
    +

    + System owner +

  • matches the snapshot > Acco class="usa-card__container radius-md padding-2 margin-bottom-2 margin-x-0" >
    -

    - Ashley Corbin -

    + Center for Medicare and Medicaid Innovation
    -
  • +
    +

    + Contractors +

  • matches the snapshot > Acco class="usa-card__container radius-md padding-2 margin-bottom-2 margin-x-0" >
    -

    - Nora Fleming -

    + Innovation Support Platform (ISP)
    -
  • +
    +
    +
    +`; + +exports[`IT Solutions Points of Contact Components > matches the snapshot > Chronic Conditions Warehouse 1`] = ` + +
    +

    + Points of contact +

    +
    @@ -530,7 +383,7 @@ exports[`IT Solutions Points of Contact Components > matches the snapshot > Acco class="usa-card__header font-body-xs padding-0" data-testid="CardHeader" > - Office of Information Technology + Office of Enterprise Data and Analytics
    @@ -561,7 +414,7 @@ exports[`IT Solutions Points of Contact Components > matches the snapshot > Acco class="usa-card__header font-body-xs padding-0" data-testid="CardHeader" > - Innovative Design, Development, and Operations Contract (IDDOC) + CMMI Technology Solution (CTS)