mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
eslint fixes and new baseline
This commit is contained in:
parent
33cecb518b
commit
3d6ffea58e
File diff suppressed because it is too large
Load Diff
@ -2,9 +2,8 @@ import "es6-promise/auto";
|
|||||||
import { createStore } from "vuex";
|
import { createStore } from "vuex";
|
||||||
|
|
||||||
import prepareLocations from "ChillActivityAssets/vuejs/Activity/store.locations";
|
import prepareLocations from "ChillActivityAssets/vuejs/Activity/store.locations";
|
||||||
import {whoami} from "ChillMainAssets/lib/api/user";
|
import { whoami } from "ChillMainAssets/lib/api/user";
|
||||||
import {mapEntity} from "ChillCalendarAssets/vuejs/Calendar/store/utils";
|
import { postLocation } from "ChillActivityAssets/vuejs/Activity/api";
|
||||||
import {postLocation} from "ChillActivityAssets/vuejs/Activity/api";
|
|
||||||
|
|
||||||
const debug = process.env.NODE_ENV !== "production";
|
const debug = process.env.NODE_ENV !== "production";
|
||||||
|
|
||||||
@ -16,9 +15,7 @@ const store = createStore({
|
|||||||
availableLocations: [],
|
availableLocations: [],
|
||||||
me: null,
|
me: null,
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {},
|
||||||
|
|
||||||
},
|
|
||||||
actions: {
|
actions: {
|
||||||
addAvailableLocationGroup({ commit }, payload) {
|
addAvailableLocationGroup({ commit }, payload) {
|
||||||
commit("addAvailableLocationGroup", payload);
|
commit("addAvailableLocationGroup", payload);
|
||||||
@ -67,7 +64,7 @@ const store = createStore({
|
|||||||
// console.log("### mutation: updateLocation", value);
|
// console.log("### mutation: updateLocation", value);
|
||||||
state.activity.location = value;
|
state.activity.location = value;
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
whoami().then((me) => {
|
whoami().then((me) => {
|
||||||
|
@ -24,7 +24,9 @@
|
|||||||
{{ trans(getTextTitle) }}
|
{{ trans(getTextTitle) }}
|
||||||
<span v-if="flag.loading" class="loading">
|
<span v-if="flag.loading" class="loading">
|
||||||
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
|
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
|
||||||
<span class="sr-only">{{ trans(ADDRESS_LOADING) }}</span>
|
<span class="sr-only">{{
|
||||||
|
trans(ADDRESS_LOADING)
|
||||||
|
}}</span>
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</template>
|
</template>
|
||||||
@ -88,7 +90,9 @@
|
|||||||
{{ trans(getTextTitle) }}
|
{{ trans(getTextTitle) }}
|
||||||
<span v-if="flag.loading" class="loading">
|
<span v-if="flag.loading" class="loading">
|
||||||
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
|
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
|
||||||
<span class="sr-only">{{ trans(ADDRESS_LOADING) }}</span>
|
<span class="sr-only">{{
|
||||||
|
trans(ADDRESS_LOADING)
|
||||||
|
}}</span>
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</template>
|
</template>
|
||||||
@ -174,7 +178,9 @@
|
|||||||
{{ trans(getTextTitle) }}
|
{{ trans(getTextTitle) }}
|
||||||
<span v-if="flag.loading" class="loading">
|
<span v-if="flag.loading" class="loading">
|
||||||
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
|
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
|
||||||
<span class="sr-only">{{ trans(ADDRESS_LOADING) }}</span>
|
<span class="sr-only">{{
|
||||||
|
trans(ADDRESS_LOADING)
|
||||||
|
}}</span>
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</template>
|
</template>
|
||||||
@ -269,7 +275,7 @@ export default {
|
|||||||
CANCEL,
|
CANCEL,
|
||||||
SAVE,
|
SAVE,
|
||||||
PREVIOUS,
|
PREVIOUS,
|
||||||
NEXT
|
NEXT,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ["context", "options", "addressChangedCallback"],
|
props: ["context", "options", "addressChangedCallback"],
|
||||||
@ -391,7 +397,7 @@ export default {
|
|||||||
(this.options.title.edit !== null ||
|
(this.options.title.edit !== null ||
|
||||||
this.options.title.create !== null)
|
this.options.title.create !== null)
|
||||||
) {
|
) {
|
||||||
console.log('this.options.title', this.options.title)
|
console.log("this.options.title", this.options.title);
|
||||||
|
|
||||||
return this.context.edit
|
return this.context.edit
|
||||||
? ACTIVITY_EDIT_ADDRESS
|
? ACTIVITY_EDIT_ADDRESS
|
||||||
@ -525,7 +531,7 @@ export default {
|
|||||||
getAddress(id)
|
getAddress(id)
|
||||||
.then(
|
.then(
|
||||||
(address) =>
|
(address) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.address = address;
|
this.entity.address = address;
|
||||||
this.flag.loading = false;
|
this.flag.loading = false;
|
||||||
resolve();
|
resolve();
|
||||||
@ -542,7 +548,7 @@ export default {
|
|||||||
fetchCountries()
|
fetchCountries()
|
||||||
.then(
|
.then(
|
||||||
(countries) =>
|
(countries) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.loaded.countries = countries.results;
|
this.entity.loaded.countries = countries.results;
|
||||||
if (this.flag.showPane === true) {
|
if (this.flag.showPane === true) {
|
||||||
this.closeShowPane();
|
this.closeShowPane();
|
||||||
@ -570,7 +576,7 @@ export default {
|
|||||||
fetchCities(country)
|
fetchCities(country)
|
||||||
.then(
|
.then(
|
||||||
(cities) =>
|
(cities) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.loaded.cities = cities.results.filter(
|
this.entity.loaded.cities = cities.results.filter(
|
||||||
(c) => c.origin !== 3,
|
(c) => c.origin !== 3,
|
||||||
); // filter out user-defined cities
|
); // filter out user-defined cities
|
||||||
@ -589,7 +595,7 @@ export default {
|
|||||||
fetchReferenceAddresses(city)
|
fetchReferenceAddresses(city)
|
||||||
.then(
|
.then(
|
||||||
(addresses) =>
|
(addresses) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.loaded.addresses = addresses.results;
|
this.entity.loaded.addresses = addresses.results;
|
||||||
this.flag.loading = false;
|
this.flag.loading = false;
|
||||||
resolve();
|
resolve();
|
||||||
@ -820,7 +826,7 @@ export default {
|
|||||||
return postAddress(payload)
|
return postAddress(payload)
|
||||||
.then(
|
.then(
|
||||||
(address) =>
|
(address) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.address = address;
|
this.entity.address = address;
|
||||||
this.flag.loading = false;
|
this.flag.loading = false;
|
||||||
this.flag.success = true;
|
this.flag.success = true;
|
||||||
@ -869,7 +875,7 @@ export default {
|
|||||||
return patchAddress(payload.addressId, payload.newAddress)
|
return patchAddress(payload.addressId, payload.newAddress)
|
||||||
.then(
|
.then(
|
||||||
(address) =>
|
(address) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.address = address;
|
this.entity.address = address;
|
||||||
this.flag.loading = false;
|
this.flag.loading = false;
|
||||||
this.flag.success = true;
|
this.flag.success = true;
|
||||||
|
@ -55,7 +55,9 @@
|
|||||||
:placeholder="trans(ADDRESS_BUILDING_NAME)"
|
:placeholder="trans(ADDRESS_BUILDING_NAME)"
|
||||||
v-model="buildingName"
|
v-model="buildingName"
|
||||||
/>
|
/>
|
||||||
<label for="buildingName">{{ trans(ADDRESS_BUILDING_NAME) }}</label>
|
<label for="buildingName">{{
|
||||||
|
trans(ADDRESS_BUILDING_NAME)
|
||||||
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-floating my-1">
|
<div class="form-floating my-1">
|
||||||
<input
|
<input
|
||||||
@ -77,7 +79,9 @@
|
|||||||
:placeholder="trans(ADDRESS_DISTRIBUTION)"
|
:placeholder="trans(ADDRESS_DISTRIBUTION)"
|
||||||
v-model="distribution"
|
v-model="distribution"
|
||||||
/>
|
/>
|
||||||
<label for="distribution">{{ trans(ADDRESS_DISTRIBUTION) }}</label>
|
<label for="distribution">{{
|
||||||
|
trans(ADDRESS_DISTRIBUTION)
|
||||||
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,7 +57,9 @@
|
|||||||
:placeholder="trans(ADDRESS_STREET_NUMBER)"
|
:placeholder="trans(ADDRESS_STREET_NUMBER)"
|
||||||
v-model="streetNumber"
|
v-model="streetNumber"
|
||||||
/>
|
/>
|
||||||
<label for="streetNumber">{{ trans(ADDRESS_STREET_NUMBER) }}</label>
|
<label for="streetNumber">{{
|
||||||
|
trans(ADDRESS_STREET_NUMBER)
|
||||||
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -172,7 +174,7 @@ export default {
|
|||||||
searchReferenceAddresses(query, this.entity.selected.city)
|
searchReferenceAddresses(query, this.entity.selected.city)
|
||||||
.then(
|
.then(
|
||||||
(addresses) =>
|
(addresses) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.loaded.addresses =
|
this.entity.loaded.addresses =
|
||||||
addresses.results;
|
addresses.results;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
@ -190,7 +192,7 @@ export default {
|
|||||||
fetchReferenceAddresses(this.entity.selected.city)
|
fetchReferenceAddresses(this.entity.selected.city)
|
||||||
.then(
|
.then(
|
||||||
(addresses) =>
|
(addresses) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.loaded.addresses =
|
this.entity.loaded.addresses =
|
||||||
addresses.results;
|
addresses.results;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
@ -189,7 +189,7 @@ export default {
|
|||||||
searchCities(query, this.entity.selected.country)
|
searchCities(query, this.entity.selected.country)
|
||||||
.then(
|
.then(
|
||||||
(cities) =>
|
(cities) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.loaded.cities =
|
this.entity.loaded.cities =
|
||||||
cities.results.filter(
|
cities.results.filter(
|
||||||
(c) => c.origin !== 3,
|
(c) => c.origin !== 3,
|
||||||
@ -209,7 +209,7 @@ export default {
|
|||||||
fetchCities(this.entity.selected.country)
|
fetchCities(this.entity.selected.country)
|
||||||
.then(
|
.then(
|
||||||
(cities) =>
|
(cities) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.entity.loaded.cities =
|
this.entity.loaded.cities =
|
||||||
cities.results.filter(
|
cities.results.filter(
|
||||||
(c) => c.origin !== 3,
|
(c) => c.origin !== 3,
|
||||||
|
@ -115,7 +115,6 @@ import {
|
|||||||
trans,
|
trans,
|
||||||
} from "translator";
|
} from "translator";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "EditPane",
|
name: "EditPane",
|
||||||
components: {
|
components: {
|
||||||
@ -131,7 +130,7 @@ export default {
|
|||||||
trans,
|
trans,
|
||||||
ADDRESS_SELECT_AN_ADDRESS_TITLE,
|
ADDRESS_SELECT_AN_ADDRESS_TITLE,
|
||||||
ADDRESS_IS_CONFIDENTIAL,
|
ADDRESS_IS_CONFIDENTIAL,
|
||||||
ADDRESS_IS_NO_ADDRESS
|
ADDRESS_IS_NO_ADDRESS,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
|
@ -14,7 +14,9 @@
|
|||||||
|
|
||||||
<div v-if="flag.success" class="alert alert-success">
|
<div v-if="flag.success" class="alert alert-success">
|
||||||
{{ trans(getSuccessText) }}
|
{{ trans(getSuccessText) }}
|
||||||
<span v-if="forceRedirect">{{ trans(ADDRESS_WAIT_REDIRECTION) }}</span>
|
<span v-if="forceRedirect">{{
|
||||||
|
trans(ADDRESS_WAIT_REDIRECTION)
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@ -98,8 +100,8 @@
|
|||||||
:title="trans(getTextButton)"
|
:title="trans(getTextButton)"
|
||||||
>
|
>
|
||||||
<span v-if="displayTextButton">{{
|
<span v-if="displayTextButton">{{
|
||||||
trans(getTextButton)
|
trans(getTextButton)
|
||||||
}}</span>
|
}}</span>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</action-buttons>
|
</action-buttons>
|
||||||
@ -122,8 +124,7 @@ import {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ShowPane",
|
name: "ShowPane",
|
||||||
methods: {
|
methods: {},
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
AddressRenderBox,
|
AddressRenderBox,
|
||||||
ActionButtons,
|
ActionButtons,
|
||||||
@ -137,7 +138,7 @@ export default {
|
|||||||
ADDRESS_WAIT_REDIRECTION,
|
ADDRESS_WAIT_REDIRECTION,
|
||||||
ADDRESS_LOADING,
|
ADDRESS_LOADING,
|
||||||
ADDRESS_ADDRESS_NEW_SUCCESS,
|
ADDRESS_ADDRESS_NEW_SUCCESS,
|
||||||
ADDRESS_ADDRESS_EDIT_SUCCESS
|
ADDRESS_ADDRESS_EDIT_SUCCESS,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
@ -185,7 +186,7 @@ export default {
|
|||||||
? ACTIVITY_CREATE_ADDRESS
|
? ACTIVITY_CREATE_ADDRESS
|
||||||
: ACTIVITY_EDIT_ADDRESS;
|
: ACTIVITY_EDIT_ADDRESS;
|
||||||
}
|
}
|
||||||
console.log('defaultz', this.defaultz);
|
console.log("defaultz", this.defaultz);
|
||||||
return this.context.edit
|
return this.context.edit
|
||||||
? this.defaultz.button.text.edit
|
? this.defaultz.button.text.edit
|
||||||
: this.defaultz.button.text.create;
|
: this.defaultz.button.text.create;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user