Compare commits
3 Commits
45968b28e2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a1164b185b | |||
| b152c255b4 | |||
|
|
35e3c51623 |
@@ -37,11 +37,11 @@
|
|||||||
"pagination": "pagination",
|
"pagination": "pagination",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
"otherEntityField": "username",
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "utenteApp",
|
"otherEntityName": "utenteApp",
|
||||||
"relationshipName": "utente",
|
"relationshipName": "utente",
|
||||||
"otherEntityField": "username"
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -20,18 +20,18 @@
|
|||||||
"pagination": "pagination",
|
"pagination": "pagination",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
"otherEntityField": "username",
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "utenteApp",
|
"otherEntityName": "utenteApp",
|
||||||
"relationshipName": "confermataDa",
|
"relationshipName": "confermataDa",
|
||||||
"otherEntityField": "username"
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"relationshipSide": "right",
|
|
||||||
"relationshipType": "one-to-one",
|
|
||||||
"otherEntityName": "prenotazione",
|
"otherEntityName": "prenotazione",
|
||||||
"otherEntityRelationshipName": "conferma",
|
"otherEntityRelationshipName": "conferma",
|
||||||
"relationshipName": "prenotazione"
|
"relationshipName": "prenotazione",
|
||||||
|
"relationshipSide": "right",
|
||||||
|
"relationshipType": "one-to-one"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -44,12 +44,12 @@
|
|||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
"otherEntityField": "nome",
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "struttura",
|
"otherEntityName": "struttura",
|
||||||
"otherEntityRelationshipName": "disponibilita",
|
"otherEntityRelationshipName": "disponibilita",
|
||||||
"relationshipName": "struttura",
|
"relationshipName": "struttura",
|
||||||
"otherEntityField": "nome"
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -13,18 +13,18 @@
|
|||||||
"name": "Liberatoria",
|
"name": "Liberatoria",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
"otherEntityField": "username",
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "utenteApp",
|
"otherEntityName": "utenteApp",
|
||||||
"otherEntityRelationshipName": "liberatorie",
|
"otherEntityRelationshipName": "liberatorie",
|
||||||
"relationshipName": "utente",
|
"relationshipName": "utente",
|
||||||
"otherEntityField": "username"
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "modelloLiberatoria",
|
"otherEntityName": "modelloLiberatoria",
|
||||||
"relationshipName": "modelloLiberatoria"
|
"relationshipName": "modelloLiberatoria",
|
||||||
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
"name": "Messaggio",
|
"name": "Messaggio",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
"otherEntityField": "username",
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "utenteApp",
|
"otherEntityName": "utenteApp",
|
||||||
"relationshipName": "utente",
|
"relationshipName": "utente",
|
||||||
"otherEntityField": "username"
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -29,11 +29,11 @@
|
|||||||
"name": "ModelloLiberatoria",
|
"name": "ModelloLiberatoria",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "struttura",
|
"otherEntityName": "struttura",
|
||||||
"otherEntityRelationshipName": "moduliLiberatorie",
|
"otherEntityRelationshipName": "moduliLiberatorie",
|
||||||
"relationshipName": "struttura"
|
"relationshipName": "struttura",
|
||||||
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -41,10 +41,10 @@
|
|||||||
"pagination": "pagination",
|
"pagination": "pagination",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "conferma",
|
"otherEntityName": "conferma",
|
||||||
"relationshipName": "conferma"
|
"relationshipName": "conferma",
|
||||||
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -36,25 +36,25 @@
|
|||||||
"pagination": "pagination",
|
"pagination": "pagination",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
|
||||||
"relationshipType": "one-to-one",
|
|
||||||
"otherEntityName": "conferma",
|
"otherEntityName": "conferma",
|
||||||
"otherEntityRelationshipName": "prenotazione",
|
"otherEntityRelationshipName": "prenotazione",
|
||||||
"relationshipName": "conferma"
|
"relationshipName": "conferma",
|
||||||
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "one-to-one"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
"otherEntityField": "username",
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "utenteApp",
|
"otherEntityName": "utenteApp",
|
||||||
"relationshipName": "utente",
|
"relationshipName": "utente",
|
||||||
"otherEntityField": "username"
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
"otherEntityField": "nome",
|
||||||
"relationshipType": "many-to-one",
|
|
||||||
"otherEntityName": "struttura",
|
"otherEntityName": "struttura",
|
||||||
"relationshipName": "struttura",
|
"relationshipName": "struttura",
|
||||||
"otherEntityField": "nome"
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "many-to-one"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -43,18 +43,18 @@
|
|||||||
"pagination": "pagination",
|
"pagination": "pagination",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "right",
|
|
||||||
"relationshipType": "one-to-many",
|
|
||||||
"otherEntityName": "disponibilita",
|
"otherEntityName": "disponibilita",
|
||||||
"otherEntityRelationshipName": "struttura",
|
"otherEntityRelationshipName": "struttura",
|
||||||
"relationshipName": "disponibilita"
|
"relationshipName": "disponibilita",
|
||||||
|
"relationshipSide": "right",
|
||||||
|
"relationshipType": "one-to-many"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"relationshipSide": "right",
|
|
||||||
"relationshipType": "one-to-many",
|
|
||||||
"otherEntityName": "modelloLiberatoria",
|
"otherEntityName": "modelloLiberatoria",
|
||||||
"otherEntityRelationshipName": "struttura",
|
"otherEntityRelationshipName": "struttura",
|
||||||
"relationshipName": "moduliLiberatorie"
|
"relationshipName": "moduliLiberatorie",
|
||||||
|
"relationshipSide": "right",
|
||||||
|
"relationshipType": "one-to-many"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
{
|
{
|
||||||
"fieldName": "ruolo",
|
"fieldName": "ruolo",
|
||||||
"fieldType": "Ruolo",
|
"fieldType": "Ruolo",
|
||||||
"fieldValues": "USER,INCARICATO,ADMIN",
|
"fieldValidateRules": ["required"],
|
||||||
"fieldValidateRules": ["required"]
|
"fieldValues": "USER,INCARICATO,ADMIN"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "attivo",
|
"fieldName": "attivo",
|
||||||
@@ -74,19 +74,19 @@
|
|||||||
"name": "UtenteApp",
|
"name": "UtenteApp",
|
||||||
"relationships": [
|
"relationships": [
|
||||||
{
|
{
|
||||||
"relationshipSide": "left",
|
"otherEntityField": "login",
|
||||||
"relationshipType": "one-to-one",
|
|
||||||
"otherEntityName": "user",
|
"otherEntityName": "user",
|
||||||
"relationshipName": "internalUser",
|
"relationshipName": "internalUser",
|
||||||
"otherEntityField": "login",
|
"relationshipSide": "left",
|
||||||
|
"relationshipType": "one-to-one",
|
||||||
"relationshipWithBuiltInEntity": true
|
"relationshipWithBuiltInEntity": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"relationshipSide": "right",
|
|
||||||
"relationshipType": "one-to-many",
|
|
||||||
"otherEntityName": "liberatoria",
|
"otherEntityName": "liberatoria",
|
||||||
"otherEntityRelationshipName": "utente",
|
"otherEntityRelationshipName": "utente",
|
||||||
"relationshipName": "liberatorie"
|
"relationshipName": "liberatorie",
|
||||||
|
"relationshipSide": "right",
|
||||||
|
"relationshipType": "one-to-many"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchEngine": "no",
|
"searchEngine": "no",
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
"lastLiquibaseTimestamp": 1765383090000,
|
"lastLiquibaseTimestamp": 1765383090000,
|
||||||
"microfrontend": null,
|
"microfrontend": null,
|
||||||
"microfrontends": [],
|
"microfrontends": [],
|
||||||
|
"monorepository": true,
|
||||||
"nativeLanguage": "it",
|
"nativeLanguage": "it",
|
||||||
"packageName": "it.sw.pa.comune.artegna",
|
"packageName": "it.sw.pa.comune.artegna",
|
||||||
"prodDatabaseType": "postgresql",
|
"prodDatabaseType": "postgresql",
|
||||||
@@ -42,10 +43,9 @@
|
|||||||
"rememberMeKey": "c3201ccf39b5d82ef696ad12b95009f33d980fc0468a86e957ad91487d1fe80d9440f72a1d09721585bc96b11048fda07240",
|
"rememberMeKey": "c3201ccf39b5d82ef696ad12b95009f33d980fc0468a86e957ad91487d1fe80d9440f72a1d09721585bc96b11048fda07240",
|
||||||
"serverPort": null,
|
"serverPort": null,
|
||||||
"serviceDiscoveryType": null,
|
"serviceDiscoveryType": null,
|
||||||
|
"skipCommitHook": true,
|
||||||
"syncUserWithIdp": null,
|
"syncUserWithIdp": null,
|
||||||
"testFrameworks": ["cypress"],
|
"testFrameworks": ["cypress"],
|
||||||
"withAdminUi": true,
|
"withAdminUi": true
|
||||||
"monorepository": true,
|
|
||||||
"skipCommitHook": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
docker-compose/.yo-rc.json
Normal file
10
docker-compose/.yo-rc.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"generator-jhipster": {
|
||||||
|
"appsFolders": ["smartbooking"],
|
||||||
|
"deploymentType": "docker-compose",
|
||||||
|
"directoryPath": "../../",
|
||||||
|
"jwtSecretKey": "MDQwNzk2YjgyMzE3NjQxNWViNzQyZThjNmJjNjI1YzBmZGRiYzBmYzMxNjg2ODM4MGMxOTFjM2NiNGUxMDE1ZWFiODA0ZTA1M2JkZjM5NThhNTc3YzViY2MxY2IxYTNiYWQ0Zg==",
|
||||||
|
"monitoring": "no",
|
||||||
|
"serviceDiscoveryType": "no"
|
||||||
|
}
|
||||||
|
}
|
||||||
14
docker-compose/README-DOCKER-COMPOSE.md
Normal file
14
docker-compose/README-DOCKER-COMPOSE.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# JHipster generated Docker-Compose configuration
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Launch all your infrastructure by running: `docker compose up -d`.
|
||||||
|
|
||||||
|
## Configured Docker services
|
||||||
|
|
||||||
|
### Applications and dependencies:
|
||||||
|
|
||||||
|
- smartbooking (monolith application)
|
||||||
|
- smartbooking's postgresql database
|
||||||
|
|
||||||
|
### Additional Services:
|
||||||
31
docker-compose/docker-compose.yml
Normal file
31
docker-compose/docker-compose.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
services:
|
||||||
|
smartbooking:
|
||||||
|
image: git.bigc.it/sbierti/smartbooking:latest
|
||||||
|
environment:
|
||||||
|
- _JAVA_OPTIONS=-Xmx512m -Xms256m
|
||||||
|
- SPRING_PROFILES_ACTIVE=prod,api-docs
|
||||||
|
- MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true
|
||||||
|
- SPRING_DATASOURCE_URL=jdbc:postgresql://smartbooking-postgresql:5432/smartbooking
|
||||||
|
- SPRING_LIQUIBASE_URL=jdbc:postgresql://smartbooking-postgresql:5432/smartbooking
|
||||||
|
- JHIPSTER_SLEEP=30
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
depends_on:
|
||||||
|
- postgresql
|
||||||
|
postgresql:
|
||||||
|
image: postgres:18.1
|
||||||
|
# volumes:
|
||||||
|
# - ~/volumes/jhipster/smartbooking/postgresql/:/var/lib/postgresql/data/
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=smartbooking
|
||||||
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||||
|
healthcheck:
|
||||||
|
test: [ 'CMD-SHELL', 'pg_isready -U $${POSTGRES_USER}' ]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
# If you want to expose these ports outside your dev PC,
|
||||||
|
# remove the "127.0.0.1:" prefix
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:5432:5432
|
||||||
|
|
||||||
@@ -42,14 +42,15 @@ spring:
|
|||||||
# Remove 'faker' if you do not want the sample data to be loaded automatically
|
# Remove 'faker' if you do not want the sample data to be loaded automatically
|
||||||
contexts: dev, faker
|
contexts: dev, faker
|
||||||
mail:
|
mail:
|
||||||
host: smtps.aruba.it
|
host: mail-eu.smtp2go.com
|
||||||
port: 465
|
port: 587
|
||||||
username: noreply@bigc.it
|
username: artegna
|
||||||
password: Ungr@nb3l4n1m4l0
|
password: gpTottUCcB9GKG15
|
||||||
protocol: smtps
|
protocol: smtp
|
||||||
properties.mail.smtp:
|
properties.mail.smtp:
|
||||||
auth: true
|
auth: true
|
||||||
starttls.enable: true
|
starttls.enable: true
|
||||||
|
starttls.required: true
|
||||||
|
|
||||||
messages:
|
messages:
|
||||||
cache-duration: PT1S # 1 second, see the ISO 8601 standard
|
cache-duration: PT1S # 1 second, see the ISO 8601 standard
|
||||||
|
|||||||
@@ -43,14 +43,15 @@ spring:
|
|||||||
liquibase:
|
liquibase:
|
||||||
contexts: prod
|
contexts: prod
|
||||||
mail:
|
mail:
|
||||||
host: smtps.aruba.it
|
host: mail-eu.smtp2go.com
|
||||||
port: 465
|
port: 587
|
||||||
username: noreply@bigc.it
|
username: artegna
|
||||||
password: Ungr@nb3l4n1m4l0
|
password: gpTottUCcB9GKG15
|
||||||
protocol: smtps
|
protocol: smtp
|
||||||
properties.mail.smtp:
|
properties.mail.smtp:
|
||||||
auth: true
|
auth: true
|
||||||
starttls.enable: true
|
starttls.enable: true
|
||||||
|
starttls.required: true
|
||||||
thymeleaf:
|
thymeleaf:
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
|
|||||||
@@ -139,11 +139,11 @@
|
|||||||
<button type="submit" :disabled="v$.$invalid" class="btn btn-primary" data-cy="submit">{{ t$('register.form.button') }}</button>
|
<button type="submit" :disabled="v$.$invalid" class="btn btn-primary" data-cy="submit">{{ t$('register.form.button') }}</button>
|
||||||
</form>
|
</form>
|
||||||
<p></p>
|
<p></p>
|
||||||
<div class="alert alert-warning">
|
<!--div class="alert alert-warning">
|
||||||
<span>{{ t$('global.messages.info.authenticated.prefix') }}</span>
|
<span>{{ t$('global.messages.info.authenticated.prefix') }}</span>
|
||||||
<a class="alert-link" @click="showLogin()">{{ t$('global.messages.info.authenticated.link') }}</a
|
<a class="alert-link" @click="showLogin()">{{ t$('global.messages.info.authenticated.link') }}</a
|
||||||
><span v-html="t$('global.messages.info.authenticated.suffix')"></span>
|
><span v-html="t$('global.messages.info.authenticated.suffix')"></span>
|
||||||
</div>
|
</div-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export default defineComponent({
|
|||||||
const { showLogin } = useLoginModal();
|
const { showLogin } = useLoginModal();
|
||||||
const authenticated = inject<ComputedRef<boolean>>('authenticated');
|
const authenticated = inject<ComputedRef<boolean>>('authenticated');
|
||||||
const username = inject<ComputedRef<string>>('currentUsername');
|
const username = inject<ComputedRef<string>>('currentUsername');
|
||||||
const utenteAppService = inject<UtenteAppService>('utenteAppService', () => new UtenteAppService());
|
const utenteAppService = inject<UtenteAppService>('utenteAppService', () => new UtenteAppService(), true);
|
||||||
|
|
||||||
const profileIncomplete: Ref<boolean> = ref(false);
|
const profileIncomplete: Ref<boolean> = ref(false);
|
||||||
const checkingProfile: Ref<boolean> = ref(false);
|
const checkingProfile: Ref<boolean> = ref(false);
|
||||||
@@ -23,7 +23,7 @@ export default defineComponent({
|
|||||||
try {
|
try {
|
||||||
checkingProfile.value = true;
|
checkingProfile.value = true;
|
||||||
const utenteApp = await utenteAppService.getCurrentUser();
|
const utenteApp = await utenteAppService.getCurrentUser();
|
||||||
|
console.log('utenteApp', utenteApp);
|
||||||
// Check if essential profile fields are missing
|
// Check if essential profile fields are missing
|
||||||
if (
|
if (
|
||||||
!utenteApp ||
|
!utenteApp ||
|
||||||
|
|||||||
@@ -11,20 +11,21 @@
|
|||||||
<div class="alert alert-success" v-if="authenticated">
|
<div class="alert alert-success" v-if="authenticated">
|
||||||
<span v-if="username">{{ t$('home.logged.message', { username }) }}</span>
|
<span v-if="username">{{ t$('home.logged.message', { username }) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary jhi-create-entity" v-if="authenticated">
|
<button class="btn btn-primary jh-create-entity create-prenotazione" v-if="authenticated && !profileIncomplete && !checkingProfile">
|
||||||
<router-link to="/prenotazione">{{ t$('home.prenotazioni') }}</router-link>
|
<router-link to="/prenotazione">{{ t$('home.prenotazioni') }}</router-link>
|
||||||
</button>
|
</button>
|
||||||
<div class="alert alert-warning" v-if="authenticated && profileIncomplete && !checkingProfile">
|
<div class="alert alert-warning" v-if="authenticated && profileIncomplete && !checkingProfile">
|
||||||
<span>{{ t$('home.profile.incomplete.message') }}</span>
|
<span>{{ t$('home.profile.incomplete.message') }}</span>
|
||||||
|
<div>
|
||||||
<router-link class="alert-link" to="/account/profile">{{ t$('home.profile.incomplete.link') }}</router-link>
|
<router-link class="alert-link" to="/account/profile">{{ t$('home.profile.incomplete.link') }}</router-link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="alert alert-warning" v-if="!authenticated">
|
<!--div class="alert alert-warning" v-if="!authenticated">
|
||||||
<span>{{ t$('global.messages.info.authenticated.prefix') }}</span>
|
<span>{{ t$('global.messages.info.authenticated.prefix') }}</span>
|
||||||
<a class="alert-link" @click="showLogin()">{{ t$('global.messages.info.authenticated.link') }}</a
|
<a class="alert-link" @click="showLogin()">{{ t$('global.messages.info.authenticated.link') }}</a
|
||||||
><span v-html="t$('global.messages.info.authenticated.suffix')"></span>
|
><span v-html="t$('global.messages.info.authenticated.suffix')"></span>
|
||||||
</div>
|
</div-->
|
||||||
<div class="alert alert-warning" v-if="!authenticated">
|
<div class="alert alert-warning" v-if="!authenticated">
|
||||||
<span>{{ t$('global.messages.info.register.noaccount') }}</span
|
<span>{{ t$('global.messages.info.register.noaccount') }}</span
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -125,8 +125,8 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<span ref="infiniteScrollEl"></span>
|
|
||||||
</table>
|
</table>
|
||||||
|
<span ref="infiniteScrollEl"></span>
|
||||||
</div>
|
</div>
|
||||||
<b-modal ref="removeEntity" id="removeEntity">
|
<b-modal ref="removeEntity" id="removeEntity">
|
||||||
<template #title>
|
<template #title>
|
||||||
|
|||||||
@@ -311,7 +311,7 @@
|
|||||||
class="btn btn-sm btn-outline-primary"
|
class="btn btn-sm btn-outline-primary"
|
||||||
>
|
>
|
||||||
<font-awesome-icon icon="download"></font-awesome-icon>
|
<font-awesome-icon icon="download"></font-awesome-icon>
|
||||||
{{ t$('entity.action.download') }}
|
{{ t$('smartbookingApp.modelloLiberatoria.download') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { type Ref, computed, defineComponent, inject, onMounted, ref, watch } from 'vue';
|
import { type ComputedRef, type Ref, computed, defineComponent, inject, onMounted, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import { useAlertService } from '@/shared/alert/alert.service';
|
import { useAlertService } from '@/shared/alert/alert.service';
|
||||||
@@ -12,6 +12,14 @@ import { useAccountStore } from '@/shared/config/store/account-store';
|
|||||||
import ConfermaService from '../conferma/conferma.service';
|
import ConfermaService from '../conferma/conferma.service';
|
||||||
import PrenotazioneService from './prenotazione.service';
|
import PrenotazioneService from './prenotazione.service';
|
||||||
|
|
||||||
|
import UtenteAppService from '@/entities/utente-app/utente-app.service';
|
||||||
|
import account from '@/router/account.ts';
|
||||||
|
import type { IUtenteApp } from '@/shared/model/utente-app.model.ts';
|
||||||
|
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
const baseApiUrl = 'api/utente-apps';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'Prenotazione',
|
name: 'Prenotazione',
|
||||||
setup() {
|
setup() {
|
||||||
@@ -22,6 +30,9 @@ export default defineComponent({
|
|||||||
const alertService = inject('alertService', () => useAlertService(), true);
|
const alertService = inject('alertService', () => useAlertService(), true);
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
|
|
||||||
|
const authenticated = inject<ComputedRef<boolean>>('authenticated');
|
||||||
|
const utenteAppService = inject<UtenteAppService>('utenteAppService', () => new UtenteAppService(), true);
|
||||||
|
|
||||||
const itemsPerPage = ref(20);
|
const itemsPerPage = ref(20);
|
||||||
const queryCount: Ref<number> = ref(null);
|
const queryCount: Ref<number> = ref(null);
|
||||||
const page: Ref<number> = ref(1);
|
const page: Ref<number> = ref(1);
|
||||||
@@ -49,6 +60,57 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
const isSubmittingConferma = ref(false);
|
const isSubmittingConferma = ref(false);
|
||||||
|
|
||||||
|
// CONTROLLIAMO SE L'UTENTE HA UN PROFILO IMPOSTATO+
|
||||||
|
const profileIncomplete: Ref<boolean> = ref(false);
|
||||||
|
const checkingProfile: Ref<boolean> = ref(false);
|
||||||
|
|
||||||
|
const getCurrentUser = async () => {
|
||||||
|
return new Promise<IUtenteApp>((resolve, reject) => {
|
||||||
|
axios
|
||||||
|
.get(`${baseApiUrl}/current`)
|
||||||
|
.then(res => {
|
||||||
|
resolve(res.data);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
reject(err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const checkProfileCompletion = async () => {
|
||||||
|
if (!authenticated.value) {
|
||||||
|
profileIncomplete.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
checkingProfile.value = true;
|
||||||
|
const utenteApp = await getCurrentUser();
|
||||||
|
// Check if essential profile fields are missing
|
||||||
|
if (
|
||||||
|
!utenteApp ||
|
||||||
|
!utenteApp.nome ||
|
||||||
|
!utenteApp.cognome ||
|
||||||
|
!utenteApp.dataNascita ||
|
||||||
|
!utenteApp.luogoNascita ||
|
||||||
|
!utenteApp.residente ||
|
||||||
|
!utenteApp.telefono
|
||||||
|
) {
|
||||||
|
profileIncomplete.value = true;
|
||||||
|
} else {
|
||||||
|
console.log('Profile is complete');
|
||||||
|
profileIncomplete.value = false;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// If UtenteApp doesn't exist, profile is incomplete
|
||||||
|
profileIncomplete.value = true;
|
||||||
|
} finally {
|
||||||
|
checkingProfile.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// CHIUDIAMO IL CONTROLLO DEL PROFILO IMPOSTATO
|
||||||
|
|
||||||
const clear = () => {
|
const clear = () => {
|
||||||
page.value = 1;
|
page.value = 1;
|
||||||
};
|
};
|
||||||
@@ -86,6 +148,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await retrievePrenotaziones();
|
await retrievePrenotaziones();
|
||||||
|
await checkProfileCompletion();
|
||||||
});
|
});
|
||||||
|
|
||||||
const removeId: Ref<number> = ref(null);
|
const removeId: Ref<number> = ref(null);
|
||||||
@@ -162,6 +225,10 @@ export default defineComponent({
|
|||||||
await retrievePrenotaziones();
|
await retrievePrenotaziones();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(page, async () => {
|
||||||
|
await checkProfileCompletion();
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
prenotaziones,
|
prenotaziones,
|
||||||
handleSyncList,
|
handleSyncList,
|
||||||
@@ -182,6 +249,10 @@ export default defineComponent({
|
|||||||
totalItems,
|
totalItems,
|
||||||
changeOrder,
|
changeOrder,
|
||||||
t$,
|
t$,
|
||||||
|
authenticated,
|
||||||
|
profileIncomplete,
|
||||||
|
checkingProfile,
|
||||||
|
checkProfileCompletion,
|
||||||
// Role-based
|
// Role-based
|
||||||
isIncaricato,
|
isIncaricato,
|
||||||
prenotazioniPendenti,
|
prenotazioniPendenti,
|
||||||
|
|||||||
@@ -2,152 +2,160 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- ============================= ROLE_USER VIEW ============================= -->
|
<!-- ============================= ROLE_USER VIEW ============================= -->
|
||||||
<template v-if="!isIncaricato">
|
<template v-if="!isIncaricato">
|
||||||
<h2 id="page-heading" data-cy="PrenotazioneHeading">
|
<div class="alert alert-warning" v-if="authenticated && profileIncomplete && !checkingProfile">
|
||||||
<span id="prenotazione">{{ t$('smartbookingApp.prenotazione.home.title') }}</span>
|
<span>{{ t$('home.profile.incomplete.message') }}</span>
|
||||||
<div class="d-flex justify-content-end">
|
<div>
|
||||||
<button class="btn btn-info me-2" @click="handleSyncList" :disabled="isFetching">
|
<router-link class="alert-link" to="/account/profile">{{ t$('home.profile.incomplete.link') }}</router-link>
|
||||||
<font-awesome-icon icon="sync" :spin="isFetching"></font-awesome-icon>
|
|
||||||
<span>{{ t$('smartbookingApp.prenotazione.home.refreshListLabel') }}</span>
|
|
||||||
</button>
|
|
||||||
<router-link :to="{ name: 'PrenotazioneNuova' }" custom v-slot="{ navigate }">
|
|
||||||
<button
|
|
||||||
@click="navigate"
|
|
||||||
id="jh-create-entity"
|
|
||||||
data-cy="entityCreateButton"
|
|
||||||
class="btn btn-primary jh-create-entity create-prenotazione"
|
|
||||||
>
|
|
||||||
<font-awesome-icon icon="plus"></font-awesome-icon>
|
|
||||||
<span>{{ t$('smartbookingApp.prenotazione.home.createLabel') }}</span>
|
|
||||||
</button>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
|
||||||
<br />
|
|
||||||
<div class="alert alert-warning" v-if="!isFetching && prenotaziones?.length === 0">
|
|
||||||
<span>{{ t$('smartbookingApp.prenotazione.home.notFound') }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive" v-if="prenotaziones?.length > 0">
|
<div v-if="authenticated && !profileIncomplete && !checkingProfile">
|
||||||
<table class="table table-striped" aria-describedby="prenotaziones">
|
<h2 id="page-heading" data-cy="PrenotazioneHeading">
|
||||||
<thead>
|
<span id="prenotazione">{{ t$('smartbookingApp.prenotazione.home.title') }}</span>
|
||||||
<tr>
|
<div class="d-flex justify-content-end">
|
||||||
<th scope="col" @click="changeOrder('id')">
|
<button class="btn btn-info me-2" @click="handleSyncList" :disabled="isFetching">
|
||||||
<span>{{ t$('global.field.id') }}</span>
|
<font-awesome-icon icon="sync" :spin="isFetching"></font-awesome-icon>
|
||||||
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'id'"></jhi-sort-indicator>
|
<span>{{ t$('smartbookingApp.prenotazione.home.refreshListLabel') }}</span>
|
||||||
</th>
|
|
||||||
<th scope="col" @click="changeOrder('oraInizio')">
|
|
||||||
<span>{{ t$('smartbookingApp.prenotazione.oraInizio') }}</span>
|
|
||||||
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'oraInizio'"></jhi-sort-indicator>
|
|
||||||
</th>
|
|
||||||
<th scope="col" @click="changeOrder('oraFine')">
|
|
||||||
<span>{{ t$('smartbookingApp.prenotazione.oraFine') }}</span>
|
|
||||||
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'oraFine'"></jhi-sort-indicator>
|
|
||||||
</th>
|
|
||||||
<th scope="col" @click="changeOrder('stato')">
|
|
||||||
<span>{{ t$('smartbookingApp.prenotazione.stato') }}</span>
|
|
||||||
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'stato'"></jhi-sort-indicator>
|
|
||||||
</th>
|
|
||||||
<th scope="col" @click="changeOrder('struttura.nome')">
|
|
||||||
<span>{{ t$('smartbookingApp.prenotazione.struttura') }}</span>
|
|
||||||
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'struttura.nome'"></jhi-sort-indicator>
|
|
||||||
</th>
|
|
||||||
<th scope="col" @click="changeOrder('motivoEvento')">
|
|
||||||
<span>{{ t$('smartbookingApp.prenotazione.motivoEvento') }}</span>
|
|
||||||
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'motivoEvento'"></jhi-sort-indicator>
|
|
||||||
</th>
|
|
||||||
<th scope="col"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="prenotazione in prenotaziones" :key="prenotazione.id" data-cy="entityTable">
|
|
||||||
<td>
|
|
||||||
<router-link :to="{ name: 'PrenotazioneView', params: { prenotazioneId: prenotazione.id } }">{{
|
|
||||||
prenotazione.id
|
|
||||||
}}</router-link>
|
|
||||||
</td>
|
|
||||||
<td>{{ formatDateShort(prenotazione.oraInizio) || '' }}</td>
|
|
||||||
<td>{{ formatDateShort(prenotazione.oraFine) || '' }}</td>
|
|
||||||
<td>{{ t$('smartbookingApp.StatoPrenotazione.' + prenotazione.stato) }}</td>
|
|
||||||
<td>
|
|
||||||
<div v-if="prenotazione.struttura">{{ prenotazione.struttura.nome }}</div>
|
|
||||||
</td>
|
|
||||||
<td>{{ prenotazione.motivoEvento }}</td>
|
|
||||||
<td class="text-end">
|
|
||||||
<div class="btn-group">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'PrenotazioneView', params: { prenotazioneId: prenotazione.id } }"
|
|
||||||
class="btn btn-info btn-sm details"
|
|
||||||
data-cy="entityDetailsButton"
|
|
||||||
>
|
|
||||||
<font-awesome-icon icon="eye"></font-awesome-icon>
|
|
||||||
<span class="d-none d-md-inline">{{ t$('entity.action.view') }}</span>
|
|
||||||
</router-link>
|
|
||||||
<!-- Show conferma link when conferma exists -->
|
|
||||||
<router-link
|
|
||||||
v-if="prenotazione.conferma"
|
|
||||||
:to="{ name: 'ConfermaView', params: { confermaId: prenotazione.conferma.id } }"
|
|
||||||
class="btn btn-secondary btn-sm"
|
|
||||||
data-cy="entityConfermaButton"
|
|
||||||
>
|
|
||||||
<font-awesome-icon icon="file-alt"></font-awesome-icon>
|
|
||||||
<span class="d-none d-md-inline">{{ t$('smartbookingApp.prenotazione.viewConferma') }}</span>
|
|
||||||
</router-link>
|
|
||||||
<!-- Edit and Delete only when no conferma -->
|
|
||||||
<template v-if="!prenotazione.conferma">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'PrenotazioneEdit', params: { prenotazioneId: prenotazione.id } }"
|
|
||||||
class="btn btn-primary btn-sm edit"
|
|
||||||
data-cy="entityEditButton"
|
|
||||||
>
|
|
||||||
<font-awesome-icon icon="pencil-alt"></font-awesome-icon>
|
|
||||||
<span class="d-none d-md-inline">{{ t$('entity.action.edit') }}</span>
|
|
||||||
</router-link>
|
|
||||||
<b-button
|
|
||||||
@click="prepareRemove(prenotazione)"
|
|
||||||
variant="danger"
|
|
||||||
class="btn btn-sm"
|
|
||||||
data-cy="entityDeleteButton"
|
|
||||||
v-b-modal.removeEntity
|
|
||||||
>
|
|
||||||
<font-awesome-icon icon="times"></font-awesome-icon>
|
|
||||||
<span class="d-none d-md-inline">{{ t$('entity.action.delete') }}</span>
|
|
||||||
</b-button>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<b-modal ref="removeEntity" id="removeEntity">
|
|
||||||
<template #title>
|
|
||||||
<span id="smartbookingApp.prenotazione.delete.question" data-cy="prenotazioneDeleteDialogHeading">{{
|
|
||||||
t$('entity.delete.title')
|
|
||||||
}}</span>
|
|
||||||
</template>
|
|
||||||
<div class="modal-body">
|
|
||||||
<p id="jhi-delete-prenotazione-heading">{{ t$('smartbookingApp.prenotazione.delete.question', { id: removeId }) }}</p>
|
|
||||||
</div>
|
|
||||||
<template #footer>
|
|
||||||
<div>
|
|
||||||
<button type="button" class="btn btn-secondary" @click="closeDialog()">{{ t$('entity.action.cancel') }}</button>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-primary"
|
|
||||||
id="jhi-confirm-delete-prenotazione"
|
|
||||||
data-cy="entityConfirmDeleteButton"
|
|
||||||
@click="removePrenotazione"
|
|
||||||
>
|
|
||||||
{{ t$('entity.action.delete') }}
|
|
||||||
</button>
|
</button>
|
||||||
|
<router-link :to="{ name: 'PrenotazioneNuova' }" custom v-slot="{ navigate }">
|
||||||
|
<button
|
||||||
|
@click="navigate"
|
||||||
|
id="jh-create-entity"
|
||||||
|
data-cy="entityCreateButton"
|
||||||
|
class="btn btn-primary jh-create-entity create-prenotazione"
|
||||||
|
>
|
||||||
|
<font-awesome-icon icon="plus"></font-awesome-icon>
|
||||||
|
<span>{{ t$('smartbookingApp.prenotazione.home.createLabel') }}</span>
|
||||||
|
</button>
|
||||||
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</h2>
|
||||||
</b-modal>
|
<br />
|
||||||
<div v-show="prenotaziones?.length > 0">
|
<div class="alert alert-warning" v-if="!isFetching && prenotaziones?.length === 0">
|
||||||
<div class="d-flex justify-content-center">
|
<span>{{ t$('smartbookingApp.prenotazione.home.notFound') }}</span>
|
||||||
<jhi-item-count :page="page" :total="queryCount" :items-per-page="itemsPerPage"></jhi-item-count>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="table-responsive" v-if="prenotaziones?.length > 0">
|
||||||
<b-pagination size="md" :total-rows="totalItems" v-model="page" :per-page="itemsPerPage"></b-pagination>
|
<table class="table table-striped" aria-describedby="prenotaziones">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col" @click="changeOrder('id')">
|
||||||
|
<span>{{ t$('global.field.id') }}</span>
|
||||||
|
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'id'"></jhi-sort-indicator>
|
||||||
|
</th>
|
||||||
|
<th scope="col" @click="changeOrder('oraInizio')">
|
||||||
|
<span>{{ t$('smartbookingApp.prenotazione.oraInizio') }}</span>
|
||||||
|
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'oraInizio'"></jhi-sort-indicator>
|
||||||
|
</th>
|
||||||
|
<th scope="col" @click="changeOrder('oraFine')">
|
||||||
|
<span>{{ t$('smartbookingApp.prenotazione.oraFine') }}</span>
|
||||||
|
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'oraFine'"></jhi-sort-indicator>
|
||||||
|
</th>
|
||||||
|
<th scope="col" @click="changeOrder('stato')">
|
||||||
|
<span>{{ t$('smartbookingApp.prenotazione.stato') }}</span>
|
||||||
|
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'stato'"></jhi-sort-indicator>
|
||||||
|
</th>
|
||||||
|
<th scope="col" @click="changeOrder('struttura.nome')">
|
||||||
|
<span>{{ t$('smartbookingApp.prenotazione.struttura') }}</span>
|
||||||
|
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'struttura.nome'"></jhi-sort-indicator>
|
||||||
|
</th>
|
||||||
|
<th scope="col" @click="changeOrder('motivoEvento')">
|
||||||
|
<span>{{ t$('smartbookingApp.prenotazione.motivoEvento') }}</span>
|
||||||
|
<jhi-sort-indicator :current-order="propOrder" :reverse="reverse" :field-name="'motivoEvento'"></jhi-sort-indicator>
|
||||||
|
</th>
|
||||||
|
<th scope="col"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="prenotazione in prenotaziones" :key="prenotazione.id" data-cy="entityTable">
|
||||||
|
<td>
|
||||||
|
<router-link :to="{ name: 'PrenotazioneView', params: { prenotazioneId: prenotazione.id } }">{{
|
||||||
|
prenotazione.id
|
||||||
|
}}</router-link>
|
||||||
|
</td>
|
||||||
|
<td>{{ formatDateShort(prenotazione.oraInizio) || '' }}</td>
|
||||||
|
<td>{{ formatDateShort(prenotazione.oraFine) || '' }}</td>
|
||||||
|
<td>{{ t$('smartbookingApp.StatoPrenotazione.' + prenotazione.stato) }}</td>
|
||||||
|
<td>
|
||||||
|
<div v-if="prenotazione.struttura">{{ prenotazione.struttura.nome }}</div>
|
||||||
|
</td>
|
||||||
|
<td>{{ prenotazione.motivoEvento }}</td>
|
||||||
|
<td class="text-end">
|
||||||
|
<div class="btn-group">
|
||||||
|
<router-link
|
||||||
|
:to="{ name: 'PrenotazioneView', params: { prenotazioneId: prenotazione.id } }"
|
||||||
|
class="btn btn-info btn-sm details"
|
||||||
|
data-cy="entityDetailsButton"
|
||||||
|
>
|
||||||
|
<font-awesome-icon icon="eye"></font-awesome-icon>
|
||||||
|
<span class="d-none d-md-inline">{{ t$('entity.action.view') }}</span>
|
||||||
|
</router-link>
|
||||||
|
<!-- Show conferma link when conferma exists -->
|
||||||
|
<router-link
|
||||||
|
v-if="prenotazione.conferma"
|
||||||
|
:to="{ name: 'ConfermaView', params: { confermaId: prenotazione.conferma.id } }"
|
||||||
|
class="btn btn-secondary btn-sm"
|
||||||
|
data-cy="entityConfermaButton"
|
||||||
|
>
|
||||||
|
<font-awesome-icon icon="file-alt"></font-awesome-icon>
|
||||||
|
<span class="d-none d-md-inline">{{ t$('smartbookingApp.prenotazione.viewConferma') }}</span>
|
||||||
|
</router-link>
|
||||||
|
<!-- Edit and Delete only when no conferma -->
|
||||||
|
<template v-if="!prenotazione.conferma">
|
||||||
|
<router-link
|
||||||
|
:to="{ name: 'PrenotazioneEdit', params: { prenotazioneId: prenotazione.id } }"
|
||||||
|
class="btn btn-primary btn-sm edit"
|
||||||
|
data-cy="entityEditButton"
|
||||||
|
>
|
||||||
|
<font-awesome-icon icon="pencil-alt"></font-awesome-icon>
|
||||||
|
<span class="d-none d-md-inline">{{ t$('entity.action.edit') }}</span>
|
||||||
|
</router-link>
|
||||||
|
<b-button
|
||||||
|
@click="prepareRemove(prenotazione)"
|
||||||
|
variant="danger"
|
||||||
|
class="btn btn-sm"
|
||||||
|
data-cy="entityDeleteButton"
|
||||||
|
v-b-modal.removeEntity
|
||||||
|
>
|
||||||
|
<font-awesome-icon icon="times"></font-awesome-icon>
|
||||||
|
<span class="d-none d-md-inline">{{ t$('entity.action.delete') }}</span>
|
||||||
|
</b-button>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<b-modal ref="removeEntity" id="removeEntity">
|
||||||
|
<template #title>
|
||||||
|
<span id="smartbookingApp.prenotazione.delete.question" data-cy="prenotazioneDeleteDialogHeading">{{
|
||||||
|
t$('entity.delete.title')
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p id="jhi-delete-prenotazione-heading">{{ t$('smartbookingApp.prenotazione.delete.question', { id: removeId }) }}</p>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<div>
|
||||||
|
<button type="button" class="btn btn-secondary" @click="closeDialog()">{{ t$('entity.action.cancel') }}</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-primary"
|
||||||
|
id="jhi-confirm-delete-prenotazione"
|
||||||
|
data-cy="entityConfirmDeleteButton"
|
||||||
|
@click="removePrenotazione"
|
||||||
|
>
|
||||||
|
{{ t$('entity.action.delete') }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</b-modal>
|
||||||
|
<div v-show="prenotaziones?.length > 0">
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<jhi-item-count :page="page" :total="queryCount" :items-per-page="itemsPerPage"></jhi-item-count>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<b-pagination size="md" :total-rows="totalItems" v-model="page" :per-page="itemsPerPage"></b-pagination>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -211,11 +219,7 @@
|
|||||||
<font-awesome-icon icon="eye"></font-awesome-icon>
|
<font-awesome-icon icon="eye"></font-awesome-icon>
|
||||||
<span class="d-none d-md-inline">{{ t$('entity.action.view') }}</span>
|
<span class="d-none d-md-inline">{{ t$('entity.action.view') }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
<button
|
<button class="btn btn-success btn-sm" data-cy="prendiInCaricoButton" @click="prendiInCarico(prenotazione)">
|
||||||
class="btn btn-success btn-sm"
|
|
||||||
data-cy="prendiInCaricoButton"
|
|
||||||
@click="prendiInCarico(prenotazione)"
|
|
||||||
>
|
|
||||||
<font-awesome-icon icon="check"></font-awesome-icon>
|
<font-awesome-icon icon="check"></font-awesome-icon>
|
||||||
<span class="d-none d-md-inline">{{ t$('smartbookingApp.prenotazione.prendiInCarico.button') }}</span>
|
<span class="d-none d-md-inline">{{ t$('smartbookingApp.prenotazione.prendiInCarico.button') }}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -304,7 +308,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- "Prendi in carico" modal -->
|
<!-- "Prendi in carico" modal -->
|
||||||
<b-modal v-model="showPrendiInCaricoModal" :title="t$('smartbookingApp.prenotazione.prendiInCarico.title')" @hidden="closePrendiInCaricoModal">
|
<b-modal
|
||||||
|
v-model="showPrendiInCaricoModal"
|
||||||
|
:title="t$('smartbookingApp.prenotazione.prendiInCarico.title')"
|
||||||
|
@hidden="closePrendiInCaricoModal"
|
||||||
|
>
|
||||||
<div v-if="selectedPrenotazione">
|
<div v-if="selectedPrenotazione">
|
||||||
<p class="text-muted mb-3">
|
<p class="text-muted mb-3">
|
||||||
{{ t$('smartbookingApp.prenotazione.prendiInCarico.subtitle', { id: selectedPrenotazione.id }) }}
|
{{ t$('smartbookingApp.prenotazione.prendiInCarico.subtitle', { id: selectedPrenotazione.id }) }}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
"nome": "Nome",
|
"nome": "Nome",
|
||||||
"testo": "Testo",
|
"testo": "Testo",
|
||||||
"documento": "Documento",
|
"documento": "Documento",
|
||||||
|
"download": "Download documento",
|
||||||
"validoDal": "Valido Dal",
|
"validoDal": "Valido Dal",
|
||||||
"validoAl": "Valido Al",
|
"validoAl": "Valido Al",
|
||||||
"struttura": "Struttura"
|
"struttura": "Struttura"
|
||||||
|
|||||||
Reference in New Issue
Block a user