Big refactoring.
- clubs, booking platforms and user are now defined in customization files -> there are less environment variables - the responsibility of the session moved - booking cancellation is available
This commit is contained in:
parent
dbda5a158e
commit
0938fb98b7
27 changed files with 3050 additions and 696 deletions
160
resa_padel/resources/clubs.yaml
Normal file
160
resa_padel/resources/clubs.yaml
Normal file
|
@ -0,0 +1,160 @@
|
|||
clubs:
|
||||
- name: Toulouse Padel Club
|
||||
url: https://www.toulousepadelclub.com
|
||||
id: tpc
|
||||
bookingPlatform:
|
||||
id: gestion-sports
|
||||
clubId: 88
|
||||
url: https://toulousepadelclub.gestion-sports.com
|
||||
hoursBeforeCancellation: 4
|
||||
bookingOpening:
|
||||
daysBefore: 7
|
||||
time: 00:00
|
||||
totalBookings:
|
||||
peakHours: 1
|
||||
offPeakHours: unlimited
|
||||
sports:
|
||||
- name: Padel
|
||||
id: 217
|
||||
duration: 90
|
||||
price: 48
|
||||
players: 4
|
||||
courts:
|
||||
- name: Court 1
|
||||
number: 1
|
||||
id: 598
|
||||
isIndoor: True
|
||||
- name: Court 2
|
||||
number: 2
|
||||
id: 599
|
||||
isIndoor: True
|
||||
- name: Court 3
|
||||
number: 3
|
||||
id: 600
|
||||
isIndoor: True
|
||||
- name: Court 4
|
||||
number: 4
|
||||
id: 601
|
||||
isIndoor: True
|
||||
- name: Court 5
|
||||
number: 5
|
||||
id: 602
|
||||
isIndoor: True
|
||||
- name: Court 6
|
||||
number: 6
|
||||
id: 603
|
||||
isIndoor: True
|
||||
- name: Court 7
|
||||
number: 7
|
||||
id: 604
|
||||
isIndoor: True
|
||||
- name: Court 8
|
||||
number: 8
|
||||
id: 605
|
||||
isIndoor: True
|
||||
- name: Court 9
|
||||
number: 9
|
||||
id: 606
|
||||
isIndoor: True
|
||||
- name: Court 10
|
||||
number: 10
|
||||
id: 607
|
||||
isIndoor: True
|
||||
- name: Court 11
|
||||
number: 11
|
||||
id: 608
|
||||
isIndoor: True
|
||||
- name: Court 12
|
||||
number: 12
|
||||
id: 609
|
||||
isIndoor: True
|
||||
- name: Court 13
|
||||
number: 13
|
||||
id: 610
|
||||
isIndoor: True
|
||||
- name: Court 14
|
||||
number: 14
|
||||
id: 611
|
||||
isIndoor: True
|
||||
- name: Squash
|
||||
id: 218
|
||||
duration: 45
|
||||
price: 18
|
||||
players: 2
|
||||
courts:
|
||||
- name: Court 1
|
||||
id: 613
|
||||
number: 1
|
||||
isIndoor: True
|
||||
- name: Court 2
|
||||
number: 2
|
||||
id: 614
|
||||
isIndoor: True
|
||||
- name: Court 3
|
||||
number: 3
|
||||
id: 615
|
||||
isIndoor: True
|
||||
- name: Court 4
|
||||
number: 4
|
||||
id: 616
|
||||
isIndoor: True
|
||||
|
||||
- name: Padel Tolosa
|
||||
url: https://www.padeltolosa.fr/
|
||||
id: padeltolosa
|
||||
bookingPlatform:
|
||||
id: gestion-sports
|
||||
clubId: 89
|
||||
url: https://padeltolosa.gestion-sports.com/
|
||||
hoursBeforeCancellation: 24
|
||||
bookingOpening:
|
||||
daysBefore: 7
|
||||
time: 00:00
|
||||
totalBookings:
|
||||
peakHours: 4
|
||||
offPeakHours: unlimited
|
||||
sports:
|
||||
- name: Padel
|
||||
id: 262
|
||||
duration: 90
|
||||
price: 48
|
||||
players: 4
|
||||
courts:
|
||||
- name: Court 1 M.F IMMOBILLIER
|
||||
number: 1
|
||||
id: 746
|
||||
isIndoor: True
|
||||
- name: Court 2 PAQUITO
|
||||
number: 2
|
||||
id: 747
|
||||
isIndoor: True
|
||||
- name: Court 3 Seven Sisters PUB TOULOUSE
|
||||
number: 3
|
||||
id: 748
|
||||
isIndoor: True
|
||||
- name: Court MADRID
|
||||
number: 4
|
||||
id: 749
|
||||
isIndoor: True
|
||||
- name: Squash
|
||||
id: 218
|
||||
duration: 45
|
||||
price: 18
|
||||
players: 2
|
||||
courts:
|
||||
- name: Court 1
|
||||
id: 613
|
||||
isIndoor: True
|
||||
number: 1
|
||||
- name: Court 2
|
||||
id: 614
|
||||
isIndoor: True
|
||||
number: 2
|
||||
- name: Court 3
|
||||
id: 615
|
||||
isIndoor: True
|
||||
number: 3
|
||||
- name: Court 4
|
||||
id: 616
|
||||
isIndoor: True
|
||||
number: 4
|
|
@ -0,0 +1 @@
|
|||
ajax=removeResa&hash={{ hash }}&id={{ booking_id }}
|
|
@ -1 +1 @@
|
|||
ajax=addResa&date={{ booking_filter.date.date().strftime("%d/%m/%Y") }}&hour={{ booking_filter.date.time().strftime("%H:%M") }}&duration=90&partners=null|null|null&paiement=facultatif&idSport={{ booking_filter.sport_id }}&creaPartie=false&idCourt={{ court_id }}&pay=false&token=undefined&totalPrice=44&saveCard=0&foodNumber=0
|
||||
ajax=addResa&date={{ date.date().strftime("%d/%m/%Y") }}&hour={{ date.time().strftime("%H:%M") }}&duration=90&partners=null|null|null&paiement=facultatif&idSport={{ sport_id }}&creaPartie=false&idCourt={{ court_id }}&pay=false&token=undefined&totalPrice=48&saveCard=0&foodNumber=0
|
||||
|
|
|
@ -1 +1 @@
|
|||
ajax=connexionUser&id_club={{ club.id }}&email={{ user.login }}&form_ajax=1&pass={{ user.password }}&compte=user&playeridonesignal=0&identifiant=identifiant&externCo=true
|
||||
ajax=connexionUser&id_club={{ club.booking_platform.club_id }}&email={{ user.login }}&form_ajax=1&pass={{ user.password }}&compte=user&playeridonesignal=0&identifiant=identifiant&externCo=true
|
||||
|
|
19
resa_padel/resources/platforms.yaml
Normal file
19
resa_padel/resources/platforms.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
platforms:
|
||||
- name: Gestion sports
|
||||
url: https://gestion-sports.fr/
|
||||
id: gestion-sports
|
||||
urls:
|
||||
- name: landing-page
|
||||
path: /connexion.php
|
||||
- name: login
|
||||
path: /connexion.php
|
||||
payloadTemplate: gestion-sports/login-payload.txt
|
||||
- name: booking
|
||||
path: /membre/reservation.html
|
||||
payloadTemplate: gestion-sports/booking-payload.txt
|
||||
- name: user-bookings
|
||||
path: /membre/mesresas.html
|
||||
payloadTemplate: gestion-sports/user-bookings-payload.txt
|
||||
- name: cancellation
|
||||
path: /membre/mesresas.html
|
||||
payloadTemplate: gestion-sports/booking-cancellation-payload.txt
|
13
resa_padel/resources/users.yaml
Normal file
13
resa_padel/resources/users.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
clubs:
|
||||
- id: tpc
|
||||
users:
|
||||
- login: padel.testing@jouf.fr
|
||||
password: ridicule
|
||||
- login: mateochal31@gmail.com
|
||||
password: pleanyakis
|
||||
- id: padeltolosa
|
||||
users:
|
||||
- login: padel.testing@jouf.fr
|
||||
password: ridicule
|
||||
- login: mateochal31@gmail.com
|
||||
password: pleanyakis
|
Loading…
Add table
Add a link
Reference in a new issue