Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
andreacw5 committed Sep 22, 2022
2 parents c88e85b + 7ce231a commit 32be8ad
Show file tree
Hide file tree
Showing 38 changed files with 360 additions and 282 deletions.
3 changes: 1 addition & 2 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ module.exports = {
title: 'Home' || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' }
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
],
link: [
{ rel: 'icon', type: 'image/png', href: '/index.png' },
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prociv-website",
"version": "1.0.4",
"version": "1.0.5",
"description": "Sito della protezione civile di settimo milanese",
"author": "Andrea Tombolato <andreacw96@gmail.com> (https://github.com/andreacw5)",
"private": true,
Expand Down
Binary file removed src/assets/img/activity.jpg
Binary file not shown.
Binary file removed src/assets/img/groups.jpg
Binary file not shown.
Binary file removed src/assets/img/hq.png
Binary file not shown.
Binary file added src/assets/img/hq.webp
Binary file not shown.
Binary file modified src/assets/img/lazy.webp
Binary file not shown.
Binary file modified src/assets/img/reportage_car.webp
Binary file not shown.
Binary file added src/assets/img/vehicles/cars/land.webp
Binary file not shown.
Binary file added src/assets/img/vehicles/cars/mitsubishi.webp
Binary file not shown.
Binary file removed src/assets/img/vehicles/ducato/ducato.jpg
Binary file not shown.
Binary file removed src/assets/img/vehicles/iveco/iveco2.jpg
Binary file not shown.
Binary file removed src/assets/img/vehicles/land/land.jpg
Binary file not shown.
Binary file removed src/assets/img/vehicles/land/land2.jpg
Binary file not shown.
Binary file removed src/assets/img/vehicles/mitsu/mitsubishi.jpg
Binary file not shown.
Binary file removed src/assets/img/vehicles/mitsu/mitsubishi3.jpg
Binary file not shown.
Binary file added src/assets/img/vehicles/trucks/ducato.webp
Binary file not shown.
Binary file added src/assets/img/vehicles/trucks/iveco.webp
Binary file not shown.
Binary file added src/assets/img/volunteers/groups.webp
Binary file not shown.
28 changes: 0 additions & 28 deletions src/components/activity/ActivityTypeIcon.vue

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/navigation/LowerBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<v-container class="py-0 px-0 px-sm-2">
<v-btn text color="#ffffff" nuxt :to="{ path: localePath('/')}">{{ $t('menu.home') }}</v-btn>
<v-btn text color="#ffffff" nuxt :to="{ path: localePath('/about')}">{{ $t('menu.about') }}</v-btn>
<v-btn text color="#ffffff" nuxt :to="{ path: localePath('/operations')}">{{ $t('menu.activity') }}</v-btn>
<v-btn text color="#ffffff" nuxt :to="{ path: localePath('/headquarter')}">{{ $t('menu.headquarters') }}</v-btn>
<v-btn text color="#ffffff" nuxt :to="{ path: localePath('/operations')}">{{ $t('operations.title') }}</v-btn>
<v-btn text color="#ffffff" nuxt :to="{ path: localePath('/headquarter')}">{{ $t('headquarters.title') }}</v-btn>
<v-btn text color="#ffffff" nuxt :to="{ path: localePath('/volunteer')}">{{ $t('menu.volunteer') }}</v-btn>
<v-btn text color="#ffffff" nuxt :to="{ path: localePath('/vehicle')}">{{ $t('menu.vehicles') }}</v-btn>
</v-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<v-card>
<v-list-item>
<v-list-item-action>
<activity-type-icon :type="activity.type" />
<operation-type-icon :type="activity.type" />
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>{{ activity.title }}</v-list-item-title>
<v-list-item-subtitle>
{{ activity.startDate | formatDate('dd/MM/yyyy') }} - {{ activity.description }}
{{ activity.startDate | formatDate('dd/MM/yyyy') }} - {{ activity.location }}
</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-action>
<v-list-item-action-text>
<strong>{{ $t('activity.type.' + activity.type) }}</strong>
<strong>{{ $t('operations.type.' + activity.type) }}</strong>
</v-list-item-action-text>
<v-list-item-action-text>
{{ dateDifferences(activity.startDate, activity.endDate) }}
Expand All @@ -23,11 +23,11 @@
</template>

<script>
import ActivityTypeIcon from "@/components/activity/ActivityTypeIcon";
import OperationTypeIcon from "@/components/operations/OperationTypeIcon";
import { formatDistanceStrict } from "date-fns";
import { it } from "date-fns/locale";
export default {
components: { ActivityTypeIcon },
components: { OperationTypeIcon },
props: {
activity: {
type: Object,
Expand All @@ -36,7 +36,10 @@ export default {
},
methods: {
dateDifferences (starting, ending) {
return formatDistanceStrict(new Date(starting), new Date(ending), {locale: it})
if (starting && ending) {
return formatDistanceStrict(new Date(starting), new Date(ending), {locale: it})
}
return '----'
}
}
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<v-card :title="'Totale interventi di ' + $t('activity.type.' + activity.type)">
<v-card :title="'Totale interventi di ' + $t('operations.type.' + activity.type)">
<v-list-item>
<v-list-item-action>
<activity-type-icon :type="activity.type" />
<operation-type-icon :type="activity.type" />
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>{{ $t('activity.type.' + activity.type) }}</v-list-item-title>
<v-list-item-title>{{ $t('operations.type.' + activity.type) }}</v-list-item-title>
</v-list-item-content>
<v-list-item-action>
<v-list-item-action-text>
Expand All @@ -17,10 +17,10 @@
</template>

<script>
import ActivityTypeIcon from "@/components/activity/ActivityTypeIcon";
import OperationTypeIcon from "@/components/operations/OperationTypeIcon";
export default {
name: "StatsCard",
components: { ActivityTypeIcon },
name: "OperationStatsCard",
components: { OperationTypeIcon },
props: {
activity: {
type: Object,
Expand Down
28 changes: 28 additions & 0 deletions src/components/operations/OperationTypeIcon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div class="icon">
<v-icon v-if="type === 'tecnical'" color="gray" :title="$t('operations.type.' + type)">mdi-hammer-wrench</v-icon>
<v-icon v-else-if="type === 'fire'" color="gray" :title="$t('operations.type.' + type)">mdi-fire-alert</v-icon>
<v-icon v-else-if="type === 'hydrogeological'" color="gray" :title="$t('operations.type.' + type)">mdi-water-alert-outline</v-icon>
<v-icon v-else-if="type === 'covid'" color="gray" :title="$t('operations.type.' + type)">mdi-virus-outline</v-icon>
<v-icon v-else-if="type === 'landslide'" color="gray" :title="$t('operations.type.' + type)">mdi-landslide-outline</v-icon>
<v-icon v-else-if="type === 'rescue'" color="gray" :title="$t('operations.type.' + type)">mdi-lifebuoy</v-icon>
<v-icon v-else-if="type === 'event'" color="gray" :title="$t('operations.type.' + type)">mdi-calendar-text</v-icon>
<v-icon v-else color="gray" :title="$t('operations.type.' + type)">mdi-ballot-outline</v-icon>
</div>
</template>

<script>
export default {
name: "OperationTypeIcon",
props: {
type: {
type: String,
default: 'other'
}
}
};
</script>

<style scoped>
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@
</template>
<v-col
v-else
v-for="activity in activities"
:key="activity.id"
v-for="operation in operations"
:key="operation.id"
cols="12"
md="12"
lg="12"
>
<activity-card :activity="activity" />
<operation-card :activity="operation" />
</v-col>
</v-row>
</v-card-text>
</v-card>
</template>

<script>
import ActivityCard from "@/components/activity/ActivityCard";
import OperationCard from "@/components/operations/OperationCard";
export default {
components: { ActivityCard },
components: { OperationCard },
props: {
activities: {
operations: {
type: Array,
required: true
},
Expand Down
28 changes: 22 additions & 6 deletions src/i18n/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ export default {
home: 'Home',
login: 'Login',
logout: 'Logout',
activity: 'Interventi',
about: 'Chi siamo',
vehicles: 'Veicoli',
headquarters: 'Sede',
volunteer: 'Volontari',
alerts: 'Allerte',
},
Expand Down Expand Up @@ -48,14 +46,10 @@ export default {
title: 'Interventi',
noData: 'Nessun intervento disponibile',
add: 'Crea un\'intervento',
},
activity: {
title: 'Interventi',
subtitle: 'Elenco degli interventi',
new: 'Aggiungi un\'intervento',
edit: 'Modifica intervento',
delete: 'Elimina intervento',
noData: 'Nessun intervento disponibile',
save: 'Salva intervento',
cancel: 'Annulla',
fields: {
Expand Down Expand Up @@ -139,5 +133,27 @@ export default {
description: 'I cookie operativi sono utilizzati per fornire i nostri servizi e non possono essere disabilitati.'
}
}
},
headquarters: {
title: 'Sede',
description: 'La sede della Protezione Civile di Settimo Milanese',
address: 'Indirizzo',
maps: 'Apri in Google Maps',
contacts: 'Contatti utili',
phone: {
title: 'Telefono',
call: 'Chiama',
description: 'Numero per informazioni o non emergenze'
},
emergency: {
title: 'Telefono',
description: 'Numero per le emergenze'
},
email: 'Email',
sendMail: 'Invia una mail'
},
error: {
title: 'Forse non è qui!',
description: 'Sembra che la pagina che stavi cercando non esista più o sia stata spostata!',
}
}
3 changes: 1 addition & 2 deletions src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default {
sidebar: [
{ icon: 'home', i18n: 'menu.home', path: '/'},
{ icon: 'account-group', i18n: 'menu.about', path: '/about'},
{ icon: 'shield-alert-outline', i18n: 'menu.activity', path: '/operations'},
{ icon: 'shield-alert-outline', i18n: 'operations.title', path: '/operations'},
{ icon: 'office-building', i18n: 'menu.headquarters', path: '/headquarter'},
{ icon: 'account-group', i18n: 'menu.volunteer', path: '/volunteer'},
{ icon: 'car-settings', i18n: 'menu.vehicles', path: '/vehicle'},
Expand All @@ -106,7 +106,6 @@ export default {
this.$auth.setUser(user)
// Set axios token
this.$axios.setToken(token, 'Bearer')
console.log('auth done!')
} else {
this.$auth.logout()
}
Expand Down
Loading

0 comments on commit 32be8ad

Please sign in to comment.