Skip to content

Commit

Permalink
feat: Create Recurring Events (#1734)
Browse files Browse the repository at this point in the history
* create custom recurrence modal

* add functionality for creating recurring events

* minor correction

* change colors to css variables

* add recurrence rule text

* minor changes

* correct existing tests for OrganizationEvents.tsx

* add monday to friday option and rename variables

* add translations and tests for recurrence options

* add tests for custom recurrence modal

* remove custom recurrence file

* add custom recurrence file

* fix linting

* add enum type for recurrence end options and add comments

* restructure and modularize for better readability

* minor correction
  • Loading branch information
meetulr authored Mar 23, 2024
1 parent 779a222 commit 77974c2
Show file tree
Hide file tree
Showing 17 changed files with 2,303 additions and 166 deletions.
11 changes: 10 additions & 1 deletion public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,16 @@
"enterDescrip": "Enter Description",
"eventLocation": "Enter Location",
"eventCreated": "Congratulations! The Event is created.",
"talawaApiUnavailable": "Talawa-API service is unavailable. Is it running? Check your network connectivity too."
"talawaApiUnavailable": "Talawa-API service is unavailable. Is it running? Check your network connectivity too.",
"customRecurrence": "Custom Recurrence",
"repeatsEvery": "Repeats Every",
"repeatsOn": "Repeats On",
"ends": "Ends",
"never": "Never",
"on": "On",
"after": "After",
"occurences": "occurences",
"done": "Done"
},
"organizationActionItems": {
"actionItemCategory": "Action Item Category",
Expand Down
11 changes: 10 additions & 1 deletion public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,16 @@
"enterDescrip": "Entrez la description",
"eventLocation": "Entrez l'emplacement",
"eventCreated": "Toutes nos félicitations! L'événement est créé.",
"talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau."
"talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau.",
"customRecurrence": "Récurrence personnalisée",
"repeatsEvery": "Se répète tous les",
"repeatsOn": "Se répète sur",
"ends": "Finit",
"never": "Jamais",
"on": "Sur",
"after": "Après",
"occurences": "Occurrences",
"done": "Fait"
},
"organizationActionItems": {
"actionItemCategory": "Catégorie de l'élément d'action",
Expand Down
11 changes: 10 additions & 1 deletion public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,16 @@
"enterDescrip": "विवरण दर्ज करें",
"eventLocation": "स्थान दर्ज करें",
"eventCreated": "बधाई हो! इवेंट बनाया गया है।",
"talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जांचें।"
"talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जांचें।",
"customRecurrence": "कस्टम पुनरावृत्ति",
"repeatsEvery": "दोहराता है हर",
"repeatsOn": "को दोहराएगा",
"ends": "समाप्त होता",
"never": "कभी नहीं",
"on": "पर",
"after": "के बाद",
"occurences": "'घटित होता है",
"done": "समाज-सम्मत"
},
"organizationActionItems": {
"actionItemCategory": "कार्य आइटम श्रेणी",
Expand Down
11 changes: 10 additions & 1 deletion public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,16 @@
"enterDescrip": "Introduce la descripción",
"eventLocation": "Introducir ubicación",
"eventCreated": "¡Felicidades! Se crea el Evento.",
"talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está funcionando? Compruebe también la conectividad de su red."
"talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está funcionando? Compruebe también la conectividad de su red.",
"customRecurrence": "Recurrencia personalizada",
"repeatsEvery": "Se repite cada",
"repeatsOn": "Se repite en",
"ends": "Finaliza",
"never": "Nunca",
"on": "En",
"after": "Después de",
"occurences": "ocurrencias",
"done": "Hecho"
},
"organizationActionItems": {
"actionItemCategory": "Categoría del ítem de acción",
Expand Down
11 changes: 10 additions & 1 deletion public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,16 @@
"enterDescrip": "輸入說明",
"eventLocation": "輸入位置",
"eventCreated": "恭喜!事件已創建。",
"talawaApiUnavailable": "服務不可用。它在運行嗎?還要檢查您的網絡連接。"
"talawaApiUnavailable": "服務不可用。它在運行嗎?還要檢查您的網絡連接。",
"customRecurrence": "自定义重复",
"repeatsEvery": "重复每",
"repeatsOn": "重复于",
"ends": "结束",
"never": "永不",
"on": "",
"after": "之后",
"occurences": "次数",
"done": "完成"
},
"organizationActionItems": {
"actionItemCategory": "行动项目类别",
Expand Down
8 changes: 8 additions & 0 deletions src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ export const CREATE_EVENT_MUTATION = gql`
$startTime: Time
$endTime: Time
$location: String
$frequency: Frequency
$weekDays: [WeekDays]
$count: Int
) {
createEvent(
data: {
Expand All @@ -256,6 +259,11 @@ export const CREATE_EVENT_MUTATION = gql`
endTime: $endTime
location: $location
}
recurrenceRuleData: {
frequency: $frequency
weekDays: $weekDays
count: $count
}
) {
_id
}
Expand Down
Loading

0 comments on commit 77974c2

Please sign in to comment.