Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

RAiD GUI: Login-Loop #88

Open
matthewsaum opened this issue Nov 14, 2024 · 1 comment
Open

RAiD GUI: Login-Loop #88

matthewsaum opened this issue Nov 14, 2024 · 1 comment

Comments

@matthewsaum
Copy link

Good Morning ARDC Team,

I've got the test environment of the GUI up and running, and I get caught in a bit of a login-loop.
https://raid.surf.nl is online and operational! But when I go to the Google Login button, use my account and password, All it does is successfully loop back to the login page. Watching the network tab of my browser debug console just ends with "token" and never really errors out anywhere. Am I missing something here? I see my email username get created in keycloak, I manually tagged my group and the roles required.

I'm happy to grant your team access as well if I see you pop up with a user-request.

Regards
Matthew

@matthewsaum
Copy link
Author

Ah, also, to show some system info.

[raid1]:/opt/raid
[main|+3]
raidsurf$ git remote -v
origin  https://github.com/au-research/raido (fetch)
origin  https://github.com/au-research/raido (push)

[raid1]:/opt/raid
[main|+3]
raidsurf$ git pull --prune
Already up to date.

[raid1]:/opt/raid
[main|+3]
raidsurf$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   api-svc/db/build.gradle
        modified:   api-svc/raid-api/src/main/resources/application.yaml
        modified:   raid-agency-app/package-lock.json

no changes added to commit (use "git add" and/or "git commit -a")

Everything on recent pulls from main branch. but turns out if i try to run the npm run build for the GUI, I definitely see some weird errors.

[raid1]:/opt/raid/raid-agency-app
[main|+3]
raidsurf$ npm install

up to date, audited 791 packages in 2s

135 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

[raid1]:/opt/raid/raid-agency-app
[main|+3]
raidsurf$ npm run build

> [email protected] build
> tsc && vite build

src/entities/access/display-components/AccessDisplayComponent.tsx:28:13 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

28             value={
               ~~~~~

  src/components/DisplayItem.tsx:14:5
    14     value: string | undefined;
           ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & { label: string; value: string | undefined; width: number; link?: string | null | undefined; }'

src/entities/access/display-components/AccessDisplayComponent.tsx:29:28 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

29               mapping.find((el: MappingElement) => el.id === access.type.id)
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/entities/contributor-position/display-components/ContributorPositionItem.tsx:14:5 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

14     (el: MappingElement) => el.id === contributorPosition.id
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/entities/contributor-position/display-components/ContributorPositionItem.tsx:18:34 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

18       <DisplayItem label="Title" value={contributorPositionLabel} width={6} />
                                    ~~~~~

  src/components/DisplayItem.tsx:14:5
    14     value: string | undefined;
           ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & { label: string; value: string | undefined; width: number; link?: string | null | undefined; }'

src/entities/contributor/display-components/ContributorDisplayComponent.tsx:25:5 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

25     (el: MappingElement) => el.id === contributor.position[0].id
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/entities/contributor/display-components/ContributorDisplayComponent.tsx:32:35 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

32         <DisplayItem label="Type" value={contributorType} width={3} />
                                     ~~~~~

  src/components/DisplayItem.tsx:14:5
    14     value: string | undefined;
           ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & { label: string; value: string | undefined; width: number; link?: string | null | undefined; }'

src/entities/description/display-components/DescriptionDisplayComponent.tsx:29:5 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

29     (el: MappingElement) => el.id === description?.type.id
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/entities/description/display-components/DescriptionDisplayComponent.tsx:35:33 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

35       <DisplayItem label="Type" value={descriptionType} width={3} />
                                   ~~~~~

  src/components/DisplayItem.tsx:14:5
    14     value: string | undefined;
           ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & { label: string; value: string | undefined; width: number; link?: string | null | undefined; }'

src/entities/organisation/child-component/display-components/OrganisationRoleItem.tsx:9:5 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

9     (el: MappingElement) => el.id === item.id
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/entities/organisation/child-component/display-components/OrganisationRoleItem.tsx:13:34 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

13       <DisplayItem label="Title" value={itemPositionLabel} width={6} />
                                    ~~~~~

  src/components/DisplayItem.tsx:14:5
    14     value: string | undefined;
           ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & { label: string; value: string | undefined; width: number; link?: string | null | undefined; }'

src/entities/related-object/display-components/RelatedObjectsDisplayComponent.tsx:28:5 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

28     (el: MappingElement) => el.id === relatedObject?.type?.id
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/entities/related-object/display-components/RelatedObjectsDisplayComponent.tsx:34:11 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

34           (el: MappingElement) => el.id === relatedObject?.category![0]?.id
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/entities/related-object/display-components/RelatedObjectsDisplayComponent.tsx:46:33 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

46       <DisplayItem label="Type" value={relatedObjectType} width={4} />
                                   ~~~~~

  src/components/DisplayItem.tsx:14:5
    14     value: string | undefined;
           ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & { label: string; value: string | undefined; width: number; link?: string | null | undefined; }'

src/entities/related-object/display-components/RelatedObjectsDisplayComponent.tsx:47:37 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

47       <DisplayItem label="Category" value={relatedObjectCategory} width={4} />
                                       ~~~~~

  src/components/DisplayItem.tsx:14:5
    14     value: string | undefined;
           ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & { label: string; value: string | undefined; width: number; link?: string | null | undefined; }'

src/entities/related-raid/display-components/RelatedRaidDisplayComponent.tsx:43:9 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

43         value={
           ~~~~~

  src/components/DisplayItem.tsx:14:5
    14     value: string | undefined;
           ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & { label: string; value: string | undefined; width: number; link?: string | null | undefined; }'

src/entities/related-raid/display-components/RelatedRaidDisplayComponent.tsx:44:24 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

44           mapping.find((el: MappingElement) => el.id === item.type?.id)?.value
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/entities/title/display-components/TitleDisplayComponent.tsx:28:5 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

28     (el: MappingElement) => el.id === title.type.id
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/entities/title/display-components/TitleDisplayComponent.tsx:34:33 - error TS2322: Type 'string | null | undefined' is not assignable to type 'string | undefined'.
  Type 'null' is not assignable to type 'string | undefined'.

34       <DisplayItem label="Type" value={titleType} width={3} />
                                   ~~~~~

  src/components/DisplayItem.tsx:14:5
    14     value: string | undefined;
           ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IntrinsicAttributes & { label: string; value: string | undefined; width: number; link?: string | null | undefined; }'

src/forms/RaidForm/components/FormOrganisationsRolesComponent.tsx:144:43 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

144                                           (el: MappingElement) =>
                                              ~~~~~~~~~~~~~~~~~~~~~~~
145                                             el.id === role.uri
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/pages/ShowRaidPage/components/ShowContributorComponent.tsx:82:29 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

82                             (el: MappingElement) =>
                               ~~~~~~~~~~~~~~~~~~~~~~~
83                               el.id === (row.id as unknown as string)
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


src/pages/ShowRaidPage/components/ShowContributorComponent.tsx:176:31 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => value is { ...; } | ... 2 more ... | { ...; }, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.
  Overload 2 of 2, '(predicate: (value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { ...; })[]) => unknown, thisArg?: any): { ...; } | ... 3 more ... | undefined', gave the following error.
    Argument of type '(el: MappingElement) => boolean' is not assignable to parameter of type '(value: { id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }, index: number, obj: ({ ...; } | ... 2 more ... | { .....'.
      Types of parameters 'el' and 'value' are incompatible.
        Type '{ id: string; value: null; field: string; definition: null; source: string; } | { id: string; value: string; field: string; definition: string; source: string; } | { id: string; value: null; field: string; definition: string; source: string; } | { ...; }' is not assignable to type 'MappingElement'.
          Type '{ id: string; value: null; field: string; definition: null; source: string; }' is not assignable to type 'MappingElement'.
            Types of property 'value' are incompatible.
              Type 'null' is not assignable to type 'string'.

176                               (el: MappingElement) =>
                                  ~~~~~~~~~~~~~~~~~~~~~~~
177                                 el.id ===
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
178                                 (contributor.position[0]
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
179                                   .id as unknown as string)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Found 21 errors in 10 files.

Errors  Files
     2  src/entities/access/display-components/AccessDisplayComponent.tsx:28
     2  src/entities/contributor-position/display-components/ContributorPositionItem.tsx:14
     2  src/entities/contributor/display-components/ContributorDisplayComponent.tsx:25
     2  src/entities/description/display-components/DescriptionDisplayComponent.tsx:29
     2  src/entities/organisation/child-component/display-components/OrganisationRoleItem.tsx:9
     4  src/entities/related-object/display-components/RelatedObjectsDisplayComponent.tsx:28
     2  src/entities/related-raid/display-components/RelatedRaidDisplayComponent.tsx:43
     2  src/entities/title/display-components/TitleDisplayComponent.tsx:28
     1  src/forms/RaidForm/components/FormOrganisationsRolesComponent.tsx:144
     2  src/pages/ShowRaidPage/components/ShowContributorComponent.tsx:82

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

No branches or pull requests

1 participant