Commit 18201c2c authored by François-Xavier Lebastard's avatar François-Xavier Lebastard
Browse files

Merge remote-tracking branch 'origin/feature/UNOTOPLYS-171_reordonner_ecrans'...

Merge remote-tracking branch 'origin/feature/UNOTOPLYS-171_reordonner_ecrans' into feature/UNOTOPLYS-171_reordonner_ecrans
parents a83bdc4a a3c5705d
......@@ -46,7 +46,7 @@ def orientationActiveDeploymentStep = { defaultStep ->
]
pipelineParams.HELM_TEMPLATE_NAME_APP = 'kosmos-releases/unantes-orientation-active-app'
pipelineParams.HELM_TEMPLATE_VERSION_APP = '0.1.2'
pipelineParams.HELM_TEMPLATE_VERSION_APP = '0.1.3'
defaultStep()
}
......
......@@ -21,6 +21,7 @@
"vue-meta": "^2.4.0",
"vue-property-decorator": "9.1.2",
"vue-router": "3.5.1",
"vue-uuid": "^2.0.2",
"vue2-filters": "0.12.0",
"vuelidate": "0.7.6",
"vuex": "3.6.2"
......@@ -3394,6 +3395,12 @@
"source-map": "^0.6.1"
}
},
"node_modules/@types/uuid": {
"version": "8.3.0",
"resolved": "http://nexus.nantes.kosmos.fr:8081/nexus/repository/public.npm/@types/uuid/-/uuid-8.3.0.tgz",
"integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==",
"license": "MIT"
},
"node_modules/@types/vuelidate": {
"version": "0.7.14",
"resolved": "https://registry.npmjs.org/@types/vuelidate/-/vuelidate-0.7.14.tgz",
......@@ -34031,7 +34038,6 @@
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"bin": {
"uuid": "dist/bin/uuid"
}
......@@ -34482,6 +34488,16 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true
},
"node_modules/vue-uuid": {
"version": "2.0.2",
"resolved": "http://nexus.nantes.kosmos.fr:8081/nexus/repository/public.npm/vue-uuid/-/vue-uuid-2.0.2.tgz",
"integrity": "sha512-PRf1CHg3uKi77bVRyAuW2u/T2PO9LxMr7cw9t9rNdpZTkNDyw1Fx6eJVL+8JOtM9VxxPkoZ/rwhXJ5l+X5AYzQ==",
"license": "MIT",
"dependencies": {
"@types/uuid": "^8.0.0",
"uuid": "^8.1.0"
}
},
"node_modules/vue2-filters": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/vue2-filters/-/vue2-filters-0.12.0.tgz",
......@@ -40167,6 +40183,11 @@
"source-map": "^0.6.1"
}
},
"@types/uuid": {
"version": "8.3.0",
"resolved": "http://nexus.nantes.kosmos.fr:8081/nexus/repository/public.npm/@types/uuid/-/uuid-8.3.0.tgz",
"integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ=="
},
"@types/vuelidate": {
"version": "0.7.14",
"resolved": "https://registry.npmjs.org/@types/vuelidate/-/vuelidate-0.7.14.tgz",
......@@ -64811,8 +64832,7 @@
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"v8-compile-cache": {
"version": "2.3.0",
......@@ -65177,6 +65197,15 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true
},
"vue-uuid": {
"version": "2.0.2",
"resolved": "http://nexus.nantes.kosmos.fr:8081/nexus/repository/public.npm/vue-uuid/-/vue-uuid-2.0.2.tgz",
"integrity": "sha512-PRf1CHg3uKi77bVRyAuW2u/T2PO9LxMr7cw9t9rNdpZTkNDyw1Fx6eJVL+8JOtM9VxxPkoZ/rwhXJ5l+X5AYzQ==",
"requires": {
"@types/uuid": "^8.0.0",
"uuid": "^8.1.0"
}
},
"vue2-filters": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/vue2-filters/-/vue2-filters-0.12.0.tgz",
......@@ -8,7 +8,7 @@
"prettier:check": "prettier --check \"{,src/**/,webpack/}*.{md,json,yml,html,js,ts,tsx,css,scss,vue,java}\"",
"prettier:format": "prettier --write \"{,src/**/,webpack/}*.{md,json,yml,html,js,ts,tsx,css,scss,vue,java}\"",
"lint": "vue-cli-service lint --no-fix",
"lint:fix": "vue-cli-service lint",
"lint:fix": "vue-cli-service lint --fix",
"cleanup": "rimraf target/classes/static/",
"clean-www": "rimraf target/classes/static/app/{src,target/}",
"start": "npm run webapp:dev",
......@@ -86,6 +86,7 @@
"vue-meta": "^2.4.0",
"vue-property-decorator": "9.1.2",
"vue-router": "3.5.1",
"vue-uuid": "^2.0.2",
"vue2-filters": "0.12.0",
"vuelidate": "0.7.6",
"vuex": "3.6.2"
......
......@@ -7,7 +7,7 @@ export default class ConfigurationService {
const properties = [];
const propertiesObject = this.getConfigPropertiesObjects(res.data);
for (const key in propertiesObject) {
if (propertiesObject.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(propertiesObject, key)) {
properties.push(propertiesObject[key]);
}
}
......@@ -31,7 +31,7 @@ export default class ConfigurationService {
const detailProperties = propertyObject['properties'];
const vals = [];
for (const keyDetail in detailProperties) {
if (detailProperties.hasOwnProperty(keyDetail)) {
if (Object.prototype.hasOwnProperty.call(detailProperties, keyDetail)) {
vals.push({ key: keyDetail, val: detailProperties[keyDetail]['value'] });
}
}
......
......@@ -46,7 +46,7 @@ export default class HealthService {
let hasDetails = false;
for (const key in healthObject) {
if (healthObject.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(healthObject, key)) {
const value = healthObject[key];
if (key === 'status' || key === 'error') {
healthData[key] = value;
......@@ -73,7 +73,7 @@ export default class HealthService {
public flattenHealthData(result: any, path: any, data: any): any {
for (const key in data) {
if (data.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(data, key)) {
const value = data[key];
if (this.isHealthObject(value)) {
if (this.hasSubSystem(value)) {
......@@ -106,7 +106,7 @@ export default class HealthService {
let result = false;
for (const key in healthObject) {
if (healthObject.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(healthObject, key)) {
const value = healthObject[key];
if (value && value.status) {
result = true;
......@@ -120,7 +120,7 @@ export default class HealthService {
let result = false;
for (const key in healthObject) {
if (healthObject.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(healthObject, key)) {
if (key === 'status') {
result = true;
}
......
......@@ -11,7 +11,7 @@ import Toolbar from '@/components/toolbar/toolbar.vue';
},
})
export default class AdminHomeComponent extends Vue {
private cards: Object[] = [
private cards: any[] = [
{ title: 'Mon premier workspace', number_element: '15', type_element: 'Questionnaires', link: 'ScreenEdit' },
{ title: 'Staps Nantes', number_element: '32', type_element: 'Questionnaires', link: 'ScreenEdit' },
];
......
......@@ -108,13 +108,7 @@
</tr>
</tbody>
</table>
<b-modal
ref="removeUser"
id="removeUser"
title="Confirm delete operation"
v-bind:title="$t('entity.delete.title')"
@ok="deleteUser()"
>
<b-modal ref="removeUser" id="removeUser" v-bind:title="$t('entity.delete.title')" @ok="deleteUser()">
<div class="modal-body">
<p id="jhi-delete-user-heading" v-text="$t('userManagement.delete.question', { login: removeId })">
Are you sure you want to delete this user?
......
import Vue from 'vue';
import Component from 'vue-class-component';
@Component
export default class CardToolbar extends Vue {}
<template>
<!--<div class="flex items-center">-->
<!--<button class="p-1 text-blue-600 transition rounded-md hover:text-white hover:bg-blue-600 focus:ring">-->
<!--<svg class="icon" viewBox="0 0 24 24">-->
<!--<path fill="currentColor" d="M21,7V3H17V4H7V3H3V7H4V17H3V21H7V20H17V21H21V17H20V7H21M18,4H20V6H18V4M4,4H6V6H4V4M6,20H4V18H6V20M20,20H18V18H20V20M18,17H17V18H7V17H6V7H7V6H17V7H18V17M16,8V10H13V16H11V10H8V8H16Z"></path>-->
<!--</svg>-->
<!--</button>-->
<!--<button class="p-1 text-blue-600 transition rounded-md hover:text-white hover:bg-blue-600 focus:ring">-->
<!--<svg class="icon" viewBox="0 0 24 24">-->
<!--<path fill="currentColor" d="M21,3H3C2,3 1,4 1,5V19A2,2 0 0,0 3,21H21C22,21 23,20 23,19V5C23,4 22,3 21,3M5,17L8.5,12.5L11,15.5L14.5,11L19,17H5Z"></path>-->
<!--</svg>-->
<!--</button>-->
<!--<button class="p-1 text-blue-600 transition rounded-md hover:text-white hover:bg-blue-600 focus:ring">-->
<!--<svg class="icon" viewBox="0 0 24 24">-->
<!--<path fill="currentColor" d="M18,9H16V7H18M18,13H16V11H18M18,17H16V15H18M8,9H6V7H8M8,13H6V11H8M8,17H6V15H8M18,3V5H16V3H8V5H6V3H4V21H6V19H8V21H16V19H18V21H20V3H18Z"></path>-->
<!--</svg>-->
<!--</button>-->
<!--<button class="p-1 text-blue-600 transition rounded-md hover:text-white hover:bg-blue-600 focus:ring">-->
<!--<svg class="icon" viewBox="0 0 24 24">-->
<!--<path fill="currentColor" d="M20.56 18H3.44C2.65 18 2 17.37 2 16.59V7.41C2 6.63 2.65 6 3.44 6H20.56C21.35 6 22 6.63 22 7.41V16.59C22 17.37 21.35 18 20.56 18M6.81 15.19V11.53L8.73 13.88L10.65 11.53V15.19H12.58V8.81H10.65L8.73 11.16L6.81 8.81H4.89V15.19H6.81M19.69 12H17.77V8.81H15.85V12H13.92L16.81 15.28L19.69 12Z"></path>-->
<!--</svg>-->
<!--</button>-->
<!--</div>-->
</template>
<script lang="ts" src="./card-toolbar.component.ts" />
import Vue from 'vue';
import Component from 'vue-class-component';
import { Prop } from 'vue-property-decorator';
@Component
export default class Confirm extends Vue {
@Prop()
public title: string;
@Prop()
public confirmLabel: string;
public cancel(event: Event): void {
this.$emit('cancel', event);
}
public confirm(event: Event): void {
this.$emit('confirm', event);
}
}
<template>
<div class="absolute pb-2 text-sm bg-white border rounded-md z-20 w-60 -right-4 top-2">
<p class="p-4">{{ title }}</p>
<button class="w-full px-4 py-1 text-left text-blue-600 hover:bg-blue-100 hover:text-blue-900" @click="cancel">
{{ $t('button.cancel') }}
</button>
<button class="w-full px-4 py-1 text-left text-red-600 hover:bg-red-100 hover:text-red-900" @click="confirm">{{ confirmLabel }}</button>
</div>
</template>
<script lang="ts" src="./confirm.component.ts" />
import Vue from 'vue';
import { uuid } from 'vue-uuid';
import { Prop } from 'vue-property-decorator';
export default abstract class AbstractFormComponent extends Vue {
@Prop()
@Prop({
default() {
return uuid.v1();
},
})
public id: string;
@Prop()
......
<template>
<div :class="['mb-8', disabled ? 'opacity-40' : '']">
<oa-label :id="this.id" :label="label" :required="required" />
<oa-label :id="id" :label="label" :required="required" />
<input
class="w-full px-6 py-4 text-lg transition bg-white border rounded-md outline-none ring-inset focus:ring"
:type="type || 'text'"
:aria-describedby="helpTextId"
:id="this.id"
:id="id"
:placeholder="placeholder"
:required="required"
:disabled="disabled"
......
......@@ -7,7 +7,7 @@
</ol>
<!-- Tabs-->
<ul class="px-4 py-2 border-b md:flex md:justify-center md:text-center md:py-0">
<tab-item v-for="tab in tabs()" :title="tab.title" :link="tab.link" :state="tab.isCurrent ? 'current' : ''" />
<tab-item v-for="(tab, index) in tabs()" :key="index" :title="tab.title" :link="tab.link" :state="tab.isCurrent ? 'current' : ''" />
</ul>
</nav>
<login username="Bob" />
......
<template></template>
<template>
<div></div>
</template>
<script lang="ts" src="./message.component.ts" />
import Vue from 'vue';
import { Component } from 'vue-property-decorator';
import { Component, Inject } from 'vue-property-decorator';
import { IScreen } from '@/shared/model/screen.model';
import ScreenService from '@/entities/screen/screen.service';
import DndList from '@/components/dnd-list/dnd-list.vue';
import Confirm from '@/components/confirm/confirm.vue';
import Icon from '@/components/icon/icon.vue';
@Component({
components: {
DndList,
Confirm,
Icon,
},
})
export default class Panel extends Vue {
@Inject('screenService') private screenService: () => ScreenService;
public showConfirm: boolean;
constructor() {
super();
this.showConfirm = false;
}
public get screenList(): any[] {
return this.$store.getters.screenList;
}
......@@ -45,4 +57,37 @@ export default class Panel extends Vue {
});
}
}
public deleteScreen() {
this.showConfirm = false;
const idScreen = Number.parseInt(this.$store.getters.idScreen, 10);
const idxScreen = this.$store.getters.screenList.findIndex((s: IScreen) => s.id === idScreen);
this.screenService()
.delete(idScreen)
.then(res => {
this.reload(idxScreen);
})
.catch(console.error);
}
public reload(idxScreen: number) {
const screenList = this.$store.getters.screenList;
screenList.splice(idxScreen, 1);
let screen: IScreen;
if (idxScreen === screenList.length) {
screen = screenList[screenList.length - 1];
} else {
screen = screenList[idxScreen];
}
if (screen) {
this.$router.push({
name: 'ScreenEditComponent',
params: {
idWorkspace: this.$store.getters.idWorkspace,
idForm: this.$store.getters.idForm,
idScreen: `${screen.id}`,
},
});
}
}
}
......@@ -9,9 +9,19 @@
<icon name="add" />
<span class="ml-2">{{ $t('screen.add') }}</span>
</router-link>
<button class="flex items-center p-2 text-red-600 transition hover:bg-red-600 focus:ring hover:text-red-100">
<button
class="flex items-center p-2 text-red-600 transition hover:bg-red-600 focus:ring hover:text-red-100"
@click="showConfirm = true"
>
<icon name="trash" />
</button>
<confirm
v-if="showConfirm"
:title="$t('screen.label.delete')"
:confirmLabel="$t('button.delete')"
@cancel="showConfirm = false"
@confirm="deleteScreen"
/>
</div>
<dnd-list :screenList="screenList" :idScreen="idScreen" @update="updateScreenIndex" @selectScreen="selectScreen" />
</div>
......
<template>
<main>
<div class="mb-8 border-b-2">
<oa-input id="type" :label="$t('screen.item.message.type')" :value="configuration.type" required="true" disabled="true" />
<oa-textarea
id="content"
:label="$t('screen.item.message.content')"
:value="configuration.content"
required="true"
@update="setContent"
/>
<oa-input
id="reference"
:label="$t('screen.item.message.reference')"
:value="configuration.reference"
required="true"
@update="setReference"
/>
<oa-input :label="$t('screen.item.message.type')" :value="configuration.type" required="true" disabled="true" />
<oa-textarea :label="$t('screen.item.message.content')" :value="configuration.content" required="true" @update="setContent" />
<oa-input :label="$t('screen.item.message.reference')" :value="configuration.reference" required="true" @update="setReference" />
<oa-input
id="displayCondition"
:label="$t('screen.item.message.displayCondition')"
:value="configuration.displayCondition"
required="true"
@update="setDisplayCondition"
/>
<oa-input
id="style"
:label="$t('screen.item.message.style')"
:value="configuration.style"
required="true"
@update="setStyleAffichage"
/>
<oa-input :label="$t('screen.item.message.style')" :value="configuration.style" required="true" @update="setStyleAffichage" />
</div>
</main>
</template>
......
<template>
<main>
<div class="mb-8 border-b-2">
<oa-input id="type" :label="$t('screen.item.radio.type')" :value="configuration.type" required="true" disabled="true" />
<oa-input :label="$t('screen.item.radio.type')" :value="configuration.type" required="true" disabled="true" />
<oa-input :label="$t('screen.item.radio.question')" :value="configuration.question" required="true" @update="setQuestion" />
<oa-input :label="$t('screen.item.radio.reference')" :value="configuration.reference" required="true" @update="setReference" />
<oa-input
id="question"
:label="$t('screen.item.radio.question')"
:value="configuration.question"
required="true"
@update="setQuestion"
/>
<oa-input
id="reference"
:label="$t('screen.item.radio.reference')"
:value="configuration.reference"
required="true"
@update="setReference"
/>
<oa-input
id="displayCondition"
:label="$t('screen.item.radio.displayCondition')"
:value="configuration.displayCondition"
required="true"
......
<template>
<component :is="componentForItem" :configuration="componentConfiguration" @itemEdit="itemEdit"/>
<component :is="componentForItem" :configuration="componentConfiguration" @itemEdit="itemEdit" />
</template>
<script lang="ts" src="./screen-item-edit.component.ts" />
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment