Skip to content
Merged

Dev #2933

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 237 additions & 0 deletions public/build/assets/app-BAFDKbij.js

Large diffs are not rendered by default.

237 changes: 0 additions & 237 deletions public/build/assets/app-BhhS6zLa.js

This file was deleted.

237 changes: 237 additions & 0 deletions public/build/assets/app-CYhibInC.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

303 changes: 303 additions & 0 deletions public/build/assets/php_en-hSRkEOjH.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"isEntry": true
},
"resources/js/app.js": {
"file": "assets/app-BhhS6zLa.js",
"file": "assets/app-BAFDKbij.js",
"name": "app",
"src": "resources/js/app.js",
"isEntry": true,
Expand Down Expand Up @@ -93,7 +93,7 @@
"isDynamicEntry": true
},
"resources/lang/php_en.json": {
"file": "assets/php_en-Dv7P2FP8.js",
"file": "assets/php_en-hSRkEOjH.js",
"name": "php_en",
"src": "resources/lang/php_en.json",
"isDynamicEntry": true
Expand Down
12 changes: 10 additions & 2 deletions resources/js/components/activity-form/AddConfirmation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@
</div>
</template>

<script setup>
import { trans } from 'laravel-vue-i18n';
</script>

<script>

import { computed } from 'vue';
import { trans } from 'laravel-vue-i18n';
import _ from 'lodash';
import { useDataOptions } from './mixins.js';

Expand Down Expand Up @@ -105,8 +109,12 @@ export default {
{ label: trans('event.theme-title'), value: themeValues.join(', ') },
{ label: trans('event.activity-description'), htmlValue: description },
];

const audienceValues = (audience || [])
.map(item => props.audiences.find(({ id }) => id === item))
.filter(aud => aud)
.map(aud => aud.name);

const audienceValues = (audience || []).map(item => props.audiences.find(({ id }) => id === item)?.name).map(name => trans(`event.audience.${name}`));
const participantsValue = [
participants_count || 0,
[
Expand Down
16 changes: 0 additions & 16 deletions resources/js/components/activity-form/mixins.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,6 @@ export function useDataOptions() {
buildOptionMap(themeOptions.value)
);

const audienceOptions = ref([]);

onMounted(async () => {
const response = await axios.get('/api/audiences');
audienceOptions.value = response.data.map((audience) => ({
id: audience.id,
name: trans(`event.${audience.slug}`),
}));
});

const audienceOptionsMap = computed(() =>
buildOptionMap(audienceOptions.value)
);

return {
stepTitles,
activityFormatOptions,
Expand All @@ -148,7 +134,5 @@ export function useDataOptions() {
organizerTypeOptionsMap,
themeOptions,
themeOptionsMap,
audienceOptions,
audienceOptionsMap,
};
}
11 changes: 8 additions & 3 deletions resources/lang/en/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,12 @@
'confirmation_step.activity_overview' => 'Activity overview',
'confirmation_step.who_is_the_activity_for' => 'Who is the activity for',
'confirmation_step.organiser' => 'Organiser',
'your-changes-have-been-saved' => 'Your CHnages have been saved',
'view-activity' => 'View activity',
'add-another-activity' => 'Add another activity',
'your-changes-have-been-saved' => 'Your changes have been saved',
'edit-your-codeweek-activity' => 'Edit your Codeweek activity',
'view-activity' => 'View Activity',
'add-another-activity' => 'Add another Activity'
'event.view-activity' => 'View activity',
'event.add-another-activity' => 'Add another activity',
'event.audience.Pre-primary education' => 'Pre-primary education',
'event.your-changes-have-been-saved' => 'Your CHnages have been saved',
];
Loading