diff --git a/public/css/Cis4/Cis.css b/public/css/Cis4/Cis.css index b93411256..0857d5079 100644 --- a/public/css/Cis4/Cis.css +++ b/public/css/Cis4/Cis.css @@ -871,7 +871,7 @@ html { background-color: var(--fhc-background); } -.coodleCalendarTimeslotCardIcon:hover { +.coodlePrimaryHover:hover { color: var(--fhc-primary); } @@ -899,4 +899,12 @@ html { #freeBusyTable .action:hover { opacity:80%; +} + +.fhcPrimaryHover:hover { + color: var(--fhc-primary); +} + +.fhcPrimaryBorderHover:hover { + border-color: var(--fhc-primary) !important; } \ No newline at end of file diff --git a/public/js/components/Cis/Coodle/Components/CoodleSurvey.js b/public/js/components/Cis/Coodle/Components/CoodleSurvey.js index 9ef2041eb..128a8c6e1 100644 --- a/public/js/components/Cis/Coodle/Components/CoodleSurvey.js +++ b/public/js/components/Cis/Coodle/Components/CoodleSurvey.js @@ -169,6 +169,20 @@ export default { createdAt: null, timeslots: [], participants: [], + externalParticipants: [ + { + name: "Adis Posko", + email: "adis.posko@gmail.com" + }, + { + name: "Test User", + email: "test_user@gmail.com" + }, + { + name: "Someoneee Elseee", + email: "veryyy.longgggg.emailllll@gmail.com" + }, + ], }; } @@ -389,6 +403,7 @@ export default { diff --git a/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyCalendar/CoodleSurveyCalendarTimeslotCard.js b/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyCalendar/CoodleSurveyCalendarTimeslotCard.js index 47919b24e..d9e8abbb5 100644 --- a/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyCalendar/CoodleSurveyCalendarTimeslotCard.js +++ b/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyCalendar/CoodleSurveyCalendarTimeslotCard.js @@ -145,7 +145,7 @@ export default { @click="startEdit()" :title="'Edit'" type="button" - class="p-1 coodleCalendarTimeslotCardIcon" + class="p-1 fhcPrimaryHover" > @@ -153,7 +153,7 @@ export default { @click="$emit('deleteTimeslot')" :title="'Delete'" type="button" - class="p-1 coodleCalendarTimeslotCardIcon" + class="p-1 fhcPrimaryHover" > @@ -163,7 +163,7 @@ export default { @click="cancelEdit()" :title="'Cancel'" type="button" - class="p-1 coodleCalendarTimeslotCardIcon" + class="p-1 fhcPrimaryHover" > @@ -171,7 +171,7 @@ export default { @click="submitForm()" :title="'Save'" type="button" - class="p-1 coodleCalendarTimeslotCardIcon" + class="p-1 fhcPrimaryHover" > @@ -183,7 +183,7 @@ export default { @click="startEdit()" :title="'Add'" type="button" - class="coodleCalendarTimeslotCardIcon fa-solid fa-circle-plus fa-2xl" + class="fhcPrimaryHover fa-solid fa-circle-plus fa-2xl" > diff --git a/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyParticipants.js b/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyParticipants.js index 976a62fc6..dde993eca 100644 --- a/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyParticipants.js +++ b/public/js/components/Cis/Coodle/Components/CoodleSurvey/CoodleSurveyParticipants.js @@ -7,13 +7,18 @@ export default { components: {}, props: { participantsModelValue: Array, + externalParticipantsModelValue: Array, participantScheduleColorsModelValue: Array, authInfo: { type: Object | null }, }, emits: [ "update:participantsModelValue", + "update:externalParticipantsModelValue", "update:participantScheduleColorsModelValue", ], + inject: { + isMobile: "isMobile", + }, data() { return { searchInput: "", @@ -42,6 +47,8 @@ export default { hideSearchResults: debounce(async () => { this.areSearchResultsShown = false; }, 100), + externalParticipantNameInput: "", + externalParticipantEmailInput: "", }; }, computed: { @@ -53,6 +60,14 @@ export default { this.$emit("update:participantsModelValue", newValue); }, }, + externalParticipants: { + get() { + return this.$props.externalParticipantsModelValue; + }, + set(newValue) { + this.$emit("update:externalParticipantsModelValue", newValue); + }, + }, participantScheduleColors: { get() { return this.$props.participantScheduleColorsModelValue; @@ -194,103 +209,187 @@ export default { (participantColor) => participantColor.uid === participant.uid, )?.color; }, + addExternalParticipant() { + const nameInput = this.externalParticipantNameInput.trim(); + const emailInput = this.externalParticipantEmailInput.trim(); + + if (!nameInput.length || !emailInput.length) { + this.$fhcAlert.alertError("Missing inputs!"); + return; + } + + const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; + if (!emailRegex.test(emailInput)) { + this.$fhcAlert.alertError("Invalid email format!"); + return; + } + + if (this.externalParticipants.some((externalParticipant) => externalParticipant.email === emailInput)) { + this.$fhcAlert.alertError("Duplicates not allowed!"); + return; + } + + this.externalParticipants.push({ + name: nameInput, + email: emailInput + }); + this.externalParticipantNameInput = ""; + this.externalParticipantEmailInput = ""; + }, + removeExternalParticipant(email) { + this.externalParticipants = this.externalParticipants.filter( + (externalParticipant) => externalParticipant.email !== email, + ); + }, }, template: /*html*/ ` -
- -
- -
+
+
+ +
+
- -
-
- {{ "No results found!" }} -
-
- - - {{ searchResult.name + (searchResult.uid ? (" (" + searchResult.uid + ")") : "") }} + +
+
+ {{ "No results found!" }} +
+
+
+ + + {{ searchResult.name + (searchResult.uid ? (" (" + searchResult.uid + ")") : "") }} +
+
+
+ {{ participant.name }} +
+ + + + +
+
+
+
+
+ {{ "Add yourself" }} +
+
+ + {{ "You can display no more participant schedules!" }} + +
+ + {{ "Hide all participant schedules" }} + +
-
-
- {{ participant.name }} -
+
+ {{ "External participants" }} +
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+
+
+ {{ externalParticipant.name }} + | + {{ externalParticipant.email }} +
- - -
-
-
- {{ "Add yourself" }} -
-
- + {{ "No participants added yet!" }} - - - {{ "You can display no more participant schedules!" }} - -
- - {{ "Hide all participant schedules" }} - -
+
`, }; diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 6b1ada3d4..b4ec037a8 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -62660,6 +62660,26 @@ I have been informed that I am under no obligation to consent to the transmissio 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'core', + 'category' => 'coodle', + 'phrase' => 'search_participants_input_placeholders', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'TODO', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Search participants...', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) // coodle phrases END );