-
Notifications
You must be signed in to change notification settings - Fork 31
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
Conversation
petterhj
commented
Sep 6, 2023


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGAABSISPTM!
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; | ||
}, |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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. 😜
startDate: { | ||
type: [Date, Boolean], | ||
required: false, | ||
default: null, | ||
}, | ||
endDate: { | ||
type: [Date, Boolean], | ||
required: false, | ||
default: null, | ||
}, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, riktig
span { | ||
display: block; | ||
} |
There was a problem hiding this comment.
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?
654fcb5
to
e7b630a
Compare