-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2097 from navikt/TOLK-2483-frilanstolk-fravær
Tolk 2483 frilanstolk fravær
- Loading branch information
Showing
22 changed files
with
1,415 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...lanceCalendar/lwc/hot_calendar_absence_modal/__tests__/hot_calendar_absence_modal.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { createElement } from 'lwc'; | ||
import Hot_calendar_absence_modal from 'c/hot_calendar_absence_modal'; | ||
|
||
describe('c-hot-calendar-absence-modal', () => { | ||
afterEach(() => { | ||
// The jsdom instance is shared across test cases in a single file so reset the DOM | ||
while (document.body.firstChild) { | ||
document.body.removeChild(document.body.firstChild); | ||
} | ||
}); | ||
|
||
it('TODO: test case generated by CLI command, please fill in test logic', () => { | ||
// Arrange | ||
const element = createElement('c-hot-calendar-absence-modal', { | ||
is: Hot_calendar_absence_modal | ||
}); | ||
|
||
// Act | ||
document.body.appendChild(element); | ||
|
||
// Assert | ||
// const div = element.shadowRoot.querySelector('div'); | ||
expect(1).toBe(1); | ||
}); | ||
}); |
35 changes: 35 additions & 0 deletions
35
...-app/main/freelanceCalendar/lwc/hot_calendar_absence_modal/hot_calendar_absence_modal.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.button-container { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
flex-wrap: wrap; | ||
} | ||
.cancel-button { | ||
padding-top: 0.5rem; | ||
padding-bottom: 0.5rem; | ||
padding-left: 3rem; | ||
padding-right: 3rem; | ||
} | ||
.custom-button { | ||
margin-bottom: 0.25rem; | ||
margin-left: 0.25rem; | ||
padding-top: 0.5rem; | ||
padding-bottom: 0.5rem; | ||
padding-left: 2rem; | ||
padding-right: 2rem; | ||
} | ||
.modal-container { | ||
position: relative; | ||
} | ||
|
||
.spinner-wrapper { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
z-index: 1000; | ||
} |
79 changes: 79 additions & 0 deletions
79
...app/main/freelanceCalendar/lwc/hot_calendar_absence_modal/hot_calendar_absence_modal.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<template> | ||
<div class="modal-container"> | ||
<template if:true={isLoading}> | ||
<div class="spinner-wrapper"> | ||
<lightning-spinner alternative-text="Loading" size="large"></lightning-spinner> | ||
</div> | ||
</template> | ||
<template lwc:if={isEdit}> | ||
<lightning-modal-header label="Endre/Slett fravær"></lightning-modal-header> | ||
<lightning-modal-body> | ||
<lightning-radio-group | ||
name="radioGroup" | ||
lwc:ref="absenceTypeRadioGroup" | ||
label="Type fravær" | ||
options={options} | ||
value={absenceType} | ||
type="radio" | ||
> | ||
</lightning-radio-group> | ||
<lightning-input | ||
type="datetime" | ||
name="input1" | ||
lwc:ref="absenceStartDateTimeInput" | ||
label="Legg inn ny start dato/tid" | ||
value={absenceStart} | ||
></lightning-input> | ||
<lightning-input | ||
type="datetime" | ||
name="input2" | ||
lwc:ref="absenceEndDateTimeInput" | ||
label="Legg inn ny slutt dato/tid" | ||
value={absenceEnd} | ||
></lightning-input> | ||
</lightning-modal-body> | ||
<lightning-modal-footer> | ||
<div class="button-container"> | ||
<button | ||
class="slds-button slds-button_destructive cancel-button custom-button" | ||
onclick={handleDeleteAbsence} | ||
> | ||
Slett | ||
</button> | ||
<button class="slds-button slds-button_brand custom-button" onclick={handleOkay}>Endre</button> | ||
</div> | ||
</lightning-modal-footer> | ||
</template> | ||
<template lwc:else> | ||
<lightning-modal-header label="Registrer nytt fravær"></lightning-modal-header> | ||
<lightning-modal-body> | ||
<lightning-radio-group | ||
name="radioGroup" | ||
lwc:ref="absenceTypeRadioGroup" | ||
label="Type fravær" | ||
options={options} | ||
value={value} | ||
type="radio" | ||
> | ||
</lightning-radio-group> | ||
<lightning-input | ||
type="datetime" | ||
name="input1" | ||
lwc:ref="absenceStartDateTimeInput" | ||
label="Legg inn start dato/tid" | ||
value={absenceStart} | ||
></lightning-input> | ||
<lightning-input | ||
type="datetime" | ||
name="input2" | ||
lwc:ref="absenceEndDateTimeInput" | ||
label="Legg inn slutt dato/tid" | ||
value={absenceEnd} | ||
></lightning-input> | ||
</lightning-modal-body> | ||
<lightning-modal-footer> | ||
<lightning-button variant="brand" label="Registrer" onclick={handleOkay}></lightning-button> | ||
</lightning-modal-footer> | ||
</template> | ||
</div> | ||
</template> |
Oops, something went wrong.