Skip to content

Commit 6970f76

Browse files
committed
Prettier
1 parent 852ba8f commit 6970f76

File tree

4 files changed

+17
-32
lines changed

4 files changed

+17
-32
lines changed

htdocs/equipment/categories.js

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
var categories = [
2-
{ name: 'Canoë & Kayak', plural: 'canoës et kayaks',
3-
value: 'Kayak', image: 'canoe.png'},
4-
{ name: 'SUP', plural: 'SUPs',
5-
value: 'SUP', image: 'sup.png' },
6-
{ name: 'Rame', plural: 'avirons',
7-
value: 'Aviron', image: 'rowing.png' },
8-
{ name: 'Planche à voile', plural: 'planches à voile',
9-
value: 'Planche', image: 'windsurf.png' },
10-
{ name: 'Voile', plural: 'bateaux',
11-
value: 'Voile lestée', image: 'sailing.png' },
12-
{ name: 'Wingfoil', plural: 'wingfoils',
13-
value: 'Wingfoil', image: 'wingfoil.svg' }
14-
]
2+
{name: 'Canoë & Kayak', plural: 'canoës et kayaks', value: 'Kayak', image: 'canoe.png'},
3+
{name: 'SUP', plural: 'SUPs', value: 'SUP', image: 'sup.png'},
4+
{name: 'Rame', plural: 'avirons', value: 'Aviron', image: 'rowing.png'},
5+
{name: 'Planche à voile', plural: 'planches à voile', value: 'Planche', image: 'windsurf.png'},
6+
{name: 'Voile', plural: 'bateaux', value: 'Voile lestée', image: 'sailing.png'},
7+
{name: 'Wingfoil', plural: 'wingfoils', value: 'Wingfoil', image: 'wingfoil.svg'},
8+
];
159

16-
function loadMateriel(
17-
container = $('divTabCahierEquipmentCategoriesContainer')
18-
) {
10+
function loadMateriel(container = $('divTabCahierEquipmentCategoriesContainer')) {
1911
for (var i = 0; i < categories.length; i++) {
2012
var d = document.createElement('div');
2113
d.id = categories[i].name;
@@ -28,9 +20,7 @@ function loadMateriel(
2820

2921
var dTop = div(d1);
3022
dTop.classList.add('BoxesTop');
31-
dTop.style.backgroundImage = 'url(img/icons/chose.png),' +
32-
'url(img/categorie/' +
33-
categories[i].image + ')';
23+
dTop.style.backgroundImage = 'url(img/icons/chose.png),' + 'url(img/categorie/' + categories[i].image + ')';
3424

3525
var dBottom = document.createElement('div');
3626
dBottom.classList.add('BoxesBottom');
@@ -44,8 +34,7 @@ function loadMateriel(
4434
var dBottomText2 = document.createElement('div');
4535
dBottomText2.classList.add('BoxesBottomText2');
4636
dBottom.appendChild(dBottomText2);
47-
Requests.getBookableNbrForBookableTag(categories[i].value,
48-
dBottomText2, '', ' ' + categories[i].plural);
37+
Requests.getBookableNbrForBookableTag(categories[i].value, dBottomText2, '', ' ' + categories[i].plural);
4938

5039
if (categories[i].value == 'MP') {
5140
// useless

htdocs/equipment/elements.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,5 @@ function changeSelectCategorie(elem) {
185185
break;
186186
}
187187
}
188-
$('divTabCahierEquipmentElementsSelectCategorie')
189-
.getElementsByTagName('div')[0].style.backgroundImage = image;
188+
$('divTabCahierEquipmentElementsSelectCategorie').getElementsByTagName('div')[0].style.backgroundImage = image;
190189
}

htdocs/general/server-requests.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ var Requests = {
688688

689689
Server.bookingService.getAll(variables).subscribe(bookings => {
690690
//console.log("getBookableInfos()_getLastBooking: ", bookings);
691-
bookable = Object.assign({}, result.items[0])
691+
bookable = Object.assign({}, result.items[0]);
692692
actualizePopBookable(nbr, bookable, bookings, elem, []);
693693
});
694694
});
@@ -732,9 +732,7 @@ var Requests = {
732732

733733
Server.bookingService.getAll(variables).subscribe(bookings => {
734734
// console.log("getBookableLastBooking(): ", bookings);
735-
Cahier.actualizeAvailability(
736-
bookableId, mutableBookingList(bookings.items)
737-
);
735+
Cahier.actualizeAvailability(bookableId, mutableBookingList(bookings.items));
738736
});
739737
},
740738

@@ -806,9 +804,7 @@ var Requests = {
806804

807805
Server.bookingService.getAll(variables).subscribe(result => {
808806
//console.log("checksBookablesAvailabilityBeforeConfirming(): ", result);
809-
Cahier.actualizeConfirmKnowingBookablesAvailability(
810-
mutableBookingList(result.items)
811-
);
807+
Cahier.actualizeConfirmKnowingBookablesAvailability(mutableBookingList(result.items));
812808
});
813809
},
814810

@@ -1577,7 +1573,7 @@ var Requests = {
15771573
getOwnerLicenses: function (_owner) {
15781574
Server.userService.getOne(_owner.id).subscribe(result => {
15791575
// console.log("getOwnerLicenses(): ", result);
1580-
owner = Object.assign({}, result)
1576+
owner = Object.assign({}, result);
15811577
Cahier.setOwnerLicenses(owner);
15821578
});
15831579
},

htdocs/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@
448448
</div>
449449
</div>
450450
<script type="module">
451-
const apiServer = window.location.hostname === 'navigations.ichtus.club' ? 'ichtus.club' : 'dev.ichtus.club';
451+
const apiServer =
452+
window.location.hostname === 'navigations.ichtus.club' ? 'ichtus.club' : 'dev.ichtus.club';
452453
const cacheBuster = '?time=' + new Date().getTime();
453454

454455
await import('https://' + apiServer + '/vanilla/main.js' + cacheBuster);

0 commit comments

Comments
 (0)