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

Add reusable period shortcut component #857

Merged
merged 3 commits into from
Sep 19, 2023
Merged

Conversation

petterhj
Copy link
Collaborator

@petterhj petterhj commented Sep 6, 2023

image image

@petterhj petterhj requested a review from a team September 6, 2023 14:25
Copy link
Collaborator

@simenheg simenheg left a comment

Choose a reason for hiding this comment

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

LGAABSISPTM!

Comment on lines 171 to 179
isSuggestedPeriod() {
if (
this.periodRange &&
this.newestObjective?.startDate &&
this.newestObjective?.endDate &&
isEqual(this.periodRange[0], this.newestObjective.startDate.toDate()) &&
isEqual(this.periodRange[1], this.newestObjective.endDate.toDate())
) {
return true;
}
return false;
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

A.K.A.

return (
  this.periodRange &&
  this.newestObjective?.startDate &&
  this.newestObjective?.endDate &&
  isEqual(this.periodRange[0], this.newestObjective.startDate.toDate()) &&
  isEqual(this.periodRange[1], this.newestObjective.endDate.toDate())
);

? ;)

@onClick="$emit('click', $event)"
>
<span class="pkt-txt-14">{{ label }}</span>
<span v-if="formattedPeriod" class="pkt-txt-12-light">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dette er smått ass, på grensen til uleselig for meg, men kanskje bare jeg som har gammelmannsøyne. 😜

Comment on lines +30 to +39
startDate: {
type: [Date, Boolean],
required: false,
default: null,
},
endDate: {
type: [Date, Boolean],
required: false,
default: null,
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Når er disse Boolean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Vi har det i alle fall i src/config/periods.js (all)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, riktig

Comment on lines 69 to 71
span {
display: block;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Like gjerne bruke <div> for dem da, siden de ikke skal være inline?

@petterhj petterhj force-pushed the period-select-shortcut branch from 654fcb5 to e7b630a Compare September 19, 2023 11:26
@petterhj petterhj merged commit 26905c2 into main Sep 19, 2023
@petterhj petterhj deleted the period-select-shortcut branch September 19, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants