Skip to content

feat: implement UI to add experience to member #307 - #830

Open
Thirusiga wants to merge 44 commits into
mainfrom
feature/307-implement-ui-to-add-experience-to-member
Open

feat: implement UI to add experience to member #307#830
Thirusiga wants to merge 44 commits into
mainfrom
feature/307-implement-ui-to-add-experience-to-member

Conversation

@Thirusiga

Copy link
Copy Markdown
Collaborator

No description provided.

@Thirusiga Thirusiga self-assigned this Aug 24, 2026
@Thirusiga Thirusiga linked an issue Aug 24, 2026 that may be closed by this pull request
5 tasks
@github-actions

Copy link
Copy Markdown

Migration Test Results

35 tests   35 ✅  4s ⏱️
10 suites   0 💤
10 files     0 ❌

Results for commit 9c10359.

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

Frontend Test Results

  1 files  ± 0   54 suites  +1   59s ⏱️ +11s
320 tests +14  320 ✅ +14  0 💤 ±0  0 ❌ ±0 
323 runs  +14  323 ✅ +14  0 💤 ±0  0 ❌ ±0 

Results for commit a3480e6. ± Comparison against base commit ac0b848.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

Backend Test Results

764 tests   - 2   764 ✅  - 2   53s ⏱️ -5s
 66 suites ±0     0 💤 ±0 
 66 files   ±0     0 ❌ ±0 

Results for commit cd13716. ± Comparison against base commit a120187.

This pull request removes 2 tests.
ch.puzzle.pcts.service.validation.DegreeValidationServiceTest ‑ validateInvalidModel(Model, List)[10]
ch.puzzle.pcts.service.validation.ExperienceValidationServiceTest ‑ validateInvalidModel(Model, List)[11]

♻️ This comment has been updated with latest results.

@Thirusiga

Copy link
Copy Markdown
Collaborator Author

@MasterEvarior
I made changes on the new branch (#307) based on the old branch (#305) and pushed them. Should I leave it as is or revert it?

@MasterEvarior

Copy link
Copy Markdown
Collaborator

@MasterEvarior I made changes on the new branch (#307) based on the old branch (#305) and pushed them. Should I leave it as is or revert it?

Whatever is easier. In the end only the diff matters, as anything else does get squashed anyway. If you're not sure which one is easier, ask @schiltpuzzle or @lcanobbio. I am sure they can help you with that :)

@Thirusiga Thirusiga changed the title Feature/307 implement UI to add experience to member feat: implement UI to add experience to member #307 Aug 24, 2026
@Thirusiga

Copy link
Copy Markdown
Collaborator Author

I revert it :)

@MasterEvarior MasterEvarior left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks pretty good so far 🚀

I have some minor things to correct, a request for a new "feature" and some translation changes.

I have not yet looked at any tests, as they are currently still being written.

Comment thread backend/src/main/java/ch/puzzle/pcts/model/degree/Degree.java Outdated
Comment thread backend/src/main/java/ch/puzzle/pcts/model/experience/Experience.java Outdated
Comment thread frontend/public/i18n/de.json Outdated
Comment thread frontend/public/i18n/de.json Outdated
Comment thread frontend/src/app/features/experiences/add-experience/add-experience.component.ts Outdated
Comment thread frontend/public/i18n/de.json Outdated
@Thirusiga
Thirusiga force-pushed the feature/307-implement-ui-to-add-experience-to-member branch from 3d00912 to 494540c Compare August 31, 2026 13:14
@Thirusiga
Thirusiga force-pushed the feature/307-implement-ui-to-add-experience-to-member branch from cd13716 to e237bea Compare September 1, 2026 06:18
@Thirusiga
Thirusiga marked this pull request as ready for review September 1, 2026 06:37
private DegreeType degreeType;

@NotNull(message = "{attribute.not.null}")
@PastOrPresent(message = "{attribute.date.past.present}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why was this removed?

private String comment;

@NotNull(message = "{attribute.not.null}")
@PastOrPresent(message = "{attribute.date.past.present}")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

and here too?

memberDetailPage.openModalButton('add', 'experience')
.click();

modalPage.checkModalIconButtonVisible();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this method not only checks if the button is visible but also whether the button is currently focused.
either rename the method or chanage the behavior as following:
the method should only return the icon button and the actual validation should be made in here
another idea would be to create a second method checkModalIconButtonFocused and then call both so the funtionality is instantly visible at the caller level

cy.getByTestId('experienceType')
.type('Pra');

cy.get('mat-option')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

extract this into a method (smth. like selectFromAutocomplete) the method should take a fieldName , a string that should be entered in ithe input, and the name of the final element that should be selected

modalPage.checkModalIsClosed();
});
});
// test both alternative save buttons

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if you really want to hang on to this comment put it at the top of the method

comment: ['' as string | null]
});

constructor() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we did some neat simplifications in in a similar component in your last pr, look at it again and pull the changes in here

import { AddDegreeComponent } from '../../degrees/add-degree/add-degree.component';
import { DegreeService } from '../../degrees/degree.service';


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove this line

describe('isInteger', () => {
it('should return null if value is empty', () => {
const control = new FormControl('');
expect(isInteger()(control))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

call the isInteger method only one time then store the validator in a var
then only call this return value (the var) so we can avoid this ugly ...()(...) syntax

if (value === '') {
return null;
}
if ((/^-?\d+$/).test(value)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is there a significat advantage of a regex in comparision to a number parsing and check if Number is not NaN

modalSubmitMode: ModalSubmitMode.SAVE,
submittedModel: {
...experience1,
completed: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

where is this completed true coming from?
cause either it's not needed (we set the value of the form to the same var a few lines above)
otherwise there is some mechanism that updates that property that isn't the user and i want to know why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Technical Story: Implement UI to add Experience to member

3 participants