-
Notifications
You must be signed in to change notification settings - Fork 0
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
2033: Sync worklogs from invoice entry #147
2033: Sync worklogs from invoice entry #147
Conversation
80ad37b
to
4886af4
Compare
…to call controller
e5f6566
to
8131b98
Compare
/** | ||
* @throws EconomicsException | ||
*/ | ||
#[Route('/{projectId}/sync', name: 'app_invoice_entry_project_worklogs_sync', methods: ['POST'])] |
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.
Use route in project controller instead
</svg> | ||
`; | ||
|
||
fetch(this.updateUrl, { |
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.
Move to js util file
this.updateUrl = this.element.dataset.updateUrl; | ||
} | ||
|
||
syncWorklogs(e) { |
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.
Cleanup implementation so html is in the twig component and this controller just changes state of the html
let successText = syncButton.dataset.successtext; | ||
syncButton.disabled = true; | ||
syncButton.innerHTML = ` | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth="1.5" stroke="currentColor" className="size-6"> |
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.
use components/icons.html.twig instead
…onent based on its type
…oved isBillable to filter area
…f no filters is yet set
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.
Looking good.
Minor issue
@@ -1,6 +1,12 @@ | |||
<header class="w-full flex justify-between items-center"> | |||
<h1 class="page-title">{{ title }}</h1> | |||
{% if link_url|default(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.
This change requires that you change the other parts that use:
components/page-header.html.twig
otherwise, they will not display the link
cfd3b9c
to
d46cd1e
Compare
21c1145
to
2a6f11e
Compare
…re/2033-sync-worklogs-from-invoice-entry
Link to ticket
https://leantime.itkdev.dk/?tab=ticketdetails#/tickets/showTicket/2033
Description
When adding worklogs to an invoice entry, a button should be displayed to sync worklogs to the project, ensuring that all worklogs are synced when needed.
Screenshot of the result
Checklist