Tivix / cpf

Career Progression Framework Application
0 stars 0 forks source link

[BUG] CPF Library - only first advancement level has "An example way to pass level" button. #62

Closed kellton-sarna closed 3 days ago

kellton-sarna commented 1 week ago

Actual result:

Image

Expected result:

Image

Relates to: https://github.com/Tivix/cpf/issues/30

r1skz3ro commented 3 days ago

@kellton-sarna I think with data that we have it's expected behavior. We render the An example way to pass level button only when there is a fetched project for that level that can be shown in the modal on button click.

Image

If I remove the logic and there will be always a button that opens modal it will look like this:

Image

The logic is in src/components/modules/AdvancementLevel/AdvancementLevel.tsx file, here:

            {projects.length > 0 && (
              <Button variant="link" onClick={openModal} className="w-fit text-sm">
                An example way to pass level
              </Button>
            )}