Commit 38643bd9 by Administrator

Merge branch 'evolution_bdm' into 'dev_cooperatic'

Integration Evolution bdm

See merge request !87
parents 8dddab8e 4cf3417f
Pipeline #1557 passed with stage
in 1 minute 32 seconds
/static/
/outils/static/
\ No newline at end of file
......@@ -41,7 +41,7 @@ module.exports = {
"block-scoped-var": "off",
"block-spacing": "warn",
"brace-style": "warn",
"callback-return": "warn",
"callback-return": "off",
"camelcase": "off",
"capitalized-comments": "off",
"class-methods-use-this": "error",
......
......@@ -17,3 +17,5 @@ db.sqlite3
shop/shop_admin_settings.json
shop/errors.log
.idea
members/settings.json
.DS_Store
......@@ -2,6 +2,7 @@
MAG_NAME = 'Cleme'
OFFICE_NAME = ''
MAX_BEGIN_HOUR = '19:00'
COMPANY_CODE = 'lacagette'
COMPANY_NAME = 'La Cagette'
WELCOME_ENTRANCE_MSG = 'Bienvenue à La Cagette !'
WELCOME_MAIL_SUBJECT = 'Dernière étape de votre inscription à la Cagette.'
......@@ -54,6 +55,10 @@ EM_URL = ''
RECEPTION_MERGE_ORDERS_PSWD = 'jpsrcp'
RECEPTION_PB = "Ici, vous pouvez signaler toute anomalie lors d'une réception, les produits non commandés, cassés ou pourris. \
Merci d'indiquer un maximum d'informations, le nom du produit et son code barre."
DISPLAY_COL_AUTRES = False
DAV_PATH = '/shared_dir/dav/'
TOOLS_SERVER = 'https://outils.lacagette-coop.fr'
......@@ -91,7 +96,7 @@ DISCOUNT_SHELFS_IDS = [74]
FL_SHELFS = [16, 17, 18]
VRAC_SHELFS = [20, 38]
SHIFT_EXCHANGE_DAYS_TO_HIDE = ''
SHIFT_EXCHANGE_DAYS_TO_HIDE = '0'
SHIFT_INFO = """A la cagette, un service est une plage de trois heures un jour en particulier, par exemple : le mardi 25/09/2018 à 13h15.
<br />A l'inverse, un créneau est une plage de trois heures régulière, par exemple, tous les mardi de semaine A à 13h15."""
PB_INSTRUCTIONS = """Si j'ai un problème, que je suis désinscrit, que je veux changer de créneaux ou quoi que ce soit, merci de vous rendre dans la section \"J'ai un problème\" sur le site web de <a href=\"https://lacagette-coop.fr/?MonEspaceMembre\">La Cagette</a>"""
......@@ -99,10 +104,23 @@ PB_INSTRUCTIONS = """Si j'ai un problème, que je suis désinscrit, que je veux
ENTRANCE_COME_FOR_SHOPING_MSG = "Hey coucou toi ! Cet été nous sommes plus de <strong>1000 acheteur·euses</strong> pour seulement <strong>300 coopérateur·rice·s</strong> en service. <br />Tu fais tes courses à La Cagette cet été ?<br/> Inscris-toi sur ton espace membre !"
ENTRANCE_EXTRA_BUTTONS_DISPLAY = False
ENTRANCE_EASY_SHIFT_VALIDATE = True
ENTRANCE_MISSED_SHIFT_BEGIN_MSG = """La période pendant laquelle il est possible de s'enregistrer est close.<br />
Merci de remplir le formulaire <em>"arrivé·e en retard"</em> <br/>
que vous trouverez <em>sur le site internet de La Cagette</em>
dans la rubrique<br />
"Espace Membre" > "J\'ai un problème ou une demande".<br/>
Le bureau des membres traitera votre demande !'
"""
ENTRANCE_EASY_SHIFT_VALIDATE_MSG = """Si vous faites un service dans un comité, merci de <br/>
valider votre présence en cherchant<br/>
votre nom ou numéro ci-dessous
"""
# Members space / shifts
UNSUBSCRIBED_FORM_LINK = 'https://docs.google.com/forms/d/e/1FAIpQLScWcpls-ruYIp7HdrjRF1B1TyuzdqhvlUIcUWynbEujfj3dTg/viewform'
UNSUBSCRIBED_MSG = 'Vous êtes désincrit·e, merci de remplir <a href="https://docs.google.com/forms/d/e/1FAIpQLSfPiC2PkSem9x_B5M7LKpoFNLDIz0k0V5I2W3Mra9AnqnQunw/viewform">ce formulaire</a> pour vous réinscrire sur un créneau.<br />Vous pouvez également contacter le Bureau des Membres en remplissant <a href="https://docs.google.com/forms/d/e/1FAIpQLSeZP0m5-EXPVJxEKJk6EjwSyZJtnbiGdYDuAeFI3ENsHAOikg/viewform">ce formulaire</a>'
CONFIRME_PRESENT_BTN = 'Clique ici pour valider ta présence'
RECEPTION_PB = "Ici, vous pouvez signaler toute anomalie lors d'une réception, les produits non commandés, cassés ou pourris. \
Merci d'indiquer un maximum d'informations, le nom du produit et son code barre. \
Dans le cas de produits déteriorés, merci d'envoyer une photo avec votre téléphone à [Adresse_email]"
......@@ -110,5 +128,11 @@ RECEPTION_PB = "Ici, vous pouvez signaler toute anomalie lors d'une réception,
# display or not column "Autres" in reception process
DISPLAY_COL_AUTRES = False
# Should block service exchange if old service is happening in less than 24h
BLOCK_SERVICE_EXCHANGE_24H_BEFORE = True
# URL to the metabase dashboard for orders helper
ORDERS_HELPER_METABASE_URL = "https://metabase.lacagette-coop.fr/dashboard/16"
ORDERS_HELPER_METABASE_URL = "url_meta_base"
# New members space
USE_NEW_MEMBERS_SPACE = True
START_DATE_FOR_SHIFTS_HISTORY = "2018-01-01"
AMNISTIE_DATE= "2021-11-24 00:00:00"
......@@ -6,6 +6,7 @@ OPEN_ON_SUNDAY = True
MAG_NAME = ''
OFFICE_NAME = ''
COMPANY_CODE = 'lgds'
COMPANY_NAME = 'Les Grains de Sel'
MAX_BEGIN_HOUR = '19:00'
WELCOME_ENTRANCE_MSG = 'Bienvenue aux Grains de Sel!'
......@@ -92,3 +93,6 @@ ENTRANCE_FTOP_BUTTON_DISPLAY = False
CUSTOM_CSS_FILES = {'all': ['common_lgds.css'],
'members': ['inscription_lgds.css','member_lgds.css']}
# Should block service exchange if old service is happening in less than 24h
BLOCK_SERVICE_EXCHANGE_24H_BEFORE = False
\ No newline at end of file
"""Company specific data values."""
COMPANY_CODE = 'supercafoutch'
"""Odoo coop specific constants ."""
EMAIL_DOMAIN = 'supercafoutch.fr'
......@@ -88,3 +89,6 @@ PROMOTE_SHELFS_IDS = []
DISCOUNT_SHELFS_IDS = []
FL_SHELFS = []
VRAC_SHELFS = []
# Should block service exchange if old service is happening in less than 24h
BLOCK_SERVICE_EXCHANGE_24H_BEFORE = False
\ No newline at end of file
......@@ -9,12 +9,121 @@ from outils.common import MConfig
default_msettings = {'msg_accueil': {'title': 'Message borne accueil',
'type': 'textarea',
'value': ''
'value': '',
'sort_order': 1
},
'no_picture_member_advice': {'title': 'Message avertissement membre sans photo',
'type': 'textarea',
'value': ''
'value': '',
'sort_order': 2
},
'shop_opening_hours': {
'title': 'Horaires ouverture magasin',
'type': 'textarea',
'value': '',
'sort_order': 3
},
'abcd_calendar_link': {
'title': 'Lien vers le calendrier ABCD',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 4
},
'forms_link': {
'title': 'Lien vers la page des formulaires',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 5
},
'unsuscribe_form_link': {
'title': 'Lien vers le formulaire de ré-inscription',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 6
},
'request_form_link': {
'title': 'Faire une demande au Bureau Des Membres',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 7
},
'late_service_form_link': {
'title': 'Retard à mon service ou oubli validation',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 8
},
'change_template_form_link': {
'title': 'Demande de changement de créneau',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 9
},
#TODO vérifier le nom d'un "binome"
'associated_subscribe_form_link': {
'title': 'Demande de création de binôme',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 10
},
#TODO vérifier le nom d'un "binome"
'associated_unsubscribe_form_link': {
'title': 'Se désolidariser de son binôme',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 11
},
'template_unsubscribe_form_link': {
'title': 'Se désinscrire de son créneau',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 12
},
'change_email_form_link': {
'title': 'Changer d\'adresse mail',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 13
},
'coop_unsubscribe_form_link': {
'title': 'Demande de démission de la coopérative et/ou de remboursement de mes parts sociales',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 14
},
'sick_leave_form_link': {
'title': 'Demande de congé maladie ou parental',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 15
},
'underage_subscribe_form_link': {
'title': 'Demande de création d’un compte mineur rattaché',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 16
},
'member_cant_have_delay_form_link': {
'title': 'Lien vers le formulaire pour les membres n\'ayant pas rattrapé leur service après 6 mois',
'type': 'text',
'value': '',
'class': 'link',
'sort_order': 21
}
}
def config(request):
......@@ -38,7 +147,9 @@ def get_settings(request):
for k, v in default_msettings.items():
if not (k in msettings):
msettings[k] = v
result['settings'] = msettings
result['settings'] = dict(sorted(msettings.items(), key=lambda k_v: k_v[1]['sort_order']))
# on preprod server, dict order (through JsonResponse ??) is not respected !!
except Exception as e:
result['error'] = str(e)
else:
......@@ -71,14 +182,14 @@ def add_pts_to_everybody(request, pts, reason):
is_connected_user = CagetteUser.are_credentials_ok(request)
if is_connected_user is True:
try:
fields = ['in_ftop_team']
fields = ['shift_type']
cond = [['is_member', '=', True]]
all_members = CagetteMembers.get(cond, fields)
if all_members and len(all_members) > 0:
ftop_ids = []
standard_ids = []
for m in all_members:
if m['in_ftop_team'] is True:
if m['shift_type'] == 'ftop':
ftop_ids.append(m['id'])
else:
standard_ids.append(m['id'])
......@@ -189,4 +300,66 @@ def create_envelops(request):
response = JsonResponse(res, safe=False)
else:
response = JsonResponse(res, status=403)
return response
\ No newline at end of file
return response
# # # ADMIN / BDM # # #
def admin(request):
""" Administration des membres """
template = loader.get_template('members/admin/index.html')
context = {'title': 'BDM',
'module': 'Membres'}
return HttpResponse(template.render(context, request))
def get_makeups_members(request):
""" Récupération des membres qui doivent faire des rattrapages """
res = CagetteMembers.get_makeups_members()
return JsonResponse({ 'res' : res })
def update_members_makeups(request):
""" Met à jour les rattrapages des membres passés dans la requête """
res = {}
is_connected_user = CagetteUser.are_credentials_ok(request)
if is_connected_user is True:
members_data = json.loads(request.body.decode())
res["res"] = []
for member_data in members_data:
cm = CagetteMember(int(member_data["member_id"]))
res["res"].append(cm.update_member_makeups(member_data))
# Update member standard points, for standard members only
if member_data["member_shift_type"] == "standard":
# Set points to minus the number of makeups to do (limited to -2)
target_points = - int(member_data["target_makeups_nb"])
if (target_points < -2) :
target_points = -2
member_points = cm.get_member_points("standard")
points_diff = abs(member_points - target_points)
# Don't update if no change
if points_diff == 0:
continue
if member_points > target_points:
points_update = - points_diff
else:
points_update = points_diff
data = {
'name': "Modif manuelle des rattrapages depuis l'admin BDM",
'shift_id': False,
'type': member_data["member_shift_type"],
'partner_id': int(member_data["member_id"]),
'point_qty': points_update
}
cm.update_member_points(data)
response = JsonResponse(res)
else:
res["message"] = "Unauthorized"
response = JsonResponse(res, status=403)
return response
......@@ -9,10 +9,10 @@ from products.models import OFF
from envelops.models import CagetteEnvelops
import sys
from pytz import timezone
import pytz
import locale
import re
import dateutil.parser
......@@ -20,8 +20,8 @@ FUNDRAISING_CAT_ID = {'A': 1, 'B': 2, 'C': 3}
class CagetteMember(models.Model):
"""Class to handle cagette Odoo member."""
m_default_fields = ['name', 'sex', 'image_medium', 'active',
'barcode_base', 'barcode', 'in_ftop_team',
m_default_fields = ['name', 'parent_name', 'sex', 'image_medium', 'active',
'barcode_base', 'barcode', 'shift_type',
'is_associated_people', 'is_member', 'shift_type',
'display_ftop_points', 'display_std_points',
'is_exempted', 'cooperative_state', 'date_alert_stop']
......@@ -61,6 +61,42 @@ class CagetteMember(models.Model):
image = res[0]['image_medium']
return image
def get_member_points(self, shift_type):
points_field = 'final_standard_point' if shift_type == "standard" else 'final_ftop_point'
cond = [['id', '=', self.id]]
fields = ['id', points_field]
res = self.o_api.search_read('res.partner', cond, fields)
if res and len(res) == 1:
return res[0][points_field]
else:
return None
def update_member_points(self, data):
"""
ex:
data = {
'name': reason,
'shift_id': False,
'type': stype,
'partner_id': self.id,
'point_qty': pts
}
"""
try:
return self.o_api.create('shift.counter.event', data)
except Exception as e:
print(str(e))
# # # BDM
def save_partner_info(self, partner_id, fieldsDatas):
print(fieldsDatas)
return self.o_api.update('res.partner', partner_id, fieldsDatas)
@staticmethod
def retrieve_data_according_keys(keys, full=False):
api = OdooAPI()
......@@ -95,19 +131,33 @@ class CagetteMember(models.Model):
api = OdooAPI()
cond = [['email', '=', login]]
if getattr(settings, 'ALLOW_NON_MEMBER_TO_CONNECT', False) is False:
cond.append('|')
cond.append(['is_member', '=', True])
fields = ['name', 'email', 'birthdate', 'create_date', 'cooperative_state']
cond.append(['is_associated_people', '=', True])
fields = ['name', 'email', 'birthdate', 'create_date', 'cooperative_state', 'is_associated_people']
res = api.search_read('res.partner', cond, fields)
if (res and len(res) >= 1):
for coop in res:
y, m, d = coop['birthdate'].split('-')
password = password.replace('/', '')
if (password == d + m + y):
data['id'] = coop['id']
auth_token_seed = fp + coop['create_date']
data['auth_token'] = hashlib.sha256(auth_token_seed.encode('utf-8')).hexdigest()
data['token'] = hashlib.sha256(coop['create_date'].encode('utf-8')).hexdigest()
data['coop_state'] = coop['cooperative_state']
coop_id = None
for item in res:
coop = item
if item["birthdate"] is not False:
coop_birthdate = item['birthdate']
coop_state = item['cooperative_state']
if item["is_associated_people"] == True:
coop_id = item['id']
y, m, d = coop_birthdate.split('-')
password = password.replace('/', '')
if (password == d + m + y):
if coop_id is None:
coop_id = coop['id']
data['id'] = coop_id
auth_token_seed = fp + coop['create_date']
data['auth_token'] = hashlib.sha256(auth_token_seed.encode('utf-8')).hexdigest()
data['token'] = hashlib.sha256(coop['create_date'].encode('utf-8')).hexdigest()
data['coop_state'] = coop_state
if not ('auth_token' in data):
data['failure'] = True
data['msg'] = "Erreur dans le mail ou le mot de passe"
......@@ -593,12 +643,17 @@ class CagetteMember(models.Model):
@staticmethod
def get_state_fr(coop_state):
"""Return french version of given coop_state."""
company = getattr(settings, 'COMPANY_CODE', '')
if coop_state == 'alert':
fr_state = 'En alerte'
elif coop_state == 'delay':
fr_state = 'Délai accordé'
elif coop_state == 'suspended':
fr_state = 'Suspendu(e)'
if company == 'lacagette':
fr_state = 'Rattrapage'
else:
fr_state = 'Suspendu(e)'
elif coop_state == 'not_concerned':
fr_state = 'Non concerné(e)'
elif coop_state == 'blocked':
......@@ -629,7 +684,7 @@ class CagetteMember(models.Model):
locale.setlocale(locale.LC_ALL, 'fr_FR.utf8')
if len(res) > 0:
local_tz = timezone('Europe/Paris')
local_tz = pytz.timezone('Europe/Paris')
for s in res:
date, t = s['date_begin'].split(' ')
year, month, day = date.split('-')
......@@ -663,7 +718,7 @@ class CagetteMember(models.Model):
return m_list
@staticmethod
def search(k_type, key):
def search(k_type, key, shift_id=None):
"""Search member according 3 types of key."""
api = OdooAPI()
if k_type == 'id':
......@@ -675,23 +730,41 @@ class CagetteMember(models.Model):
else:
cond = [['name', 'ilike', str(key)]]
# cond.append(['cooperative_state', '!=', 'unsubscribed'])
res = api.search_read('res.partner', cond, CagetteMember.m_default_fields)
fields = CagetteMember.m_default_fields
if not shift_id is None:
CagetteMember.m_default_fields.append('tmpl_reg_line_ids')
res = api.search_read('res.partner', cond, fields)
members = []
if len(res) > 0:
for m in res:
try:
img_code = base64.b64decode(m['image_medium'])
extension = imghdr.what('', img_code)
m['image_extension'] = extension
except Exception as e:
coop_logger.info("Img error : %s", e)
m['state'] = m['cooperative_state']
m['cooperative_state'] = \
CagetteMember.get_state_fr(m['cooperative_state'])
# member = CagetteMember(m['id'], m['email'])
# m['next_shifts'] = member.get_next_shift()
members.append(m)
keep_it = False
if not shift_id is None and len(shift_id) > 0:
# Only member registred to shift_id will be returned
cond = [['id', '=', m['tmpl_reg_line_ids'][0]]]
fields = ['shift_template_id']
shift_templ_res = api.search_read('shift.template.registration.line', cond, fields)
if (len(shift_templ_res) > 0
and
int(shift_templ_res[0]['shift_template_id'][0]) == int(shift_id)):
keep_it = True
else:
keep_it = True
if keep_it is True:
try:
img_code = base64.b64decode(m['image_medium'])
extension = imghdr.what('', img_code)
m['image_extension'] = extension
except Exception as e:
coop_logger.info("Img error : %s", e)
m['state'] = m['cooperative_state']
m['cooperative_state'] = \
CagetteMember.get_state_fr(m['cooperative_state'])
# member = CagetteMember(m['id'], m['email'])
# m['next_shifts'] = member.get_next_shift()
if not m['parent_name'] is False:
m['name'] += ' / ' + m['parent_name']
del m['parent_name']
members.append(m)
return CagetteMember.add_next_shifts_to_members(members)
......@@ -752,6 +825,33 @@ class CagetteMember(models.Model):
res['error'] = str(e)
return res
def search_associated_people(self):
""" Search for an associated partner """
res = {}
c = [["parent_id", "=", self.id]]
f = ["id", "name", "barcode_base"]
res = self.o_api.search_read('res.partner', c, f)
try:
return res[0]
except:
return None
def update_member_makeups(self, member_data):
api = OdooAPI()
res = {}
f = { 'makeups_to_do': int(member_data["target_makeups_nb"]) }
res_item = api.update('res.partner', [self.id], f)
res = {
'mid': self.id,
'update': res_item
}
return res
class CagetteMembers(models.Model):
"""Class to manage operations on all members or part of them."""
......@@ -761,6 +861,7 @@ class CagetteMembers(models.Model):
api = OdooAPI()
return []
@staticmethod
def raw_search(needle):
"""Search partner with missing elements"""
......@@ -972,7 +1073,13 @@ class CagetteMembers(models.Model):
res['error'] = str(e)
return res
@staticmethod
def get_makeups_members():
api = OdooAPI()
cond = [['makeups_to_do','>', 0]]
fields = ['id', 'name', 'makeups_to_do','shift_type']
res = api.search_read('res.partner', cond, fields)
return res
class CagetteServices(models.Model):
"""Class to handle cagette Odoo services."""
......@@ -1035,7 +1142,7 @@ class CagetteServices(models.Model):
res = api.search_read('shift.shift', c, f, 1, 0, 'date_begin ASC')
if (res and res[0]):
locale.setlocale(locale.LC_ALL, 'fr_FR.utf8')
local_tz = timezone('Europe/Paris')
local_tz = pytz.timezone('Europe/Paris')
date, t = res[0]['date_begin'].split(' ')
year, month, day = date.split('-')
start = datetime.datetime(int(year), int(month), int(day),
......@@ -1045,35 +1152,83 @@ class CagetteServices(models.Model):
return shift
@staticmethod
def get_services_at_time(time, tz_offset):
def get_services_at_time(time, tz_offset, with_members=True):
"""Retrieve present services with member linked."""
import dateutil.parser
# import operator
default_acceptable_minutes_after_shift_begins = getattr(settings, 'ACCEPTABLE_ENTRANCE_MINUTES_AFTER_SHIFT_BEGINS', 15)
minutes_before_shift_starts_delay = getattr(settings, 'ACCEPTABLE_ENTRANCE_MINUTES_BEFORE_SHIFT', 15)
minutes_after_shift_starts_delay = default_acceptable_minutes_after_shift_begins
late_mode = getattr(settings, 'ENTRANCE_WITH_LATE_MODE', False)
max_duration = getattr(settings, 'MAX_DURATION', 180)
if late_mode is True:
minutes_after_shift_starts_delay = getattr(settings, 'ENTRANCE_VALIDATION_GRACE_DELAY', 60)
api = OdooAPI()
now = dateutil.parser.parse(time) - datetime.timedelta(minutes=tz_offset)
start1 = now - datetime.timedelta(minutes=20)
start2 = now + datetime.timedelta(minutes=25)
cond = [['date_begin_tz', '>=', start1.isoformat()],
['date_begin_tz', '<=', start2.isoformat()]]
start1 = now + datetime.timedelta(minutes=minutes_before_shift_starts_delay)
start2 = now - datetime.timedelta(minutes=minutes_after_shift_starts_delay)
end = start1 + datetime.timedelta(minutes=max_duration)
cond = [['date_end_tz', '<=', end.isoformat()]]
cond.append('|')
cond.append(['date_begin_tz', '>=', start1.isoformat()])
cond.append(['date_begin_tz', '>=', start2.isoformat()])
fields = ['name', 'week_number', 'registration_ids',
'standard_registration_ids',
'shift_template_id', 'shift_ticket_ids',
'date_begin_tz', 'date_end_tz']
# return (start1.isoformat(), start2.isoformat())
services = api.search_read('shift.shift', cond, fields)
services = api.search_read('shift.shift', cond, fields,order ="date_begin_tz ASC")
for s in services:
if (len(s['registration_ids']) > 0):
cond = [['id', 'in', s['registration_ids']], ['state', '!=', 'cancel']]
fields = ['partner_id', 'shift_type', 'state']
members = api.search_read('shift.registration', cond, fields)
s['members'] = sorted(members, key=lambda x: x['partner_id'][0])
if late_mode is True:
s['late'] = (
now.replace(tzinfo=None)
-
dateutil.parser.parse(s['date_begin_tz']).replace(tzinfo=None)
).total_seconds() / 60 > default_acceptable_minutes_after_shift_begins
if with_members is True:
cond = [['id', 'in', s['registration_ids']], ['state', 'not in', ['cancel', 'waiting', 'draft']]]
fields = ['partner_id', 'shift_type', 'state', 'is_late']
members = api.search_read('shift.registration', cond, fields)
s['members'] = sorted(members, key=lambda x: x['partner_id'][0])
if len(s['members']) > 0:
# search for associated people linked to these members
mids = []
for m in s['members']:
mids.append(m['partner_id'][0])
cond = [['parent_id', 'in', mids]]
fields = ['parent_id', 'name']
associated = api.search_read('res.partner', cond, fields)
if len(associated) > 0:
for m in s['members']:
for a in associated:
if int(a['parent_id'][0]) == int(m['partner_id'][0]):
m['partner_id'][1] += ' / ' + a['name']
return services
@staticmethod
def registration_done(registration_id):
def registration_done(registration_id, overrided_date=""):
"""Equivalent to click present in presence form."""
api = OdooAPI()
f = {'state': 'done'}
late_mode = getattr(settings, 'ENTRANCE_WITH_LATE_MODE', False)
if late_mode is True:
# services = CagetteServices.get_services_at_time('14:28',0, with_members=False)
if len(overrided_date) > 0 and getattr(settings, 'APP_ENV', "prod") != "prod":
now = overrided_date
else:
local_tz = pytz.timezone('Europe/Paris')
now = datetime.datetime.utcnow().replace(tzinfo=pytz.utc).astimezone(local_tz).strftime("%H:%MZ")
# coop_logger.info("Maintenant = %s (overrided %s) %s", now, overrided_date)
services = CagetteServices.get_services_at_time(now, 0, with_members=False)
if len(services) > 0:
# Notice : Despite is_late is defined as boolean in Odoo, 0 or 1 is needed for api call
is_late = 0
if services[0]['late'] is True:
is_late = 1
f['is_late'] = is_late
else:
return False
return api.update('shift.registration', [int(registration_id)], f)
@staticmethod
......@@ -1096,15 +1251,24 @@ class CagetteServices(models.Model):
return api.update('shift.registration', [int(reg_id)], f)
@staticmethod
def record_absences():
def record_absences(date):
"""Called by cron script."""
import dateutil.parser
now = datetime.datetime.now()
if len(date) > 0:
now = dateutil.parser.parse(date)
else:
now = datetime.datetime.now()
# now = dateutil.parser.parse('2020-09-15T15:00:00Z')
date_24h_before = now - datetime.timedelta(hours=24)
# let authorized people time to set presence for those who came in late
end_date = now - datetime.timedelta(hours=3)
end_date = now - datetime.timedelta(hours=2)
api = OdooAPI()
absence_status = 'excused'
res_c = api.search_read('ir.config_parameter',
[['key', '=', 'lacagette_membership.absence_status']],
['value'])
if len(res_c) == 1:
absence_status = res_c[0]['value']
cond = [['date_begin', '>=', date_24h_before.isoformat()],
['date_begin', '<=', end_date.isoformat()],
['state', '=', 'open']]
......@@ -1128,8 +1292,11 @@ class CagetteServices(models.Model):
(_h, _m, _s) = h.split(':')
if int(_h) < 21:
ids.append(int(r['id']))
f = {'state': 'excused'}
return {'update': api.update('shift.registration', ids, f), 'reg_shift': res}
f = {'state': absence_status}
update_shift_reg_result = {'update': api.update('shift.registration', ids, f), 'reg_shift': res}
if update_shift_reg_result['update'] is True:
update_shift_reg_result['process_status_res'] = api.execute('res.partner','run_process_target_status', [])
return update_shift_reg_result
@staticmethod
def close_ftop_service():
......@@ -1177,37 +1344,64 @@ class CagetteServices(models.Model):
return result
@staticmethod
def get_committees_shift_id():
shift_id = None
try:
api = OdooAPI()
res = api.search_read('ir.config_parameter',
[['key','=', 'lacagette_membership.committees_shift_id']],
['value'])
if len(res) > 0:
try:
shift_id = int(res[0]['value'])
except:
pass
except:
pass
return shift_id
@staticmethod
def easy_validate_shift_presence(coop_id):
"""Add a presence point if the request is valid."""
res = {}
try:
committees_shift_id = CagetteServices.get_committees_shift_id()
api = OdooAPI()
# let verify coop_id is corresponding to a ftop subscriber
cond = [['id', '=', coop_id]]
fields = ['shift_type']
fields = ['tmpl_reg_line_ids']
coop = api.search_read('res.partner', cond, fields)
if coop:
if coop[0]['shift_type'] == 'ftop':
evt_name = getattr(settings, 'ENTRANCE_ADD_PT_EVENT_NAME', 'Validation service comité')
c = [['partner_id', '=', coop_id], ['name', '=', evt_name]]
f = ['create_date']
last_point_mvts = api.search_read('shift.counter.event', c, f,
order ="create_date DESC", limit=1)
ok_for_adding_pt = False
if len(last_point_mvts):
now = datetime.datetime.now()
past = datetime.datetime. strptime(last_point_mvts[0]['create_date'],
'%Y-%m-%d %H:%M:%S')
if (now - past).total_seconds() >= 3600 * 24:
if len(coop[0]['tmpl_reg_line_ids']) > 0 :
cond = [['id', '=', coop[0]['tmpl_reg_line_ids'][0]]]
fields = ['shift_template_id']
shift_templ_res = api.search_read('shift.template.registration.line', cond, fields)
if (len(shift_templ_res) > 0
and
shift_templ_res[0]['shift_template_id'][0] == committees_shift_id):
evt_name = getattr(settings, 'ENTRANCE_ADD_PT_EVENT_NAME', 'Validation service comité')
c = [['partner_id', '=', coop_id], ['name', '=', evt_name]]
f = ['create_date']
last_point_mvts = api.search_read('shift.counter.event', c, f,
order ="create_date DESC", limit=1)
ok_for_adding_pt = False
if len(last_point_mvts):
now = datetime.datetime.now()
past = datetime.datetime. strptime(last_point_mvts[0]['create_date'],
'%Y-%m-%d %H:%M:%S')
if (now - past).total_seconds() >= 3600 * 24:
ok_for_adding_pt = True
else:
ok_for_adding_pt = True
if ok_for_adding_pt is True:
res['evt_id'] = CagetteMember(coop_id).add_pts('ftop', 1, evt_name)
else:
res['error'] = "One point has been added less then 24 hours ago"
else:
ok_for_adding_pt = True
if ok_for_adding_pt is True:
res['evt_id'] = CagetteMember(coop_id).add_pts('ftop', 1, evt_name)
else:
res['error'] = "One point has been added less then 24 hours ago"
res['error'] = "Unallowed coop"
else:
res['error'] = "Unallowed coop"
res['error'] = "Unregistred coop"
else:
res['error'] = "Invalid coop id"
except Exception as e:
......@@ -1265,3 +1459,4 @@ class CagetteUser(models.Model):
pass
return answer
......@@ -36,14 +36,16 @@ video {max-width:none;}
#barcode_base {width:50px;float:left;}
.coop-info {min-width: 300px;padding:5px;}
#lat_menu button {margin-bottom:5px;}
.col-6.big {font-size:200%; border: 2px solid red; padding:10px; text-align:center; background: #ffffff;}
.col-6.big {font-size:200%; border: 2px solid red; padding:10px; text-align:center; background: #FFF;}
#cooperative_state {font-size:150%; font-weight:bold;}
h1 .member_name {font-weight: bold;}
#current_shift_title, .members_list
{border:1px solid #000; border-radius: 5px; padding:5px; margin-bottom:15px;background:#FFF;}
.members_list {list-style: none;}
.members_list li {display:block;margin-bottom:5px;}
.members_list li.btn--inverse {background: #449d44 !important; cursor:not-allowed;}
.members_list li.btn--inverse {background: #449d44; cursor:not-allowed; color: #FFF; }
.members_list li.btn--inverse.late {background-color: #de9b00; color: white}
#service_entry_success {font-size: x-large;}
#service_entry_success .explanations {margin: 25px 0; font-size: 18px;}
......
.page_body{
position: relative;
}
.header {
margin: 1.5rem 0;
}
.login_area {
position: absolute;
top: 0;
left: 0;
right: 0;
}
.tabs {
margin-top: 1em;
margin-bottom: 1em;
overflow: hidden;
}
.tabs .tab {
background-color: #f1f1f1;
border: 1px solid #ccc;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
}
.tabs .tab:hover {
background-color: #ccc;
}
.tabs .active {
background-color: transparent;
border: 1px solid #ccc;
border-width: 1px 0 0 0;
}
.tabs .active:hover {
background-color: white;
}
.tab_content {
animation: fadeEffect 1s; /* Fading effect takes 1 second */
}
/* Go from zero to full opacity */
@keyframes fadeEffect {
from {opacity: 0;}
to {opacity: 1;}
}
#tab_makeups_content {
padding: 2rem 0;
}
#table_top_area {
display: flex;
justify-content: space-between;
}
#decrement_selected_members_makeups {
display: none;
}
.table_area {
margin-top: 20px;
}
.decrement_makeup {
margin-left: 10px;
}
.decrement_makeup, .increment_makeup {
padding: 0.4rem 1.25rem;
}
.select_member_cb {
cursor: pointer;
}
/* Search membres area */
#add_members_area {
margin-top: 30px;
}
#add_members_form_area {
display:flex;
align-items: center;
}
#search_member_form {
margin-left: 10px;
}
.search_member_results_area {
margin-top: 15px;
display: flex;
align-items: center;
}
.search_member_results {
display: flex;
flex-wrap: wrap;
}
.btn_possible_member {
margin: 0 1rem;
}
\ No newline at end of file
......@@ -55,10 +55,10 @@ sync.on('change', function (info) {
update_completed_count();
online = true;
})
.on('denied', function (err) {
.on('denied', function () {
// a document failed to replicate (e.g. due to permissions)
})
.on('complete', function (info) {
.on('complete', function () {
// handle complete
})
.on('error', function (err) {
......@@ -87,9 +87,7 @@ function new_coop_validation() {
coop_list_view.hide();
schoice_view.hide();
ncoop_view.hide();
var barcode_base = current_coop.barcode_base;
var st = get_shift_name(current_coop.shift_template.data);
//coop_registration_details.find('.numbox').text('N° '+ barcode_base);
coop_registration_details.find('.shift_template').text(st);
process_state.html(current_coop.firstname + ' ' +current_coop.lastname);
......@@ -148,12 +146,13 @@ function _really_save_new_coop(email, fname, lname, cap, pm, cn, bc, msex) {
if (email != current_email) {
//delete current_coop after copying revelant data
dbc.remove(current_email, coop._rev, function(err, response) {
dbc.remove(current_email, coop._rev, function(err) {
if (err) {
return console.log(err);
}
//console.log(response);
return null;
});
delete coop._rev;
......@@ -414,6 +413,8 @@ function get_latest_odoo_coop_bb() {
return latest_odoo_coop_bb;
}
return null;
}
function generate_email() {
......@@ -461,7 +462,7 @@ function setLocalInProcess(lip) {
localStorage.setItem("in_process", JSON.stringify(lip));
}
function keep_in_process_work(event) {
function keep_in_process_work() {
//If data registration is in process, save it in localStorage
if (current_coop != null && typeof (current_coop.shift_template) == "undefined") {
local_in_process = getLocalInProcess();
......
......@@ -9,7 +9,7 @@ if (coop_is_connected()) {
env_template = $('#templates [data-type="envelops"]');
// PouchDB sync actions listeners
sync.on('change', function (info) {
sync.on('change', function () {
// handle change
......@@ -27,10 +27,10 @@ if (coop_is_connected()) {
//update_completed_count();
online = true;
})
.on('denied', function (err) {
.on('denied', function () {
// a document failed to replicate (e.g. due to permissions)
})
.on('complete', function (info) {
.on('complete', function () {
// handle complete
})
.on('error', function (err) {
......@@ -333,7 +333,7 @@ if (coop_is_connected()) {
dsha1 = sha1(jss),
member = {_id: dsha1, data: data, hash: dsha1 };
dbc.put(member, function callback(err, result) {
dbc.put(member, function callback(err) {
if (!err) {
closeModal();
page_cleaning();
......@@ -409,6 +409,7 @@ if (coop_is_connected()) {
$('.item').click(display_possible_actions);
// dispatch_coops_in_boxes();
return null;
});
console.log(problematic_members);
......
......@@ -33,7 +33,6 @@ var shift_members = $('#current_shift_members');
var service_validation = $('#service_validation');
var validation_last_call = 0;
var rattrapage_wanted = $('[data-next="rattrapage_1"]');
var rattrapage_validation = $('#rattrapage_validation');
var webcam_is_attached = false;
var photo_advice = $('#photo_advice');
var photo_studio = $('#photo_studio');
......@@ -92,7 +91,7 @@ function fill_member_slide(member) {
}
html_elts.image_medium.html('<img src="'+img_src+'" width="128" />');
html_elts.cooperative_state.html(member.cooperative_state);
if (member.cooperative_state == 'Désinscrit(e)') coop_info.addClass('b_red');
if (member.cooperative_state == 'Désinscrit(e)' || member.cooperative_state == 'Rattrapage') coop_info.addClass('b_red');
else if (member.cooperative_state == 'En alerte' || member.cooperative_state == 'Délai accordé') coop_info.addClass('b_orange');
if (member.shifts.length > 0) {
......@@ -264,12 +263,18 @@ function fill_service_entry(s) {
if (s.members) {
m_list = '<ul class="members_list">';
// if (typeof s.late != "undefined" && s.late == true) {
// m_list = '<ul class="members_list late">';
// }
$.each(s.members, function(i, e) {
var li_class = "btn";
var li_data = "";
if (e.state == "done") {
li_class += "--inverse";
if (e.is_late == true) {
li_class += " late";
}
} else {
li_data = ' data-rid="'+e.id+'" data-mid="'+e.partner_id[0]+'"';
}
......@@ -392,7 +397,7 @@ function fill_service_entry_sucess(member) {
var points = member.display_std_points;
if (member.in_ftop_team == true) {
if (member.shift_type == 'ftop') {
points = member.display_ftop_points;
}
pages.service_entry_success.find('span.points').text(points);
......@@ -408,7 +413,7 @@ function fill_service_entry_sucess(member) {
var service_verb = 'est prévu';
if (member.next_shift) {
if (member.in_ftop_team == true
if (member.shift_type == 'ftop'
&& member.next_shift.shift_type == "ftop") {
var start_elts = member.next_shift.start.split(' à ');
......@@ -451,6 +456,8 @@ function record_service_presence() {
goto_page(pages.service_entry_success);
} else if (rData.res.error) {
alert(rData.res.error);
} else {
alert("Un problème est survenu. S'il persiste merci de le signaler à un responsable du magasin.");
}
}
loading2.hide();
......@@ -464,7 +471,7 @@ function fill_rattrapage_2() {
var msg = "Bienvenue pour ton rattrapage !";
var shift_ticket_id = selected_service.shift_ticket_ids[0];
if (current_displayed_member.in_ftop_team == true) {
if (current_displayed_member.shift_type == 'ftop') {
msg ="Bienvenue dans ce service !";
if (selected_service.shift_ticket_ids[1])
shift_ticket_id = selected_service.shift_ticket_ids[1];
......@@ -488,20 +495,6 @@ function fill_rattrapage_2() {
function init_webcam() {
try {
/*
Webcam.set({
width: $('#img_width').val(),
height: $('#img_height').val(),
dest_width: $('#img_dest_width').val(),
dest_height: $('#img_dest_height').val(),
crop_width: $('#img_crop_width').val(),
crop_height: $('#img_crop_height').val(),
image_format: 'jpeg',
jpeg_quality: 90
});
*/
Webcam.set({
width: 320,
height: 240,
......@@ -646,7 +639,7 @@ shift_members.on("click", '.btn[data-rid]', function() {
});
pages.shopping_entry.on('css', function(e) {
pages.shopping_entry.on('css', function() {
photo_advice.hide();
photo_studio.hide();
search_box_clear_html_elts();
......@@ -654,14 +647,14 @@ pages.shopping_entry.on('css', function(e) {
move_search_box(pages.rattrapage_1, pages.shopping_entry);
});
pages.service_entry.on('css', function(e) {
pages.service_entry.on('css', function() {
photo_advice.hide();
photo_studio.hide();
clean_service_entry();
get_service_entry_data();
});
pages.rattrapage_1.on('css', function(e) {
pages.rattrapage_1.on('css', function() {
search_box_clear_html_elts();
var msg = "Vous venez pour un rattrapage.";
......@@ -691,7 +684,7 @@ function ask_for_easy_shift_validation() {
{
coop_id: operator.id
},
function(err, result) {
function(err) {
if (!err) {
alert("1 point volant vient d'être ajouté.");
clean_search_for_easy_validate_zone();
......@@ -795,11 +788,10 @@ $(document).ready(function() {
let search_str = sm_search_member_input.val();
$.ajax({
url: '/members/search/' + search_str,
url: '/members/search/' + search_str + '/' + window.committees_shift_id,
dataType : 'json',
success: function(data) {
members_search_results = [];
for (member of data.res) {
if (member.shift_type == 'ftop') {
members_search_results.push(member);
......@@ -808,7 +800,7 @@ $(document).ready(function() {
display_possible_members();
},
error: function(data) {
error: function() {
err = {
msg: "erreur serveur lors de la recherche de membres",
ctx: 'easy_validate.search_members'
......
var makeups_members_table = null,
makeups_members = null,
members_search_results = [],
selected_rows = []; // Contain members id
function switch_active_tab() {
// Set tabs
$('.tab').removeClass('active');
$(this).addClass('active');
// Tabs content
$('.tab_content').hide();
let tab = $(this).attr('id');
if (tab == 'tab_makeups') {
$('#tab_makeups_content').show();
}
load_tab_data();
}
/**
* Load data for the current tab
*/
function load_tab_data() {
let current_tab = $('.tab .active').attr('id');
if (current_tab === 'tab_makeups' && makeups_members === null) {
load_makeups_members();
}
}
/**
* Load partners who have makeups to do
*/
function load_makeups_members() {
$.ajax({
type: 'GET',
url: "/members/get_makeups_members",
dataType:"json",
traditional: true,
contentType: "application/json; charset=utf-8",
success: function(data) {
makeups_members = data.res;
display_makeups_members();
},
error: function(data) {
err = {msg: "erreur serveur lors de la récupération des membres avec rattrapage", ctx: 'load_makeups_members'};
if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') {
err.msg += ' : ' + data.responseJSON.error;
}
report_JS_error(err, 'orders');
closeModal();
alert('Erreur serveur lors de la récupération des membres avec rattrapage. Ré-essayez plus tard.');
}
});
}
/**
* (Re)Display table of makeup members
*/
function display_makeups_members() {
if (makeups_members_table) {
$('#makeups_members_table').off();
makeups_members_table.clear().destroy();
$('#makeups_members_table').empty();
}
// Remove members with 0 makeups to do
ids_to_remove = [];
for (member_item of makeups_members) {
if (member_item.makeups_to_do == 0) {
ids_to_remove.push(member_item.id);
}
}
makeups_members = makeups_members.filter(m => !ids_to_remove.includes(m.id));
// TODO : select multiple and grouped action
makeups_members_table = $('#makeups_members_table').DataTable({
data: makeups_members,
columns: [
{
data: "id",
title: '',
className: "dt-body-center",
orderable: false,
render: function (data) {
return `<input type="checkbox" class="select_member_cb" id="select_member_${data}" value="${data}">`;
},
width: "3%"
},
{
data: "name",
title: "Nom"
},
{
data: "makeups_to_do",
title: "Nb rattrapages",
className: "dt-body-center",
width: "10%",
render: function (data, type, full) {
return `<b>${data}</b>
<button class="decrement_makeup btn--primary" id="decrement_member_${full.id}">
<i class="fas fa-minus"></i>
</button>
<button class="increment_makeup btn--primary" id="increment_member_${full.id}">
<i class="fas fa-plus"></i>
</button>`;
}
}
],
aLengthMenu: [
[
25,
50,
-1
],
[
25,
50,
"Tout"
]
],
iDisplayLength: 25,
oLanguage: {
"sProcessing": "Traitement en cours...",
"sSearch": "Rechercher dans le tableau",
"sLengthMenu": "Afficher _MENU_ &eacute;l&eacute;ments",
"sInfo": "Affichage de l'&eacute;l&eacute;ment _START_ &agrave; _END_ sur _TOTAL_ &eacute;l&eacute;ments",
"sInfoEmpty": "Affichage de l'&eacute;l&eacute;ment 0 &agrave; 0 sur 0 &eacute;l&eacute;ment",
"sInfoFiltered": "(filtr&eacute; de _MAX_ &eacute;l&eacute;ments au total)",
"sInfoPostFix": "",
"sLoadingRecords": "Chargement en cours...",
"sZeroRecords": "Aucun &eacute;l&eacute;ment &agrave; afficher",
"sEmptyTable": "Aucune donn&eacute;e disponible dans le tableau",
"oPaginate": {
"sFirst": "Premier",
"sPrevious": "Pr&eacute;c&eacute;dent",
"sNext": "Suivant",
"sLast": "Dernier"
},
"oAria": {
"sSortAscending": ": activer pour trier la colonne par ordre croissant",
"sSortDescending": ": activer pour trier la colonne par ordre d&eacute;croissant"
},
"select": {
"rows": {
"_": "%d lignes séléctionnées",
"0": "Aucune ligne séléctionnée",
"1": "1 ligne séléctionnée"
}
}
}
});
$('#makeups_members_table').on('click', 'tbody td .decrement_makeup', function () {
const button_id = $(this).prop('id')
.split('_');
const member_id = button_id[button_id.length - 1];
const member = makeups_members.find(m => m.id == member_id);
openModal(
`Enlever un rattrapage à ${member.name} ?`,
() => {
update_members_makeups([member_id], "decrement");
},
"Confirmer",
false
);
});
$('#makeups_members_table').on('click', 'tbody td .increment_makeup', function () {
const button_id = $(this).prop('id')
.split('_');
const member_id = button_id[button_id.length - 1];
const member = makeups_members.find(m => m.id == member_id);
openModal(
`Ajouter un rattrapage à ${member.name} ?`,
() => {
update_members_makeups([member_id], "increment");
},
"Confirmer",
false
);
});
$('#makeups_members_table').on('click', 'tbody td .select_member_cb', function () {
$(this).closest('tr')
.toggleClass('selected');
// Save / unsave selected row
const m_id = makeups_members_table.row($(this).closest('tr')).data().id;
const first_select = selected_rows.length === 0;
if (this.checked) {
selected_rows.push(m_id);
} else {
const i = selected_rows.findIndex(id => id == m_id);
selected_rows.splice(i, 1);
}
if (selected_rows.length > 0) {
$("#decrement_selected_members_makeups").show();
if (first_select) {
$("#decrement_selected_members_makeups").on("click", () => {
openModal(
`Enlever un rattrapage aux membres sélectionnés ?`,
() => {
update_members_makeups(selected_rows, "decrement");
},
"Confirmer",
false
);
});
}
} else {
$("#decrement_selected_members_makeups").off()
.hide();
}
});
}
/**
* Send request to update members nb of makeups to do
*
* @param {Array} member_ids
* @param {String} action increment | decrement
*/
function update_members_makeups(member_ids, action) {
openModal();
data = [];
for (mid of member_ids) {
member_index = makeups_members.findIndex(m => m.id == mid);
if (action === "increment") {
makeups_members[member_index].makeups_to_do += 1;
} else {
makeups_members[member_index].makeups_to_do -= 1;
}
data.push({
member_id: mid,
target_makeups_nb: makeups_members[member_index].makeups_to_do,
member_shift_type: makeups_members[member_index].shift_type
});
}
$.ajax({
type: 'POST',
url: "/members/update_members_makeups",
data: JSON.stringify(data),
dataType:"json",
traditional: true,
contentType: "application/json; charset=utf-8",
success: function() {
selected_rows = [];
display_makeups_members();
closeModal();
},
error: function(data) {
err = {msg: "erreur serveur pour décrémenter les rattrapages", ctx: 'decrement_makeups'};
if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') {
err.msg += ' : ' + data.responseJSON.error;
}
report_JS_error(err, 'members_admin');
closeModal();
alert('Erreur serveur pour décrémenter les rattrapages. Ré-essayez plus tard.');
}
});
}
/**
* Display the members from the search result
*/
function display_possible_members() {
$('.search_member_results_area').show();
$('.search_member_results').empty();
let no_result = true;
if (members_search_results.length > 0) {
for (member of members_search_results) {
// Don't display members already in the table
if (makeups_members.find(m => m.id == member.id) != null) {
continue;
}
$(".search_results_text").show();
no_result = false;
// Display results (possible members) as buttons
var member_button = '<button class="btn--success btn_possible_member" member_id="'
+ member.id + '">'
+ member.barcode_base + ' - ' + member.name
+ '</button>';
$('.search_member_results').append(member_button);
// Set action on member button click
$('.btn_possible_member').on('click', function() {
for (member of members_search_results) {
if (member.id == $(this).attr('member_id')) {
if (makeups_members === null) {
makeups_members = [];
}
makeups_members.unshift({
id: member.id,
name: member.name,
makeups_to_do: 0,
shift_type: member.shift_type
});
openModal(
`Ajouter un rattrapage à ${member.name} ?`,
() => {
update_members_makeups([member.id], "increment");
members_search_results = [];
$('#search_member_input').val('');
$('.search_member_results_area').hide();
$('.search_member_results').empty();
},
"Confirmer",
false
);
break;
}
}
});
}
}
if (no_result === true) {
$(".search_results_text").hide();
$('.search_member_results').html(`<p>
<i>Aucun résultat ! Vérifiez votre recherche, ou si le.la membre n'est pas déjà dans le tableau...</i>
</p>`);
}
}
$(document).ready(function() {
if (coop_is_connected()) {
$.ajaxSetup({ headers: { "X-CSRFToken": getCookie('csrftoken') } });
$(".page_content").show();
load_makeups_members();
$(".tabs .tab").on('click', switch_active_tab);
} else {
$(".page_content").hide();
}
// Set action to search for the member
$('#search_member_form').submit(function() {
let search_str = $('#search_member_input').val();
$.ajax({
url: '/members/search/' + search_str,
dataType : 'json',
success: function(data) {
members_search_results = [];
for (member of data.res) {
if (member.is_member || member.is_associated_people) {
members_search_results.push(member);
}
}
display_possible_members();
},
error: function() {
err = {
msg: "erreur serveur lors de la recherche de membres",
ctx: 'confirm_movement.search_members'
};
report_JS_error(err, 'stock');
$.notify("Erreur lors de la recherche de membre, il faut ré-essayer plus tard...", {
globalPosition:"top right",
className: "error"
});
}
});
});
});
......@@ -46,10 +46,10 @@ sync.on('change', function (info) {
// replicate resumed (e.g. new changes replicating, user went back online)
online = true;
})
.on('denied', function (err) {
.on('denied', function () {
// a document failed to replicate (e.g. due to permissions)
})
.on('complete', function (info) {
.on('complete', function () {
// handle complete
})
.on('error', function (err) {
......@@ -113,7 +113,7 @@ function put_current_coop_in_buffer_db(callback) {
var can_continue = true;
if (typeof current_coop._old_id != "undefined") {
dbc.remove(current_coop._old_id, current_coop._rev, function(err, response) {
dbc.remove(current_coop._old_id, current_coop._rev, function(err) {
if (err) {
console.log(err); can_continue = false;
}
......@@ -131,7 +131,6 @@ function put_current_coop_in_buffer_db(callback) {
function process_new_warning(event) {
event.preventDefault();
var msg = warning_msg.val();
var btn = $(event.target).find('button');
openModal();
if (msg.length > 0) {
......@@ -208,7 +207,7 @@ function submit_full_coop_form() {
}
post_form(
'/members/coop_validated_data', form_data,
function(err, result) {
function(err) {
if (!err) {
setTimeout(after_save, 1500);
} else {
......@@ -551,6 +550,8 @@ function open_coop_form(e) {
console.error(error);
report_JS_error(error, 'prepa-odoo');
}
return null;
}
function ask_for_deletion() {
......@@ -693,6 +694,8 @@ function retrieve_all_coops() {
return b.timestamp - a.timestamp;
});
dispatch_coops_in_boxes();
return null;
});
} catch (err) {
error = {msg: err.name + ' : ' + err.message, ctx: 'retrieve_all_coops'};
......
......@@ -46,7 +46,8 @@ function display_current_coop_form() {
// form.find('[name="barcode_base"]').val(current_coop.barcode_base);
form.find('[name="email"]').val(current_coop._id);
if (current_coop.shift_template &&
current_coop.shift_template.data.type == 2) {
current_coop.shift_template.data.type == 2 &&
typeof manage_ftop != "undefined" && manage_ftop == true) {
$('#choosen_shift input').hide();
ftop_shift.val('Volant');
ftop_shift.show();
......
......@@ -92,7 +92,7 @@ function process_form_submission(event) {
openModal();
post_form(
'/members/coop_validated_data', form_data,
function(err, result) {
function(err) {
closeModal();
if (!err) {
......@@ -119,7 +119,7 @@ function process_form_submission(event) {
openModal();
post_form(
'/members/coop_warning_msg', data,
function(err, result) {
function(err) {
closeModal();
if (!err) {
$('#main_content').remove();
......
......@@ -36,11 +36,11 @@ urlpatterns = [
url(r'^verify_final_state$', views.verify_final_state),
url(r'^update_couchdb_barcodes$', views.update_couchdb_barcodes),
# Borne accueil
url(r'^search/(.+)', views.search),
url(r'^search/([^\/.]+)/?([0-9]*)', views.search),
url(r'^save_photo/([0-9]+)$', views.save_photo, name='save_photo'),
url(r'^services_at_time/([0-9TZ\-\: \.]+)/([0-9\-]+)$', views.services_at_time),
url(r'^service_presence/$', views.record_service_presence),
url(r'^record_absences$', views.record_absences),
url(r'^record_absences/?([0-9\-\ \:]*)$', views.record_absences),
url(r'^close_ftop_service$', views.close_ftop_service),
url(r'^get_credentials$', views.get_credentials),
url(r'^remove_data_from_couchdb$', views.remove_data_from_CouchDB),
......@@ -49,4 +49,11 @@ urlpatterns = [
url(r'^easy_validate_shift_presence$', views.easy_validate_shift_presence),
# conso / groupe recherche / socio
url(r'^panel_get_purchases$', views.panel_get_purchases),
# BDM
url(r'^save_partner_info$', views.save_partner_info),
# BDM - members admin
url(r'^admin$', admin.admin),
url(r'^get_makeups_members$', admin.get_makeups_members),
url(r'^update_members_makeups$', admin.update_members_makeups),
]
......@@ -28,8 +28,11 @@ def index(request):
"La période pendant laquelle il est possible de s'enregistrer est close."),
'ENTRANCE_EASY_SHIFT_VALIDATE_MSG': getattr(settings, 'ENTRANCE_EASY_SHIFT_VALIDATE_MSG',
'Je valide mon service "Comité"'),
'CONFIRME_PRESENT_BTN' : getattr(settings, 'CONFIRME_PRESENT_BTN', 'Présent.e')
'CONFIRME_PRESENT_BTN' : getattr(settings, 'CONFIRME_PRESENT_BTN', 'Présent.e'),
'LATE_MODE': getattr(settings, 'ENTRANCE_WITH_LATE_MODE', False),
'ENTRANCE_VALIDATE_PRESENCE_MESSAGE' : getattr(settings, 'ENTRANCE_VALIDATE_PRESENCE_MESSAGE', '')
}
for_shoping_msg = getattr(settings, 'ENTRANCE_COME_FOR_SHOPING_MSG', '')
msettings = MConfig.get_settings('members')
......@@ -39,6 +42,13 @@ def index(request):
context['ftop_btn_display'] = getattr(settings, 'ENTRANCE_FTOP_BUTTON_DISPLAY', True)
context['extra_btns_display'] = getattr(settings, 'ENTRANCE_EXTRA_BUTTONS_DISPLAY', True)
context['easy_shift_validate'] = getattr(settings, 'ENTRANCE_EASY_SHIFT_VALIDATE', False)
if context['easy_shift_validate'] is True:
committees_shift_id = CagetteServices.get_committees_shift_id()
if committees_shift_id is None:
return HttpResponse("Le créneau des comités n'est pas configuré dans Odoo !")
else:
context['committees_shift_id'] = committees_shift_id
if 'no_picture_member_advice' in msettings:
if len(msettings['no_picture_member_advice']['value']) > 0:
context['no_picture_member_advice'] = msettings['no_picture_member_advice']['value']
......@@ -86,6 +96,7 @@ def inscriptions(request, type=1):
'open_on_sunday': getattr(settings, 'OPEN_ON_SUNDAY', False),
'POUCHDB_VERSION': getattr(settings, 'POUCHDB_VERSION', ''),
'max_chq_nb': getattr(settings, 'MAX_CHQ_NB', 12),
'show_ftop_button': getattr(settings, 'SHOW_FTOP_BUTTON', True),
'db': settings.COUCHDB['dbs']['member']}
response = HttpResponse(template.render(context, request))
......@@ -114,6 +125,7 @@ def prepa_odoo(request):
'ask_for_sex': getattr(settings, 'SUBSCRIPTION_ASK_FOR_SEX', False),
'ask_for_street2': getattr(settings, 'SUBSCRIPTION_ADD_STREET2', False),
'ask_for_second_phone': getattr(settings, 'SUBSCRIPTION_ADD_SECOND_PHONE', False),
'show_ftop_button': getattr(settings, 'SHOW_FTOP_BUTTON', True),
'db': settings.COUCHDB['dbs']['member']}
# with_addr_complement
......@@ -147,6 +159,7 @@ def validation_inscription(request, email):
'ask_for_sex': getattr(settings, 'SUBSCRIPTION_ASK_FOR_SEX', False),
'ask_for_street2': getattr(settings, 'SUBSCRIPTION_ADD_STREET2', False),
'ask_for_second_phone': getattr(settings, 'SUBSCRIPTION_ADD_SECOND_PHONE', False),
'show_ftop_button': getattr(settings, 'SHOW_FTOP_BUTTON', True),
'em_url': settings.EM_URL,
'WELCOME_ENTRANCE_MSG': settings.WELCOME_ENTRANCE_MSG,
'WELCOME_SUBTITLE_ENTRANCE_MSG': getattr(settings, 'WELCOME_SUBTITLE_ENTRANCE_MSG', '')}
......@@ -222,7 +235,7 @@ def update_couchdb_barcodes(request):
# Borne accueil
def search(request, needle):
def search(request, needle, shift_id):
"""Search member has been requested."""
try:
key = int(needle)
......@@ -234,7 +247,7 @@ def search(request, needle):
key = needle
k_type = 'name'
res = CagetteMember.search(k_type, key)
res = CagetteMember.search(k_type, key, shift_id)
return JsonResponse({'res': res})
......@@ -262,7 +275,15 @@ def record_service_presence(request):
mid = int(request.POST.get("mid", 0)) # member id
sid = int(request.POST.get("sid", 0)) # shift id
stid = int(request.POST.get("stid", 0)) # shift_ticket_id
app_env = getattr(settings, 'APP_ENV', "prod")
if (rid > -1 and mid > 0):
overrided_date = ""
if app_env != "prod":
import re
o_date = re.search(r'/([^\/]+?)$', request.META.get('HTTP_REFERER'))
if o_date:
overrided_date = re.sub(r'(%20)',' ', o_date.group(1))
# rid = 0 => C'est un rattrapage, sur le service
if sid > 0 and stid > 0:
# Add member to service and take presence into account
......@@ -270,7 +291,7 @@ def record_service_presence(request):
if res['rattrapage'] is True:
res['update'] = 'ok'
else:
if (CagetteServices.registration_done(rid) is True):
if (CagetteServices.registration_done(rid, overrided_date) is True):
res['update'] = 'ok'
else:
res['update'] = 'ko'
......@@ -305,8 +326,8 @@ def easy_validate_shift_presence(request):
else:
return JsonResponse(res, safe=False)
def record_absences(request):
return JsonResponse({'res': CagetteServices.record_absences()})
def record_absences(request, date):
return JsonResponse({'res': CagetteServices.record_absences(date)})
def close_ftop_service(request):
"""Close the closest past FTOP service"""
......@@ -369,3 +390,23 @@ def panel_get_purchases(request):
message += ' ' + str(res['params'])
response = HttpResponse(message)
return response
# # # BDM # # #
def save_partner_info(request):
""" Endpoint the front-end will call for saving partner information """
res = {}
credentials = CagetteMember.get_credentials(request)
if ('success' in credentials):
data = {}
for post in request.POST:
if post != "idPartner" and data != "verif_token" :
data[post]= request.POST[post]
cm = CagetteMember(int(request.POST['idPartner']))
result = cm.save_partner_info(int(request.POST['idPartner']),data)
res['success']= result
return JsonResponse(res)
else:
res['error'] = "Forbidden"
return JsonResponse(res, safe=False)
from django.contrib import admin
# Register your models here.
from django.apps import AppConfig
class MembersSpaceConfig(AppConfig):
name = 'members_space'
from django.db import models
from outils.common_imports import *
from members.models import CagetteServices
from outils.common import OdooAPI
class CagetteMembersSpace(models.Model):
"""Class to manage othe members space"""
def __init__(self):
"""Init with odoo id."""
self.o_api = OdooAPI()
def is_comite(self, partner_id):
"""Check if partner is from comite."""
cond = [['partner_id.id', '=', partner_id]]
fields = ['shift_template_id', 'is_current']
shiftTemplate = self.o_api.search_read('shift.template.registration', cond, fields)
answer = False
if (shiftTemplate and len(shiftTemplate) > 0):
s_t_id = None
for s_t in shiftTemplate:
if s_t['is_current'] is True:
s_t_id = s_t['shift_template_id'][0]
if s_t_id == CagetteServices.get_committees_shift_id():
answer = True
return answer
def get_shifts_history(self, partner_id, limit, offset, date_from):
""" Get partner shifts history """
res = []
paginated_res = []
today = str(datetime.date.today())
try:
cond = [
['partner_id', '=', partner_id],
['create_date', '>', date_from],
['date_begin', '<', today],
['state', '!=', 'draft'],
['state', '!=', 'open'],
['state', '!=', 'waiting'],
['state', '!=', 'replaced'],
['state', '!=', 'replacing'],
]
f = ['create_date', 'date_begin', 'shift_id', 'name', 'state', 'is_late', 'is_makeup']
marshal_none_error = 'cannot marshal None unless allow_none is enabled'
try:
res = self.o_api.search_read('shift.registration', cond, f, order='date_begin DESC')
except Exception as e:
if not (marshal_none_error in str(e)):
print(str(e))
coop_logger.error(repr(e) + ' : %s', str(partner_id))
else:
res = []
# Get committees shifts
committees_shifts_name = getattr(settings, 'ENTRANCE_ADD_PT_EVENT_NAME', 'Validation service comité')
cond = [
['partner_id', '=', partner_id],
['name', '=', committees_shifts_name]
]
f = ['create_date']
try:
res_committees_shifts = self.o_api.search_read('shift.counter.event', cond, f, order='create_date DESC')
for committee_shift in res_committees_shifts:
item = {
"create_date": committee_shift["create_date"],
"date_begin": committee_shift["create_date"],
"shift_id": False,
"name": "Services des comités",
"state": "done",
"is_late": False,
"is_makeup": False,
}
res.append(item)
except Exception as e:
if not (marshal_none_error in str(e)):
print(str(e))
coop_logger.error(repr(e) + ' : %s', str(partner_id))
else:
res = res + []
# Add amnesty line
is_amnesty = getattr(settings, 'AMNISTIE_DATE', 'false')
company_code = getattr(settings, 'COMPANY_CODE', '')
if is_amnesty and company_code == "lacagette":
amnesty={}
amnesty['is_amnesty'] = True
amnesty['create_date'] = is_amnesty
amnesty['date_begin'] = is_amnesty
amnesty['shift_name'] = 'Amnistie'
amnesty['state'] = ''
res.append(amnesty)
# Ordering here is necessary for pagination
res.sort(key = lambda x: datetime.datetime.strptime(x['date_begin'], '%Y-%m-%d %H:%M:%S'), reverse=True)
# Paginate
end_index = offset + limit
paginated_res = res[offset:end_index]
except Exception as e:
print(str(e))
return paginated_res
\ No newline at end of file
#faqBDM {
font-size: 1.8rem;
}
#faqBDM .block {
width: 100%;
}
.info_slots_shifts {
margin: 2rem 0;
}
.grp_text{
margin-top: 25px;
}
.param {margin-bottom: 15px;}
.param label {font-weight: bold;}
input.link {min-width: 50em;}
.submit_button {margin-bottom: 10px;}
/* Style the buttons that are used to open and close the accordion panel */
.accordion {
background-color: #eee;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
text-align: left;
border: none;
outline: none;
transition: 0.4s;
}
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .accordion:hover {
background-color: #ccc;
}
/* Style the accordion panel. Note: hidden by default */
.panel {
padding: 0 18px;
padding-bottom: 10px;
background-color: white;
display: none;
overflow: hidden;
border-left: 1px solid #E5E5E5;
border-right: 1px solid #E5E5E5;
border-bottom: 1px solid #E5E5E5;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
}
button.accordion::after {
content: '\002B';
color: #777;
font-weight: bold;
float: right;
margin-left: 5px;
}
button.accordion.active::after {
content: "\2212";
}
.btn_faq{
white-space: normal;
border-radius: 5px;
margin-top: 3px;
padding-right: 25px;
display: flex;
align-items: flex-end;
}
.full_width{
width: 100%;
}
.faq_link_button_area {
margin-top: 10px;
height: 100%;
}
.faq_link_button {
white-space: normal;
border-radius: 5px;
}
.faq_link_button:hover {
color: #fff;
text-decoration: none;
}
.faq_intro_texts {
margin-bottom: 30px;
}
\ No newline at end of file
/* Add a black background color to the top navigation */
.topnav {
background-color: white;
overflow: hidden;
border-bottom: 1px solid #e7e9ed;
}
/* Style the links inside the navigation bar */
.topnav a {
float: left;
display: block;
color: #333;
text-align: center;
padding: 2rem 1.5rem;
text-decoration: none;
font-size: 17px;
font-weight: bold;
}
/* Change the color of links on hover */
.topnav a:hover {
background-color: #e7e9ed;
color: #333;
}
/* Add an active class to highlight the current page */
.topnav a.active {
background-color: #00a573;
color: white;
}
/* Hide the link that should open and close the topnav on small screens */
.topnav .icon {
display: none;
}
.pairs_info {
background-color: #00a573;
color: white;
padding: 1.5rem 1.2rem;
display: none;
}
@media screen and (max-width: 1146px) {
/* When the screen is less than 1146px pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
.topnav a:not(:first-child) {display: none;}
.topnav a.icon {
float: right;
display: block;
}
/* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens (display the links vertically instead of horizontally) */
.topnav.responsive {position: relative;}
.topnav.responsive a.icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: left;
}
#deconnect {
float: none;
}
}
/* We override some styles defined on the home page for the specific needs of the My Info page */
#my_info {
font-size: 2rem;
}
#my_info_content {
display: flex;
flex-direction: column;
margin: 2rem 0;
}
.my_info_line {
display: flex;
flex-wrap: wrap;
width: 100%;
padding: 1.5rem 0;
}
@media screen and (min-width: 351px) and (max-width: 435px) {
.my_info_line {
font-size: 90%;
padding: 2vw 0;
}
}
@media screen and (max-width: 350px) {
.my_info_line {
font-size: 3.5vw;
padding: 2vw 0;
}
}
.my_info_line_left {
width: 50%;
text-align: right;
padding-right: 2rem;
font-weight: bold;
}
.my_info_line_right {
width: 50%;
padding-left: 2rem;
max-width: 100%;
word-break: break-all;
}
.my_info_line_middle {
width: 70%;
max-width: 100%;
word-break: normal;
text-align: center;
margin: 3rem 0;
}
#my_info #member_status_action,
#my_info .member_shift_name_area,
#my_info .member_coop_number_area {
margin-bottom: 0;
}
#my_info .member_shift_name_area {
margin-top: 0;
}
#attached_info {
display: flex;
flex-direction: column;
}
.member_phone_area {
display: flex;
flex-direction: column;
gap: 10px;
}
.edit-btn{
cursor: pointer;
}
#edit_address_form {
display: none ;
}
#edit_address_form #zip_form {
margin: 5px 0;
}
#edit_phone_form {
display: none ;
}
#edit_phone_form #mobile_form {
margin: 5px 0;
}
@media screen and (max-width: 992px) {
#my_info {
font-size: 1.7rem;
}
.my_info_line_left {
width: 30%;
padding-right: 1rem;
}
.my_info_line_right {
width: 70%;
padding-left: 1rem;
}
#attached_info .my_info_line_left {
width: 100%;
text-align: left;
padding: 0;
}
#attached_info .my_info_line_right {
width: 100%;
padding: 0;
}
#my_info .choose_makeups,
#my_info .unsuscribed_form_link {
white-space: normal;
}
#my_info .delay_date_stop_container {
white-space: nowrap;
}
#my_info .member_coop_number_area,
#my_info .member_shift_name_area {
align-items: flex-start;
}
}
.status_info_image {
display: block;
margin: 5rem auto 5rem auto;
width: 50%;
}
#my_shifts {
font-size: 1.8rem;
}
#incoming_shifts {
height: 100%;
flex-direction: column;
display: none;
}
.loading-history, .loading-incoming-shifts {
margin: 2rem 0;
}
#history {
display: flex;
flex-direction: column;
display: none;
}
table.dataTable tbody td {
text-overflow: ellipsis;
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
background : none;
}
table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before {
color: #0275d8;
background-color: white;
font-weight: bold;
/* border: none;
font-size: 1.6rem;
height: 16px;
width: 16px;
border-radius: 2em; */
}
@media screen {
}
table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,
table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before {
color: #d8534f;
background-color: white;
font-weight: bold;
/* border: none;
font-size: 1.6rem;
height: 16px;
width: 16px;
border-radius: 2em; */
}
.loading-more-history {
display: none;
}
.more_history {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
font-size: 2rem;
}
.more_history_button {
height: 50px;
width: 50px;
border-radius: 50%;
}
table.dataTable.display tbody tr.row_partner_ok {
background-color: #8feb8b;
}
table.dataTable.display tbody tr.row_partner_late {
background-color: #ffdf7d;
}
table.dataTable.display tbody tr.row_partner_absent {
background-color: #ff847b;
}
table.dataTable.display tbody tr.row_partner_amnistie {
background-color: rgb(78, 78, 78);
color: white;
}
table.dataTable.display tbody tr td {
border-top: 1px solid rgb(119, 119, 119);
}
\ No newline at end of file
.shifts_exchange_page_content {
width: 95%;
margin: 3rem auto;
display: flex;
flex-direction: column;
position: relative;
}
/* -- Suspended screen */
#suspended_content, #unsuscribed_content {
align-items: center;
text-align: center;
}
#shifts_exchange .select_makeups, #shifts_exchange .unsuscribed_form_link, .cant_have_delay_form_link {
margin: 1.5rem 0;
}
/* -- Suspended can't have delay screen */
#suspended_cant_have_delay_content {
align-items: center;
text-align: center;
width: 50%;
}
@media screen and (max-width:992px) {
#suspended_cant_have_delay_content {
align-items: center;
text-align: center;
width: 90%;
}
}
/* -- Calendar screen, area on top of the calendar */
#calendar_top_info {
display: flex;
justify-content: space-between;
}
@media screen and (max-width:992px) {
#calendar_top_info {
display: flex;
flex-direction: column;
justify-content: space-between;
}
}
/* -- Calendar screen, shifts list */
#shifts_list {
flex-direction: column;
display: none;
width: min-content;
max-width: 100%;
white-space: nowrap;
}
@media screen and (max-width:992px) {
#partner_shifts_list {
display: flex;
flex-direction: column;
align-items: center;
}
}
.selectable_shift_line {
display: flex;
align-items: center;
margin-left: 15px;
margin: 0.75rem 0;
border-radius: 5px;
}
.selectable_shift_line .checkbox {
margin-right: 10px;
}
.selectable_shift_line.btn {
cursor: not-allowed;
}
/* -- Calendar screen, makeups message */
#need_to_select_makeups_message {
display: none;
align-self: center;
background-color: #d9534f;
color: white;
margin: 0 1rem 2rem 1rem;
padding: 1rem 1.25rem;
text-align: center;
}
.makeups_warning {
margin-right: 3px;
}
@media screen and (max-width:992px) {
.select_makeups_message_block {
display: block;
}
}
/* -- Calendar screen, calendar */
#calendar {
margin: 2rem 1rem;
}
.loading-calendar {
margin: 3rem auto;
display: none;
}
@media screen and (max-width:992px) {
#calendar {
display: none;
}
}
.fc .fc-event {
cursor: pointer;
margin: 1px 10px !important;
}
.fc-event {
background-color: #008AD9;
border-color: #008AD9;
color: white;
}
td{
--fc-list-event-hover-bg-color:#005BA6;
}
.fc-event.shift_booked {
background-color: #585858;
cursor: auto;
border-color: #585858;
}
.fc-event.shift_booked td {
--fc-list-event-hover-bg-color:#585858;
}
.fc-list-event.shift_booked {
color: white;
}
#calendar .fc-list-table {
table-layout: auto;
}
.resp-header-toolbar {
display: flex;
flex-direction: column;
}
.resp-header-toolbar .fc-toolbar-chunk {
text-align: center;
margin: 0.25rem;
}
.date_old_shift, .time_old_shift, .date_new_shift, .time_new_shift {
font-weight: bold;
}
/* -- Explainations */
#calendar_explaination_area {
max-width: 33%;
border: 2px solid #585858;
border-radius: 15px;
padding: 1rem;
}
.example-event {
max-width: 200px;
margin: 2rem 0 0.5rem 0;
font-size: 1.4rem !important;
padding: 0 !important;
}
@media screen and (max-width:992px) {
.example-event {
margin: 2rem auto 0.5rem auto;
}
}
.arrow_explanation_numbers {
margin: 0 3px;
}
#calendar_explaination_button {
max-width: 60%;
margin: 2rem auto 0.5rem auto;
}
\ No newline at end of file
body {
margin: 0;
}
.page_title {
margin: 35px 0 30px 0;
}
@media screen and (max-width: 435px) {
.page_title {
margin: 4vw 0 3vw 0;
}
}
/* -- Tiles */
.tiles_container {
display: flex;
flex-wrap: wrap;
}
@media screen and (max-width: 992px) {
.tiles_container {
flex-direction: column;
}
}
.tile {
flex: 1 0 45%;
display: flex;
flex-direction: column;
align-items: center;
border-radius: 30px;
margin: 1rem 1rem;
box-shadow: 2px 2px 3px rgba(10,10,10,.1),0 0 0 1px rgba(10,10,10,.1);
}
.high_tile {
min-height: 350px;
}
.small_tile {
min-height: 250px;
}
.full_width_tile {
flex: 1 0 90%;
min-height: 100px;
}
.tile_title {
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1px solid #e7e9ed;
font-size: 2.4rem;
padding: 2rem 0;
width: 80%;
}
.tile_content {
position: relative;
margin: 3rem 0;
width: 80%;
display: flex;
height: 100%;
}
#home_tile_services_exchange .tile_content {
height: 100%;
flex-direction: column;
align-items: center;
text-align: center;
}
/* -- My Shifts tile */
#home_tile_my_services .tile_content {
height: 100%;
flex-direction: column;
margin: auto;
padding: 2rem 0;
}
@media screen and (min-width: 769px) {
#home_tile_my_services .tile_content {
width: 50%;
}
}
#home_incoming_services {
min-height: 80px;
display: flex;
flex-direction: column;
}
.shift_line {
margin-left: 15px;
line-height: 2;
}
.shift_line_chevron {
color: #D9534F;
margin-right: 5px;
}
#go_to_shift_history_area {
width: 100%;
display: flex;
justify-content: center;
}
#home_go_to_shift_history {
width: 100%;
margin-top: 30px;
}
/* -- My Info tile */
#home_tile_my_info {
position: relative;
}
#home_tile_my_info .tile_content {
margin: 2rem 0;
}
.tile_icon {
margin-right: 15px;
color: #00a573;
}
#home_tile_my_info .tile_content {
height: 100%;
flex-direction: column;
align-items: center;
font-size: 1.6rem;
}
@media screen and (max-width: 576px) {
#home_tile_my_info .tile_content {
font-size: 1.4rem !important;
}
}
#home .member_info {
font-weight: bold;
}
.member_status_text_container {
margin-bottom: 5px;
}
#member_status_action {
display: flex;
margin-bottom: 20px;
}
@media screen and (max-width: 992px) {
#member_status_action {
margin-top: 5px;
margin-bottom: 10px;
}
}
.choose_makeups {
display: none;
font-size: 1.5rem;
}
.unsuscribed_form_link {
display: none;
text-decoration: none;
font-size: 1.7rem;
word-break: normal;
}
.unsuscribed_form_link:hover {
text-decoration: none;
}
@media (max-width: 435px) {
.unsuscribed_form_link {
font-size: 90%;
line-height: 7vw;
}
}
.member_status_up_to_date,
.member_status_exempted {
color: #5cb85c;
}
.member_status_alert,
.member_status_delay {
color: #f0ad4e;
}
.member_status_suspended,
.member_status_unsubscribed {
color: #d9534f;
}
.member_shift_name_area,
.member_coop_number_area {
margin-bottom: 10px;
}
.member_associated_partner_area {
line-height: 1.3;
}
@media screen and (max-width: 992px) {
.member_associated_partner_area {
display: flex;
flex-direction: column;
align-items: center;
}
}
.delay_date_stop_container {
color: #f0ad4e;
margin-top: -1rem;
margin-bottom: 1rem;
display: none;
}
#see_more_info {
white-space: normal;
}
#see_more_info_link {
width: 100%;
}
/* --Shifts exchange tile tile */
.home_link_button_area {
width: 100%;
display: flex;
justify-content: center;
height: 100%;
}
.home_link_button {
width: 80%;
margin: 30px auto auto auto;
white-space: normal;
}
/* -- I have a question tile */
#go_to_forms {
text-decoration: none;
}
#go_to_forms:hover {
color: white;
}
#go_to_forms.active {
color: white !important;
}
/* -- Shop info tile */
#shop_info_content {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
width: 80%;
margin: auto;
}
.shop_info_item {
width: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 2rem;
flex: 1 0 50%;
}
.shop_info_item h1,h2,h3,h4,h5,h6 {
font-size: 2rem;
}
.opening_hours_title {
margin-bottom: 10px;
font-size: 2.3rem;
font-weight: bold;
}
.shop_message_content {
text-align: center;
}
@media screen and (min-width: 769px) {
.shop_info_item {
padding: 0 4rem;
}
.shop_message {
border-left: 1px solid #e7e9ed;
margin: 3rem 0;
}
}
@media screen and (max-width: 992px) {
#shop_info_content {
flex-direction: column;
}
.shop_info_item {
flex: 1 0 50%;
width: 100%;
font-size: 1.6rem;
padding: 1.5rem 0;
}
.shop_info_item h1,h2,h3,h4,h5,h6 {
font-size: 1.6rem;
}
.opening_hours_title {
font-size: 1.9rem;
}
.shop_message {
border-top: 1px solid #e7e9ed;
}
.shop_message_content {
width: 90%;
}
}
/* - No content page */
.message_error {
padding: 7vw;
font-size: 1.8rem;
}
.no_content_title {
margin-bottom: 1.5rem;
}
function init_faq() {
$("#unsuscribe_form_link_btn").prop("href", unsuscribe_form_link);
$("#unsuscribe_form_link_btn2").prop("href", unsuscribe_form_link);
$("#change_template_form_link_btn").prop("href", change_template_form_link);
$("#template_unsubscribe_form_link_btn").prop("href", template_unsubscribe_form_link);
$("#late_service_form_link_btn").prop("href", late_service_form_link);
$("#sick_leave_form_link_btn").prop("href", sick_leave_form_link);
$("#associated_subscribe_form_link_btn").prop("href", associated_subscribe_form_link);
$("#associated_unsubscribe_form_link_btn").prop("href", associated_unsubscribe_form_link);
$("#covid_form_link_btn").prop("href", covid_form_link);
$("#covid_end_form_link_btn").prop("href", covid_end_form_link);
$("#underage_subscribe_form_link_btn").prop("href", underage_subscribe_form_link);
$("#change_email_form_link_btn").prop("href", change_email_form_link);
$("#coop_unsubscribe_form_link_btn").prop("href", coop_unsubscribe_form_link);
$("#helper_subscribe_form_link_btn").prop("href", helper_subscribe_form_link);
$("#helper_unsubscribe_form_link_btn").prop("href", helper_unsubscribe_form_link);
$("#request_form_link_btn2").prop("href", request_form_link);
$("#request_form_link_btn").prop("href", request_form_link);
}
$(document).on('click', '.accordion', function() {
/* Toggle between adding and removing the "active" class,
to highlight the button that controls the panel */
this.classList.toggle("active");
/* Toggle between hiding and showing the active panel */
var panel = this.nextElementSibling;
if (panel.style.display === "block") {
panel.style.display = "none";
} else {
panel.style.display = "block";
}
$("#shift_exchange_btn").on("click", () => {
goto('echange-de-services');
});
});
\ No newline at end of file
/**
* Toggle the navbar on mobile screens
*/
function toggleHeader() {
var x = document.getElementById("topnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
$(document).ready(function() {
// Navbar redirections
$('#nav_home').on('click', (e) => {
e.preventDefault();
if (current_location !== "home") {
goto('home');
}
if (document.getElementById("topnav").className !== "topnav") {
toggleHeader();
}
});
$('#nav_my_info').on('click', (e) => {
e.preventDefault();
if (current_location !== "my_info") {
goto('mes-infos');
}
toggleHeader();
});
$('#nav_my_shifts').on('click', (e) => {
e.preventDefault();
if (current_location !== "my_shifts") {
goto('mes-services');
}
toggleHeader();
});
$('#nav_faq').on('click', (e) => {
e.preventDefault();
if (current_location !== "faq") {
goto('faq');
}
toggleHeader();
});
$('#nav_shifts_exchange').on('click', (e) => {
e.preventDefault();
if (current_location !== "shifts_exchange") {
goto('echange-de-services');
}
toggleHeader();
});
$('#nav_calendar').prop("href", abcd_calendar_link);
$('#nav_calendar').on('click', () => {
toggleHeader();
});
if (partner_data.is_associated_people === "True") {
$(".pairs_info").show();
}
});
/**
* Request a 6 month delay
*/
function request_delay() {
return new Promise((resolve) => {
let today = new Date();
const delay_start = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
let today_plus_six_month = new Date();
today_plus_six_month.setMonth(today_plus_six_month.getMonth()+6);
const diff_time = Math.abs(today_plus_six_month - today);
const diff_days = Math.ceil(diff_time / (1000 * 60 * 60 * 24));
$.ajax({
type: 'POST',
url: "/shifts/request_delay",
dataType:"json",
data: {
verif_token: partner_data.verif_token,
idPartner: partner_data.partner_id,
start_date: delay_start,
duration: diff_days
},
success: function() {
partner_data.cooperative_state = 'delay';
partner_data.date_delay_stop = today_plus_six_month.getFullYear()+'-'+(today_plus_six_month.getMonth()+1)+'-'+today_plus_six_month.getDate();
resolve();
},
error: function(data) {
if (data.status == 403
&& typeof data.responseJSON != 'undefined'
&& data.responseJSON.message === "delays limit reached") {
closeModal();
let msg_template = $("#cant_have_delay_msg_template");
openModal(
msg_template.html(),
() => {
window.location =member_cant_have_delay_form_link;
},
"J'accède au formulaire",
true,
false
);
} else {
err = {msg: "erreur serveur lors de la création du délai", ctx: 'request_delay'};
if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') {
err.msg += ' : ' + data.responseJSON.error;
}
report_JS_error(err, 'members_space.home');
closeModal();
alert('Erreur lors de la création du délai.');
}
}
});
});
}
function init_my_shifts_tile() {
if (incoming_shifts.length === 0) {
$("#home_tile_my_services #home_incoming_services").text("Aucun service à venir...");
} else {
$("#home_tile_my_services #home_incoming_services").empty();
let cpt = 0;
for (shift of incoming_shifts) {
if (cpt === 3) {
break;
} else {
let shift_line_template = prepare_shift_line_template(shift.date_begin);
$("#home_tile_my_services #home_incoming_services").append(shift_line_template.html());
cpt++;
}
}
}
}
function init_home() {
$("#go_to_shifts_calendar").on("click", () => {
goto('echange-de-services');
});
$("#home_go_to_shift_history").on("click", () => {
goto('mes-services');
});
$("#see_more_info_link").on('click', (e) => {
e.preventDefault();
goto('mes-infos');
});
// $("#go_to_forms").prop("href", "forms_link");
$("#go_to_forms").on('click', (e) => {
e.preventDefault();
goto('faq');
});
if (partner_data.is_in_association === false) {
$("#home .member_associated_partner_area").hide();
} else {
if (partner_data.is_associated_people === "True") {
$(".member_associated_partner").text(partner_data.parent_name);
} else if (partner_data.associated_partner_id !== "False") {
$(".member_associated_partner").text(partner_data.associated_partner_name);
}
}
// TODO vérif tile my info avec données binomes + rattrapage et délai
// Init my info tile
init_my_info_data();
if (incoming_shifts !== null) {
init_my_shifts_tile();
} else {
load_partner_shifts(partner_data.concerned_partner_id)
.then(init_my_shifts_tile);
}
}
\ No newline at end of file
function init_my_info() {
init_my_info_data();
$(".member_email").text(partner_data.email);
if (partner_data.is_in_association === false) {
$("#attached_info_area").hide();
}
if (partner_data.is_associated_people === "True") {
$(".attached_partner_name").text(partner_data.parent_name);
} else if (partner_data.associated_partner_id !== "False") {
$(".attached_partner_name").text(partner_data.associated_partner_name);
}
$(".member_address").empty();
if (partner_data.street !== "" && partner_data.street !== "False") {
$(".member_address")
.append(partner_data.street + "<br/>");
if (partner_data.street2 !== "" && partner_data.street2 !== "False") {
$(".member_address")
.append(partner_data.street2 + "<br/>");
}
$(".member_address")
.append(partner_data.zip + " " + partner_data.city);
} else {
$(".member_address_line").hide();
}
$(".member_mobile").empty();
if (partner_data.mobile !== "" && partner_data.mobile !== "False" && partner_data.mobile !== false && partner_data.mobile !== null) {
$(".member_mobile")
.append(partner_data.mobile)
.show();
} else {
$(".member_mobile").hide();
}
$(".member_phone").empty();
if (partner_data.phone !== "" && partner_data.phone !== "False" && partner_data.phone !== false && partner_data.phone !== null) {
$(".member_phone")
.append(partner_data.phone)
.show();
} else {
$(".member_phone").hide();
}
if ($(".member_mobile").text() === "" && $(".member_phone").text() === "") {
$(".member_phone_line").hide();
}
$('#edit_address').off('click')
.on('click', () => {
$("#street_form").val(partner_data.street.replace(/&#39;/g, "'"));
// $("#street2_form").val(partner_data.street2);
$("#zip_form").val(partner_data.zip.replace(/&#39;/g, "'"));
$("#city_form").val(partner_data.city.replace(/&#39;/g, "'"));
$('#edit_address_value').hide();
$('#edit_address_form').show();
});
$('#cancel_edit_address').
on('click', () => {
$('#edit_address_form').hide();
$('#edit_address_value').show();
});
$('#save_edit_address').off('click')
.on('click', () => {
data= [];
data['street']= $("#street_form").val();
// data['street2']= $("#street2_form").val();
data['zip']= $("#zip_form").val();
data['city']= $("#city_form").val();
saveInfo(data, 'address');
});
$('#edit_phone').off('click')
.on('click', () => {
if (partner_data.phone === "False") partner_data.phone = "";
if (partner_data.mobile === "False") partner_data.mobile = "";
$("#phone_form").val(partner_data.phone);
$("#mobile_form").val(partner_data.mobile);
$('#edit_phone_value').hide();
$('#edit_phone_form').show();
});
$('#cancel_edit_phone').off('click')
.on('click', () => {
$('#edit_phone_form').hide();
$('#edit_phone_value').show();
});
$('#save_edit_phone').off('click')
.on('click', () => {
console.log('ici');
data =[];
data['phone']= $("#phone_form").val();
data['mobile']= $("#mobile_form").val();
saveInfo(data, 'phone');
});
}
function saveInfo(data, field) {
tData = '&idPartner=' + partner_data.partner_id
+ '&shift_type=' + partner_data.shift_type
+ '&verif_token=' + partner_data.verif_token;
for (d in data) {
tData+="&"+d+"="+data[d];
}
tUrl = '/members/save_partner_info';
$.ajax({
type: 'POST',
url: tUrl,
dataType:"json",
data: tData,
timeout: 3000,
success: function() {
for (d in data) {
partner_data[d]=data[d];
}
init_my_info();
if (field == 'address') {
$('#edit_address_form').hide();
$('#edit_address_value').show();
}
if (field == 'phone') {
$('#edit_phone_form').hide();
$('#edit_phone_value').show();
}
},
error: function(error) {
console.log(error);
}
});
}
var history_table = null;
const history_items_limit = 10;
/**
* Load the partner points history
*/
function load_partner_history(offset = 0) {
return new Promise((resolve) => {
$.ajax({
type: 'GET',
url: "/members_space/get_shifts_history",
data: {
partner_id: partner_data.concerned_partner_id,
verif_token: partner_data.verif_token,
limit: history_items_limit,
offset: offset
},
dataType:"json",
traditional: true,
contentType: "application/json; charset=utf-8",
success: function(data) {
formatted_data = prepare_server_data(data.data);
resolve(formatted_data);
},
error: function(data) {
err = {msg: "erreur serveur lors de la récupération de l'historique", ctx: 'load_partner_history'};
if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') {
err.msg += ' : ' + data.responseJSON.error;
}
report_JS_error(err, 'members_space.my_shifts');
closeModal();
// TODO Notify
alert('Erreur lors de la récupération de votre historique.');
}
});
});
}
/**
* Format history data to insert in the table
*
* @param {Array} data
* @returns formated data array
*/
function prepare_server_data(data) {
res = [];
for (history_item of data) {
if (history_item.is_amnesty !== undefined) {
let shift_datetime = new Date(history_item.date_begin);
let str_shift_datetime = `${("0" + shift_datetime.getDate()).slice(-2)}/${("0" + (shift_datetime.getMonth() + 1)).slice(-2)}/${shift_datetime.getFullYear()}`;
history_item.shift_name = `${history_item.shift_name} du ${str_shift_datetime}`;
} else {
history_item.shift_name = (history_item.shift_id === false) ? '' : history_item.shift_id[1];
if (history_item.name === "Services des comités") {
let shift_datetime = new Date(history_item.date_begin);
let str_shift_datetime = `${("0" + shift_datetime.getDate()).slice(-2)}/${("0" + (shift_datetime.getMonth() + 1)).slice(-2)}/${shift_datetime.getFullYear()}`;
str_shift_datetime = str_shift_datetime + " " + shift_datetime.toLocaleTimeString("fr-fr", time_options);
history_item.shift_name = `Services des comités ${str_shift_datetime}`;
}
}
history_item.details = '';
if (history_item.state === 'excused' || history_item.state === 'absent') {
history_item.details = "Absent.e";
} else if (history_item.state === 'done' && history_item.is_late != false) {
history_item.details = "Présent.e (En Retard)";
} else if (history_item.state === 'done') {
history_item.details = "Présent.e";
} else if (history_item.state === 'cancel') {
history_item.details = "Annulé";
}
}
return data;
}
/**
* Init the History section: display the history table
*/
function init_history() {
$(".loading-history").hide();
$("#history").show();
if (partner_history.length === 0) {
$("#history").empty()
.text("Aucun historique... pour l'instant !");
} else {
history_table = $('#history_table').DataTable({
data: partner_history,
columns: [
{
data: "date_begin",
title: "",
visible: false
},
{
data: "shift_name",
title: "<spans class='dt-body-center'>Service</span>",
width: "60%",
orderable: false
},
{
data: "details",
title: "Détails",
className: "tablet-l desktop",
orderable: false
}
],
iDisplayLength: -1,
order: [
[
0,
"desc"
]
],
language: {url : '/static/js/datatables/french.json'},
dom: "t",
responsive: true,
createdRow: function(row) {
for (var i = 0; i < row.cells.length; i++) {
const cell = $(row.cells[i]);
if (cell.text() === "Présent.e") {
$(row).addClass('row_partner_ok');
} else if (cell.text() === "Retard") {
$(row).addClass('row_partner_late');
} else if (cell.text() === "Absent.e") {
$(row).addClass('row_partner_absent');
} else if (cell.text().includes("Amnistie")) {
$(row).addClass('row_partner_amnistie');
}
}
}
});
}
}
/**
* Init the Incoming shifts section: display them
*/
function init_incoming_shifts() {
$(".loading-incoming-shifts").hide();
$("#incoming_shifts").show();
if (incoming_shifts.length === 0) {
$("#incoming_shifts").text("Aucun service à venir...");
} else {
$("#incoming_shifts").empty();
for (shift of incoming_shifts) {
let shift_line_template = prepare_shift_line_template(shift.date_begin);
$("#incoming_shifts").append(shift_line_template.html());
}
}
}
function init_my_shifts() {
if (incoming_shifts !== null) {
init_incoming_shifts();
} else {
load_partner_shifts(partner_data.concerned_partner_id)
.then(init_incoming_shifts);
}
if (partner_history !== null) {
init_history();
} else {
load_partner_history()
.then((data) => {
partner_history = data;
for (d of data) {
d.create_date = Date.parse(d.create_date);
}
// Sort by date desc
partner_history.sort((a, b) => b.create_date - a.create_date);
if (partner_history.length>0 && partner_history[partner_history.length-1].is_amnesty != undefined) {
partner_history.pop();
}
init_history();
});
}
$(".more_history_button").on("click", function() {
// Hide button & display loading
$('.more_history_button').hide();
$('.loading-more-history').show();
load_partner_history(partner_history.length)
.then((data) => {
partner_history = partner_history.concat(data);
if (history_table) {
history_table.rows.add(data).draw(false);
}
$('.loading-more-history').hide();
// Show "load more" if there is more to load
if (data.length === history_items_limit) {
$('.more_history_button').show();
}
});
});
}
var calendar = null,
selected_shift = null,
vw = null;
/**
* A partner can exchange shifts if:
* - s.he doesn't have to choose a makeup shift
* - s.he's not an associated partner
* @returns boolean
*/
function can_exchange_shifts() {
return partner_data.makeups_to_do == 0 && partner_data.is_associated_people === "False";
}
/**
* A partner should select a shift if:
* - s.he has makeups to do
* - s.he's not an associated partner
* @returns boolean
*/
function should_select_makeup() {
return partner_data.makeups_to_do > 0 && partner_data.is_associated_people === "False";
}
/**
* Proceed to shift exchange or registration
* @param {int} new_shift_id
*/
function add_or_change_shift(new_shift_id) {
if (is_time_to('change_shift')) {
setTimeout(openModal, 100); // loading on
tData = 'idNewShift=' + new_shift_id
+'&idPartner=' + partner_data.partner_id
+ '&shift_type=' + partner_data.shift_type
+ '&verif_token=' + partner_data.verif_token;
if (selected_shift === null) {
tUrl = '/shifts/add_shift';
} else {
tUrl = '/shifts/change_shift';
tData = tData + '&idOldShift='+ selected_shift.shift_id[0] +'&idRegister=' + selected_shift.id;
}
$.ajax({
type: 'POST',
url: tUrl,
dataType:"json",
data: tData,
timeout: 3000,
success: function(data) {
if (data.result) {
// Decrement makeups to do if needed
if (partner_data.makeups_to_do > 0) {
partner_data.makeups_to_do = parseInt(partner_data.makeups_to_do, 10) - 1;
if (partner_data.makeups_to_do === 0) {
$("#need_to_select_makeups_message").hide();
} else {
$(".makeups_nb").text(partner_data.makeups_to_do);
}
}
let msg = "Parfait! ";
msg += (selected_shift === null)
? "Le service choisi a été ajouté."
: "Le service a été échangé.";
selected_shift = null;
// Refetch partner shifts list & update DOM
load_partner_shifts(partner_data.concerned_partner_id)
.then(() => {
init_shifts_list();
closeModal();
setTimeout(() => {
alert(msg);
}, 100);
});
// Redraw calendar
calendar.refetchEvents();
}
},
error: function(error) {
closeModal();
selected_shift = null;
if (error.status === 400) {
alert(`Désolé ! Le service que vous souhaitez échanger démarre dans moins de 24h. ` +
`Il n'est plus possible de l'échanger.`);
} else {
alert(`Une erreur est survenue. ` +
`Il est néanmoins possible que la requête ait abouti, ` +
`veuillez patienter quelques secondes puis vérifier vos services enregistrés.`);
}
// Refectch shifts anyway, if registration/exchange was still succesful
setTimeout(() => {
load_partner_shifts(partner_data.concerned_partner_id)
.then(init_shifts_list);
}, 300);
}
});
}
}
function init_shifts_list() {
$(".loading-incoming-shifts").hide();
$("#shifts_list").show();
if (incoming_shifts.length === 0) {
$("#shifts_list").text("Aucun service à venir...");
} else {
$("#shifts_list").empty();
for (shift of incoming_shifts) {
let shift_line_template = $("#selectable_shift_line_template");
let datetime_shift_start = new Date(shift.date_begin.replace(/\s/, 'T'));
let f_date_shift_start = datetime_shift_start.toLocaleDateString("fr-fr", date_options);
f_date_shift_start = f_date_shift_start.charAt(0).toUpperCase() + f_date_shift_start.slice(1);
shift_line_template.find(".shift_line_date").text(f_date_shift_start);
shift_line_template.find(".shift_line_time").text(datetime_shift_start.toLocaleTimeString("fr-fr", time_options));
if (!can_exchange_shifts()) {
shift_line_template.find(".selectable_shift_line").removeClass("btn--primary");
shift_line_template.find(".selectable_shift_line").addClass("btn");
shift_line_template.find(".checkbox").prop("disabled", "disabled");
} else {
shift_line_template.find(".selectable_shift_line").removeClass("btn");
shift_line_template.find(".selectable_shift_line").addClass("btn--primary");
shift_line_template.find(".checkbox").prop("disabled", false);
shift_line_template.find(".checkbox").prop("value", shift.id);
}
$("#shifts_list").append(shift_line_template.html());
}
$(".selectable_shift_line").on("click", function(e) {
if (can_exchange_shifts()) {
let cb = $(this).find(".checkbox");
// Select checkbox on click on button
if (!$(e.target).hasClass("checkbox")) {
cb.prop("checked", !cb.prop("checked"));
}
if (cb.prop("checked")) {
selected_shift = incoming_shifts.find(s => s.id == cb.prop("value"));
} else {
selected_shift = null;
}
// Unselect other checkboxes
if ($(this).find(".checkbox")
.prop("checked")) {
for (let cb_item of $("#shifts_list").find(".checkbox")) {
if (cb.prop("value") !== $(cb_item).prop("value")) {
$(cb_item).prop("checked", false);
}
}
}
}
});
}
}
/**
* Inits the page when the calendar is displayed
*/
function init_calendar_page() {
let template_explanations = $("#calendar_explaination_template");
if (vw <= 992) {
$(".loading-calendar").show();
$("#calendar_explaination_area").hide();
$("#calendar_explaination_button").on("click", () => {
openModal(
template_explanations.html(),
closeModal,
"J'ai compris"
);
})
.show();
} else {
$("#calendar_explaination_button").hide();
$("#calendar_explaination_area").html(template_explanations.html())
.show();
}
if (incoming_shifts !== null) {
init_shifts_list();
} else {
load_partner_shifts(partner_data.concerned_partner_id)
.then(init_shifts_list);
}
if (should_select_makeup()) {
$(".makeups_nb").text(partner_data.makeups_to_do);
$("#need_to_select_makeups_message").show();
}
let default_initial_view = "";
let header_toolbar = {};
if (vw <= 768) {
default_initial_view = 'listWeek';
header_toolbar = {
left: 'title',
center: 'listWeek,timeGridDay',
right: 'prev,next today'
};
} else if (vw <=992) {
default_initial_view = 'listWeek';
header_toolbar = {
left: 'title',
center: 'dayGridMonth,listWeek,timeGridDay',
right: 'prev,next today'
};
} else {
default_initial_view = 'dayGridMonth';
header_toolbar = {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,listWeek,timeGridDay'
};
}
const hidden_days = days_to_hide.length > 0 ? $.map(days_to_hide.split(", "), Number) : [];
const calendarEl = document.getElementById('calendar');
calendar = new FullCalendar.Calendar(calendarEl, {
locale: 'fr',
initialView: default_initial_view,
headerToolbar: header_toolbar,
buttonText: {
list: "Semaine"
},
eventTimeFormat: {
hour: '2-digit',
minute: '2-digit'
},
allDaySlot: false,
contentHeight: "auto",
eventDisplay: "block",
hiddenDays: hidden_days,
events: '/shifts/get_list_shift_calendar/' + partner_data.concerned_partner_id,
eventClick: function(info) {
if (!$(info.el).hasClass("shift_booked")) {
const new_shift_id = info.event.id;
// Set new shift
const datetime_new_shift = info.event.start;
let new_shift_date = datetime_new_shift.toLocaleDateString("fr-fr", date_options);
let new_shift_time = datetime_new_shift.toLocaleTimeString("fr-fr", time_options);
if (selected_shift !== null && can_exchange_shifts()) {
/* shift exchange */
// Set old shift
let datetime_old_shift = new Date(selected_shift.date_begin);
let old_shift_date = datetime_old_shift.toLocaleDateString("fr-fr", date_options);
let old_shift_time = datetime_old_shift.toLocaleTimeString("fr-fr", time_options);
// Display modal
let modal_template = $("#modal_shift_exchange_template");
modal_template.find(".date_old_shift").text(old_shift_date);
modal_template.find(".time_old_shift").text(old_shift_time);
modal_template.find(".date_new_shift").text(new_shift_date);
modal_template.find(".time_new_shift").text(new_shift_time);
openModal(
modal_template.html(),
() => {
add_or_change_shift(new_shift_id);
},
"Valider"
);
} else if (selected_shift === null && can_exchange_shifts()) {
/* could exchange shift but no old shift selected */
openModal(
"Je dois sélectionner un service à échanger.",
closeModal,
"J'ai compris"
);
} else if (should_select_makeup()) {
/* choose a makeup service */
// Check if selected new shift is in less than 6 months
if (partner_data.date_delay_stop !== 'False') {
date_partner_delay_stop = new Date(partner_data.date_delay_stop);
if (datetime_new_shift > date_partner_delay_stop) {
let msg = `Vous avez jusqu'au ${date_partner_delay_stop.toLocaleDateString("fr-fr", date_options)} ` +
`pour sélectionner un rattrapage (soit une période de 6 mois depuis votre absence).`;
alert(msg);
return;
}
}
let modal_template = $("#modal_add_shift_template");
modal_template.find(".date_new_shift").text(new_shift_date);
modal_template.find(".time_new_shift").text(new_shift_time);
openModal(
modal_template.html(),
() => {
add_or_change_shift(new_shift_id);
},
"Valider"
);
}
}
},
eventDidMount: function() {
// Calendar is hidden at first on mobile to hide header change when data is loaded
$(".loading-calendar").hide();
$("#calendar").show();
if (vw <= 992) {
$(".fc .fc-header-toolbar").addClass("resp-header-toolbar");
} else {
$(".fc .fc-header-toolbar").removeClass("resp-header-toolbar");
}
}
});
calendar.render();
}
function init_shifts_exchange() {
$(".shifts_exchange_page_content").hide();
vw = window.innerWidth;
if (partner_data.cooperative_state === 'unsubscribed') {
$("#unsuscribed_content").show();
$(".unsuscribed_form_link")
.show()
.attr('href', unsuscribe_form_link)
.on('click', function() {
setTimeout(500, () => {
$(this).removeClass('active');
});
});
} else if (
partner_data.cooperative_state === 'suspended'
&& partner_data.can_have_delay === 'False') {
let msg_template = $("#cant_have_delay_msg_template");
$(".suspended_cant_have_delay_msg").html(msg_template.html());
$("#suspended_cant_have_delay_content").show();
$(".cant_have_delay_form_link")
.show()
.attr('href', member_cant_have_delay_form_link)
.on('click', function() {
setTimeout(500, () => {
$(this).removeClass('active');
});
});
} else if (
partner_data.comite === "True") {
let msg_template = $("#comite_template");
$(".comite_content_msg").html(msg_template.html());
$("#comite_content").show();
} else if (partner_data.cooperative_state === 'suspended'
&& partner_data.date_delay_stop === 'False') {
$("#suspended_content .makeups_nb").text(partner_data.makeups_to_do);
$("#suspended_content").show();
$(".select_makeups").on('click', () => {
openModal();
// Create 6 month delay
request_delay()
.then(() => {
$("#suspended_content").hide();
$("#shifts_exchange_content").show();
closeModal();
init_calendar_page();
});
});
} else {
$("#shifts_exchange_content").show();
init_calendar_page();
}
$(window).smartresize(function() {
vw = window.innerWidth;
init_calendar_page();
});
}
\ No newline at end of file
/**
* Common logic between pages
*/
var base_location = null,
current_location = null,
incoming_shifts = null,
partner_history = null;
var date_options = {weekday: "long", year: "numeric", month: "long", day: "numeric"};
var time_options = {hour: '2-digit', minute:'2-digit'};
const possible_cooperative_state = {
suspended: "Rattrapage",
exempted: "Exempté.e",
alert: "En alerte",
up_to_date: "À jour",
unsubscribed: "Désinscrit.e des créneaux",
delay: "En délai"
};
/* - Data */
/**
* Load the shifts the member is registered to
* @param {int} partner_id either the members id, or its parent's if s.he's attached
*/
function load_partner_shifts(partner_id) {
return new Promise((resolve) => {
$.ajax({
type: 'GET',
url: "/shifts/get_list_shift_partner/" + partner_id,
dataType:"json",
traditional: true,
contentType: "application/json; charset=utf-8",
success: function(data) {
incoming_shifts = data;
resolve();
},
error: function(data) {
err = {msg: "erreur serveur lors de la récupération des services", ctx: 'load_partner_shifts'};
if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') {
err.msg += ' : ' + data.responseJSON.error;
}
report_JS_error(err, 'members_space.index');
closeModal();
// TODO Notify
alert('Erreur lors de la récupération de vos services.');
}
});
});
}
/* - Navigation */
/**
* @param {String} page home | mes-infos | mes-services | echange-de-services | faq
*/
function goto(page) {
if (window.location.pathname === base_location) {
history.pushState({}, '', page);
} else {
history.replaceState({}, '', page);
}
update_dom();
}
/**
* Define which html content to load from server depending on the window location
*
* WARNING: For the routing system to work,
* public urls (those the users will see & navigate to) must be different than the server urls used to fetch resources
* (ex: public url: /members_space/mes-info ; server url: /members_space/my_info)
*/
function update_dom() {
$(".nav_item").removeClass('active');
if (window.location.pathname === base_location || window.location.pathname === base_location + "home") {
current_location = "home";
$("#main_content").load("/members_space/homepage", update_content);
$("#nav_home").addClass("active");
} else if (window.location.pathname === base_location + "mes-infos") {
current_location = "my_info";
$("#main_content").load("/members_space/my_info", update_content);
$("#nav_my_info").addClass("active");
} else if (window.location.pathname === base_location + "mes-services") {
current_location = "my_shifts";
$("#main_content").load("/members_space/my_shifts", update_content);
$("#nav_my_shifts").addClass("active");
} else if (window.location.pathname === base_location + "faq") {
current_location = "faq";
$("#main_content").load("/members_space/faqBDM", update_content);
$("#nav_faq").addClass("active");
} else if (window.location.pathname === base_location + "echange-de-services") {
current_location = "shifts_exchange";
$("#main_content").load("/members_space/shifts_exchange", update_content);
$("#nav_shifts_exchange").addClass("active");
} else {
$("#main_content").load("/members_space/no_content");
}
}
/**
* Update the data displayed depending on the current location
* (ex: insert personal data in the DOM when on the 'My Info' page)
*/
function update_content() {
switch (current_location) {
case 'home':
init_home();
break;
case 'my_info':
init_my_info();
break;
case 'my_shifts':
init_my_shifts();
break;
case 'faq':
init_faq();
break;
case 'shifts_exchange':
init_shifts_exchange();
break;
default:
console.log(`Bad input`);
}
}
/* - Shifts */
/**
* Prepare a shift line to insert into the DOM.
* Is used in: Home - My Shifts tile ; My Shifts - Incoming shifts section
*
* @param {String} date_begin beginning datetime of the shift
* @returns JQuery node object of the formatted template
*/
function prepare_shift_line_template(date_begin) {
let shift_line_template = $("#shift_line_template");
let datetime_shift_start = new Date(date_begin.replace(/\s/, 'T'));
let f_date_shift_start = datetime_shift_start.toLocaleDateString("fr-fr", date_options);
f_date_shift_start = f_date_shift_start.charAt(0).toUpperCase() + f_date_shift_start.slice(1);
shift_line_template.find(".shift_line_date").text(f_date_shift_start);
shift_line_template.find(".shift_line_time").text(datetime_shift_start.toLocaleTimeString("fr-fr", time_options));
return shift_line_template;
}
/* - Member info */
/**
* Init common personal data between screens
*/
function init_my_info_data() {
$(".choose_makeups").off();
$(".unsuscribed_form_link").off();
$(".member_shift_name").text(partner_data.regular_shift_name);
let pns = partner_data.name.split(" - ");
let name = pns.length > 1 ? pns[1] : pns[0];
$(".member_name").text(name);
// Status related
$(".member_status")
.text(possible_cooperative_state[partner_data.cooperative_state])
.addClass("member_status_" + partner_data.cooperative_state);
if (partner_data.cooperative_state === 'delay' && partner_data.date_delay_stop !== 'False') {
const d = new Date(Date.parse(partner_data.date_delay_stop));
const f_date_delay_stop = d.getDate()+'/'+("0" + (d.getMonth() + 1)).slice(-2)+'/'+d.getFullYear();
$(".delay_date_stop").text(f_date_delay_stop);
$(".delay_date_stop_container").show();
} else if (partner_data.cooperative_state === 'unsubscribed') {
$(".member_shift_name").text('X');
$(".unsuscribed_form_link")
.show()
.attr('href', unsuscribe_form_link)
.on('click', function() {
setTimeout(500, () => {
$(this).removeClass('active');
});
});
} else if (partner_data.cooperative_state === 'exempted') {
const d = new Date(Date.parse(partner_data.leave_stop_date));
const f_date_delay_stop = d.getDate()+'/'+("0" + (d.getMonth() + 1)).slice(-2)+'/'+d.getFullYear();
$(".delay_date_stop").text(f_date_delay_stop);
$(".delay_date_stop_container").show();
}
if (
partner_data.makeups_to_do > 0
&& partner_data.is_associated_people === "False"
&& partner_data.cooperative_state !== 'unsubscribed'
) {
$(".choose_makeups").show();
if (
partner_data.cooperative_state === 'suspended'
&& partner_data.date_delay_stop === 'False') {
// If the member is suspended & doesn't have a delay
$(".choose_makeups").on('click', () => {
// Create 6 month delay
request_delay()
.then(() => {
// Then redirect to calendar
goto('echange-de-services');
});
});
} else {
$(".choose_makeups").on('click', () => {
goto('echange-de-services');
});
}
}
$(".member_coop_number").text(partner_data.barcode_base);
}
$(document).ready(function() {
// TODO essayer de ne charger les js que au besoin
$.ajaxSetup({ headers: { "X-CSRFToken": getCookie('csrftoken') } });
// If partner is associated (attached), display the pair's main partner shift data
partner_data.concerned_partner_id =
(partner_data.is_associated_people === "True")
? partner_data.parent_id
: partner_data.partner_id;
partner_data.is_in_association =
partner_data.is_associated_people === "True" || partner_data.associated_partner_id !== "False";
// For associated people, their parent name is attached in their display name
let partner_name_split = partner_data.name.split(', ');
partner_data.name = partner_name_split[partner_name_split.length - 1];
base_location = (app_env === 'dev') ? '/members_space/' : '/';
update_dom();
window.onpopstate = function() {
update_dom();
};
});
(function($, sr) {
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
return function debounced () {
var obj = this, args = arguments;
function delayed () {
if (!execAsap)
func.apply(obj, args);
timeout = null;
}
if (timeout)
clearTimeout(timeout);
else if (execAsap)
func.apply(obj, args);
timeout = setTimeout(delayed, threshold || 100);
};
};
// smartresize
jQuery.fn[sr] = function(fn) {
return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr);
};
})(jQuery, 'smartresize');
\ No newline at end of file
from django.test import SimpleTestCase
\ No newline at end of file
from django.test import SimpleTestCase
\ No newline at end of file
from django.test import SimpleTestCase
class TestUrls(SimpleTestCase):
def test_list_url_is_resolved(self):
assert 1==1
\ No newline at end of file
from django.test import SimpleTestCase
\ No newline at end of file
"""."""
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index),
url(r'^homepage$', views.home), # These endpoints must be different than in-app url
url(r'^my_info$', views.my_info),
url(r'^my_shifts$', views.my_shifts),
url(r'^shifts_exchange$', views.shifts_exchange),
url(r'^faqBDM$', views.faqBDM),
url(r'^no_content$', views.no_content),
url(r'^get_shifts_history$', views.get_shifts_history),
url('/*$', views.index), # Urls unknown from the server will redirect to index
]
from outils.common_imports import *
from outils.for_view_imports import *
from django.urls import reverse
from outils.common import Verification
from outils.common import MConfig
from members.models import CagetteMember
from shifts.models import CagetteShift
from members_space.models import CagetteMembersSpace
import hashlib
def _get_response_according_to_credentials(request, credentials, context, template):
response = HttpResponse(template.render(context, request))
if ('token' in credentials and 'auth_token' in credentials):
response.set_cookie('id', credentials['id'])
response.set_cookie('token', credentials['token'])
response.set_cookie('auth_token', credentials['auth_token'])
response.set_cookie('deconnect_option', 'true')
return response
def index(request, exception=None):
"""Display main screen for the members space"""
credentials = CagetteMember.get_credentials(request)
context = {
'title': 'Espace Membre',
}
template = loader.get_template('members_space/index.html')
if ('failure' in credentials):
# Bad credentials (or none)
template = loader.get_template('website/connect.html')
context['msg'] = ''
if 'msg' in credentials:
context['msg'] = credentials['msg']
context['password_placeholder'] = 'Naissance (jjmmaaaa)'
context['is_member_space'] = True
elif ('validation_state' in credentials) and credentials['validation_state'] == 'waiting_validation_member':
# First connection, until the member validated his account
template = loader.get_template('members/validation_coop.html')
referer = request.META.get('HTTP_REFERER')
doc = CagetteMember.get_couchdb_data(credentials['login'])
if len(doc) > 1:
context = {'title': 'Validation inscription',
'coop': json.dumps(doc),
'coop_msg': doc.get('coop_msg'),
'warning_placeholder':
"""Signaler ici une anomalie du formulaire,
un problème lié à votre souscription""",
'referer': referer,
'mag_place_string': settings.MAG_NAME,
'office_place_string': settings.OFFICE_NAME,
'max_begin_hour': settings.MAX_BEGIN_HOUR,
'payment_meanings': settings.SUBSCRIPTION_PAYMENT_MEANINGS,
'em_url': settings.EM_URL,
'WELCOME_ENTRANCE_MSG': settings.WELCOME_ENTRANCE_MSG,
'WELCOME_SUBTITLE_ENTRANCE_MSG': getattr(settings, 'WELCOME_SUBTITLE_ENTRANCE_MSG', '')}
if hasattr(settings, 'SUBSCRIPTION_ASK_FOR_SEX'):
context['ask_for_sex'] = settings.SUBSCRIPTION_ASK_FOR_SEX
if hasattr(settings, 'SUBSCRIPTION_ADD_STREET2'):
context['ask_for_street2'] = settings.SUBSCRIPTION_ADD_STREET2
if hasattr(settings, 'SUBSCRIPTION_ADD_SECOND_PHONE'):
context['ask_for_second_phone'] = settings.SUBSCRIPTION_ADD_SECOND_PHONE
else:
# Members space
if 'id' in request.COOKIES:
partner_id = request.COOKIES['id']
else:
partner_id = credentials['id']
cs = CagetteShift()
partnerData = cs.get_data_partner(partner_id)
if 'create_date' in partnerData:
md5_calc = hashlib.md5(partnerData['create_date'].encode('utf-8')).hexdigest()
partnerData['verif_token'] = md5_calc
# Error case encountered from Odoo: member in delay state and last extension is over -> member is suspended
try:
if partnerData['cooperative_state'] == "delay" and datetime.datetime.strptime(partnerData['date_delay_stop'], '%Y-%m-%d') < datetime.datetime.now():
partnerData['cooperative_state'] = "suspended"
except:
pass
# look for parent for associated partner
if partnerData["parent_id"] is not False:
partnerData["parent_name"] = partnerData["parent_id"][1]
partnerData["parent_id"] = partnerData["parent_id"][0]
else:
partnerData["parent_name"] = False
# look for associated partner for parents
cm = CagetteMember(partner_id)
associated_partner = cm.search_associated_people()
partnerData["associated_partner_id"] = False if associated_partner is None else associated_partner["id"]
partnerData["associated_partner_name"] = False if associated_partner is None else associated_partner["name"]
if (associated_partner is not None and partnerData["associated_partner_name"].find(str(associated_partner["barcode_base"])) == -1):
partnerData["associated_partner_name"] = str(associated_partner["barcode_base"]) + ' - ' + partnerData["associated_partner_name"]
partnerData['can_have_delay'] = cs.member_can_have_delay(int(partner_id))
m = CagetteMembersSpace()
partnerData["comite"] = m.is_comite(partner_id)
context['partnerData'] = partnerData
# Days to hide in the calendar
days_to_hide = "0"
context['ADDITIONAL_INFO_SHIFT_PAGE'] = getattr(settings, 'ADDITIONAL_INFO_SHIFT_PAGE', '')
if hasattr(settings, 'SHIFT_EXCHANGE_DAYS_TO_HIDE'):
days_to_hide = settings.SHIFT_EXCHANGE_DAYS_TO_HIDE
context['daysToHide'] = days_to_hide
msettings = MConfig.get_settings('members')
context['forms_link'] = msettings['forms_link']['value'] if 'forms_link' in msettings else ''
context['unsuscribe_form_link'] = ( msettings['unsuscribe_form_link']['value']
if 'unsuscribe_form_link' in msettings
else '')
context['member_cant_have_delay_form_link'] = ( msettings['member_cant_have_delay_form_link']['value']
if 'member_cant_have_delay_form_link' in msettings
else '')
context['abcd_calendar_link'] = ( msettings['abcd_calendar_link']['value']
if 'abcd_calendar_link' in msettings
else '')
context['request_form_link'] = msettings['request_form_link']['value'] if 'request_form_link' in msettings else ''
context['late_service_form_link'] = msettings['late_service_form_link']['value'] if 'late_service_form_link' in msettings else ''
context['change_template_form_link'] = msettings['change_template_form_link']['value'] if 'change_template_form_link' in msettings else ''
context['associated_subscribe_form_link'] = msettings['associated_subscribe_form_link']['value'] if 'associated_subscribe_form_link' in msettings else ''
context['associated_unsubscribe_form_link'] = msettings['associated_unsubscribe_form_link']['value'] if 'associated_unsubscribe_form_link' in msettings else ''
context['template_unsubscribe_form_link'] = msettings['template_unsubscribe_form_link']['value'] if 'template_unsubscribe_form_link' in msettings else ''
context['change_email_form_link'] = msettings['change_email_form_link']['value'] if 'change_email_form_link' in msettings else ''
context['coop_unsubscribe_form_link'] = msettings['coop_unsubscribe_form_link']['value'] if 'coop_unsubscribe_form_link' in msettings else ''
context['sick_leave_form_link'] = msettings['sick_leave_form_link']['value'] if 'sick_leave_form_link' in msettings else ''
context['underage_subscribe_form_link'] = msettings['underage_subscribe_form_link']['value'] if 'underage_subscribe_form_link' in msettings else ''
context['helper_subscribe_form_link'] = msettings['helper_subscribe_form_link']['value'] if 'helper_subscribe_form_link' in msettings else ''
context['helper_unsubscribe_form_link'] = msettings['helper_unsubscribe_form_link']['value'] if 'helper_unsubscribe_form_link' in msettings else ''
context['covid_form_link'] = msettings['covid_form_link']['value'] if 'covid_form_link' in msettings else ''
context['covid_end_form_link'] = msettings['covid_end_form_link']['value'] if 'covid_end_form_link' in msettings else ''
else:
# may arrive when switching database without cleaning cookie
return redirect('/website/deconnect')
return _get_response_according_to_credentials(request, credentials, context, template)
def home(request):
"""
Endpoint the front-end will call to load the "home" page.
Consequently, the front-end url should be unknown from the server so the user is redirected to the index,
then the front-end index will call this endpoint to load the home page
"""
template = loader.get_template('members_space/home.html')
context = {
'title': 'Espace Membres',
}
# Get messages to display
msettings = MConfig.get_settings('members')
if 'msg_accueil' in msettings:
context['msg_accueil'] = msettings['msg_accueil']['value']
if 'shop_opening_hours' in msettings:
context['shop_opening_hours'] = msettings['shop_opening_hours']['value']
return HttpResponse(template.render(context, request))
def my_info(request):
""" Endpoint the front-end will call to load the "My info" page. """
template = loader.get_template('members_space/my_info.html')
context = {
'title': 'Mes Infos',
}
return HttpResponse(template.render(context, request))
def my_shifts(request):
""" Endpoint the front-end will call to load the "My shifts" page. """
template = loader.get_template('members_space/my_shifts.html')
context = {
'title': 'Mes Services',
}
return HttpResponse(template.render(context, request))
def shifts_exchange(request):
""" Endpoint the front-end will call to load the "Shifts exchange" page. """
template = loader.get_template('members_space/shifts_exchange.html')
context = {
'title': 'Échange de Services',
}
return HttpResponse(template.render(context, request))
def faqBDM(request):
template = loader.get_template('members_space/faq.html')
context = {
'title': 'foire aux questions',
}
msettings = MConfig.get_settings('members')
return HttpResponse(template.render(context, request))
def no_content(request):
""" Endpoint the front-end will call to load the "No content" page. """
template = loader.get_template('members_space/no_content.html')
context = {
'title': 'Contenu non trouvé',
}
return HttpResponse(template.render(context, request))
def get_shifts_history(request):
res = {}
partner_id = int(request.GET.get('partner_id'))
m = CagetteMembersSpace()
limit = int(request.GET.get('limit'))
offset = int(request.GET.get('offset'))
date_from = getattr(settings, 'START_DATE_FOR_SHIFTS_HISTORY', '2018-01-01')
res["data"] = m.get_shifts_history(partner_id, limit, offset, date_from)
return JsonResponse(res)
\ No newline at end of file
......@@ -1264,9 +1264,9 @@ function _compute_product_data(product) {
days_covered = (product.qty_available + product.incoming_qty + purchase_qty) / product.daily_conso;
days_covered = Math.floor(days_covered);
}
item.qty_not_covered = qty_not_covered;
item.days_covered = days_covered;
item.days_covered = days_covered;
return item;
}
......
......@@ -22,6 +22,10 @@
Used to draw weeks planning
- COMPANY_NAME = 'lgds'
Used for company spesific code
- COMPANY_NAME = 'Les Grains de Sel'
- ADMIN_IDS = [13]
......@@ -114,6 +118,14 @@
Character which by used to separate every 2 phone figures (04.67.23.89.21 for example)
Default is " "
- SHOW_FTOP_BUTTON = True (by default)
If True, in shift_template calendar choice view, "Volant" button is included
- USE_STANDARD_SHIFT = True (by default)
La Cagette use False to implement custom rules
### Scales and labels files generation
- DAV_PATH = '/data/dav/cagette'
......@@ -244,6 +256,23 @@
(makes sens if ENTRANCE_EASY_SHIFT_VALIDATE is True)
- ENTRANCE_WITH_LATE_MODE = True
(If member is coming within the grace delay)
- ENTRANCE_VALIDATION_GRACE_DELAY = 60
(if not set, 60 minutes is the default)
- ENTRANCE_VALIDATE_PRESENCE_MESSAGE = """
<div class="explanations">
Ta présence a bien été validée ! Merci de te diriger au fond du magasin pour le lancement du créneau !
</div>
Ton prochain service <span class="service_verb">est prévu</span> le <span class="next_shift"></span>
"""
(La Cagette message, where no point data is displayed)
### Member space
- EM_URL = ''
......@@ -263,7 +292,7 @@
If not set, default view is 'dayGridMonth'
- SHIFT_EXCHANGE_DAYS_TO_HIDE = ''
- SHIFT_EXCHANGE_DAYS_TO_HIDE = '0'
By default, if this variable is not set, sunday is hidden
To hide Sunday and Monday, set this to "0,1"
......@@ -277,6 +306,7 @@
- PB_INSTRUCTIONS = """Si j'ai un problème, que je suis désinscrit, que je veux changer de créneaux ou quoi que ce soit, merci de vous rendre dans la section \"J'ai un problème\" sur le site web de <a href=\"https://lacagette-coop.fr/?MonEspaceMembre\">La Cagette</a>"""
- UNSUBSCRIBED_FORM_LINK = 'https://docs.google.com/forms/d/e/1FAIpQLScWcpls-ruYIp7HdrjRF1B1TyuzdqhvlUIcUWynbEujfj3dTg/viewform'
- UNSUBSCRIBED_MSG = 'Vous êtes désincrit·e, merci de remplir <a href="https://docs.google.com/forms/d/e/1FAIpQLSfPiC2PkSem9x_B5M7LKpoFNLDIz0k0V5I2W3Mra9AnqnQunw/viewform">ce formulaire</a> pour vous réinscrire sur un créneau.<br />Vous pouvez également contacter le Bureau des Membres en remplissant <a href="https://docs.google.com/forms/d/e/1FAIpQLSeZP0m5-EXPVJxEKJk6EjwSyZJtnbiGdYDuAeFI3ENsHAOikg/viewform">ce formulaire</a>'
Message shown to people when they connect to the Member Space
......@@ -325,7 +355,16 @@
- MEALS_PICKING_TYPE_ID = 10
### New members space
- USE_NEW_MEMBERS_SPACE = True
Should be set to False by default if parameter not set
- START_DATE_FOR_SHIFTS_HISTORY = "2018-01-01"
- AMNISTIE_DATE = "2021-11-24 00:00:00"
In members_space history display a special activity about amnistie
### Miscellious
......
......@@ -21,5 +21,7 @@ def custom_css(request):
def context_setting(request):
"""adding settings variable to context (can be overloaded in views)."""
context = {'odoo': settings.ODOO['url']}
context = {'odoo': settings.ODOO['url'],
'app_env': getattr(settings, 'APP_ENV', "prod"),
'company_code': getattr(settings, 'COMPANY_CODE', '')}
return context
\ No newline at end of file
......@@ -53,6 +53,7 @@ INSTALLED_APPS = (
'shop',
'shelfs',
'sales',
'members_space',
# 'tests'
)
......@@ -100,6 +101,7 @@ STATICFILES_DIRS = (
"shop/static",
"shelfs/static",
"orders/static",
"members_space/static",
# "tests/static"
)
......@@ -225,3 +227,5 @@ DEBUG = True
CORS_ORIGIN_ALLOW_ALL = True # Needed to make dev test with different IP and ports
ADMIN_IDS = [1]
APP_ENV = 'dev' # Default is prod
\ No newline at end of file
......@@ -25,6 +25,7 @@ footer { position: fixed;
color: white;
width:100%;
text-align: center;
z-index: 10;
}
#deconnect, #password_change {float:right; margin-left: 5px;}
......@@ -59,6 +60,11 @@ footer { position: fixed;
margin: auto;
padding:15px;
}
@media screen and (max-width:768px) {
.overlay-content .mconfirm {
width: 100%;
}
}
.overlay-content .mconfirm button {margin:5px;}
.overlay-content > em {
color: #fff;
......
table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before{top:50%;left:5px;height:1em;width:1em;margin-top:-9px;display:block;position:absolute;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#31b131}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th.dtr-control:before{content:"-";background-color:#d33333}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control:before{left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.dtr-control,table.dataTable.dtr-column>tbody>tr>th.dtr-control,table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.dtr-control:before,table.dataTable.dtr-column>tbody>tr>th.dtr-control:before,table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:.8em;width:.8em;margin-top:-0.5em;margin-left:-0.5em;display:block;position:absolute;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#31b131}table.dataTable.dtr-column>tbody>tr.parent td.dtr-control:before,table.dataTable.dtr-column>tbody>tr.parent th.dtr-control:before,table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:"-";background-color:#d33333}table.dataTable>tbody>tr.child{padding:.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul.dtr-details>li{border-bottom:1px solid #efefef;padding:.5em 0}table.dataTable>tbody>tr.child ul.dtr-details>li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul.dtr-details>li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:.5em;box-shadow:0 12px 30px rgba(0, 0, 0, 0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0, 0, 0, 0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}
#main_content {text-align: center;}
.param {margin-bottom: 15px;}
.param label {font-weight: bold;}
\ No newline at end of file
.param label {font-weight: bold;}
input.link {min-width: 50em;}
.submit_button {margin-bottom: 10px;}
/* Style the buttons that are used to open and close the accordion panel */
.accordion {
background-color: #eee;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
text-align: left;
border: none;
outline: none;
transition: 0.4s;
}
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .accordion:hover {
background-color: #ccc;
}
/* Style the accordion panel. Note: hidden by default */
.panel {
padding: 0 18px;
background-color: white;
display: none;
overflow: hidden;
}
button.accordion::after {
content: '\002B';
color: #777;
font-weight: bold;
float: right;
margin-left: 5px;
}
button.accordion.active::after {
content: "\2212";
}
MIT License
Copyright (c) 2021 Adam Shaw
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# FullCalendar
A full-sized drag & drop JavaScript event calendar
- [Project website and demos](http://fullcalendar.io/)
- [Documentation](http://fullcalendar.io/docs)
- [Support](http://fullcalendar.io/support)
- [Contributing](CONTRIBUTING.md)
- [Changelog](CHANGELOG.md)
- [License](LICENSE.txt)
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
},
initialDate: '2020-09-12',
navLinks: true, // can click day/week names to navigate views
businessHours: true, // display business hours
editable: true,
selectable: true,
events: [
{
title: 'Business Lunch',
start: '2020-09-03T13:00:00',
constraint: 'businessHours'
},
{
title: 'Meeting',
start: '2020-09-13T11:00:00',
constraint: 'availableForMeeting', // defined below
color: '#257e4a'
},
{
title: 'Conference',
start: '2020-09-18',
end: '2020-09-20'
},
{
title: 'Party',
start: '2020-09-29T20:00:00'
},
// areas where "Meeting" must be dropped
{
groupId: 'availableForMeeting',
start: '2020-09-11T10:00:00',
end: '2020-09-11T16:00:00',
display: 'background'
},
{
groupId: 'availableForMeeting',
start: '2020-09-13T10:00:00',
end: '2020-09-13T16:00:00',
display: 'background'
},
// red areas where no events can be dropped
{
start: '2020-09-24',
end: '2020-09-28',
overlap: false,
display: 'background',
color: '#ff9f89'
},
{
start: '2020-09-06',
end: '2020-09-08',
overlap: false,
display: 'background',
color: '#ff9f89'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prevYear,prev,next,nextYear today',
center: 'title',
right: 'dayGridMonth,dayGridWeek,dayGridDay'
},
initialDate: '2020-09-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01'
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var srcCalendarEl = document.getElementById('source-calendar');
var destCalendarEl = document.getElementById('destination-calendar');
var srcCalendar = new FullCalendar.Calendar(srcCalendarEl, {
editable: true,
initialDate: '2020-09-12',
events: [
{
title: 'event1',
start: '2020-09-11T10:00:00',
end: '2020-09-11T16:00:00'
},
{
title: 'event2',
start: '2020-09-13T10:00:00',
end: '2020-09-13T16:00:00'
}
],
eventLeave: function(info) {
console.log('event left!', info.event);
}
});
var destCalendar = new FullCalendar.Calendar(destCalendarEl, {
initialDate: '2020-09-12',
editable: true,
droppable: true, // will let it receive events!
eventReceive: function(info) {
console.log('event received!', info.event);
}
});
srcCalendar.render();
destCalendar.render();
});
</script>
<style>
body {
margin: 20px 0 0 20px;
font-size: 14px;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}
#source-calendar,
#destination-calendar {
float: left;
width: 600px;
margin: 0 20px 20px 0;
}
</style>
</head>
<body>
<div id='source-calendar'></div>
<div id='destination-calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
/* initialize the external events
-----------------------------------------------------------------*/
var containerEl = document.getElementById('external-events-list');
new FullCalendar.Draggable(containerEl, {
itemSelector: '.fc-event',
eventData: function(eventEl) {
return {
title: eventEl.innerText.trim()
}
}
});
//// the individual way to do it
// var containerEl = document.getElementById('external-events-list');
// var eventEls = Array.prototype.slice.call(
// containerEl.querySelectorAll('.fc-event')
// );
// eventEls.forEach(function(eventEl) {
// new FullCalendar.Draggable(eventEl, {
// eventData: {
// title: eventEl.innerText.trim(),
// }
// });
// });
/* initialize the calendar
-----------------------------------------------------------------*/
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
editable: true,
droppable: true, // this allows things to be dropped onto the calendar
drop: function(arg) {
// is the "remove after drop" checkbox checked?
if (document.getElementById('drop-remove').checked) {
// if so, remove the element from the "Draggable Events" list
arg.draggedEl.parentNode.removeChild(arg.draggedEl);
}
}
});
calendar.render();
});
</script>
<style>
body {
margin-top: 40px;
font-size: 14px;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}
#external-events {
position: fixed;
left: 20px;
top: 20px;
width: 150px;
padding: 0 10px;
border: 1px solid #ccc;
background: #eee;
text-align: left;
}
#external-events h4 {
font-size: 16px;
margin-top: 0;
padding-top: 1em;
}
#external-events .fc-event {
margin: 3px 0;
cursor: move;
}
#external-events p {
margin: 1.5em 0;
font-size: 11px;
color: #666;
}
#external-events p input {
margin: 0;
vertical-align: middle;
}
#calendar-wrap {
margin-left: 200px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='wrap'>
<div id='external-events'>
<h4>Draggable Events</h4>
<div id='external-events-list'>
<div class='fc-event fc-h-event fc-daygrid-event fc-daygrid-block-event'>
<div class='fc-event-main'>My Event 1</div>
</div>
<div class='fc-event fc-h-event fc-daygrid-event fc-daygrid-block-event'>
<div class='fc-event-main'>My Event 2</div>
</div>
<div class='fc-event fc-h-event fc-daygrid-event fc-daygrid-block-event'>
<div class='fc-event-main'>My Event 3</div>
</div>
<div class='fc-event fc-h-event fc-daygrid-event fc-daygrid-block-event'>
<div class='fc-event-main'>My Event 4</div>
</div>
<div class='fc-event fc-h-event fc-daygrid-event fc-daygrid-block-event'>
<div class='fc-event-main'>My Event 5</div>
</div>
</div>
<p>
<input type='checkbox' id='drop-remove' />
<label for='drop-remove'>remove after drop</label>
</p>
</div>
<div id='calendar-wrap'>
<div id='calendar'></div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
height: '100%',
expandRows: true,
slotMinTime: '08:00',
slotMaxTime: '20:00',
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
initialView: 'dayGridMonth',
initialDate: '2020-09-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
selectable: true,
nowIndicator: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01',
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
html, body {
overflow: hidden; /* don't do scrollbars */
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar-container {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fc-header-toolbar {
/*
the calendar will be butting up against the edges,
but let's scoot in the header's buttons
*/
padding-top: 1em;
padding-left: 1em;
padding-right: 1em;
}
</style>
</head>
<body>
<div id='calendar-container'>
<div id='calendar'></div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,listYear'
},
displayEventTime: false, // don't show the time column in list view
// THIS KEY WON'T WORK IN PRODUCTION!!!
// To make your own Google API key, follow the directions here:
// http://fullcalendar.io/docs/google_calendar/
googleCalendarApiKey: 'AIzaSyDcnW6WejpTOCffshGDDb4neIrXVUA1EAE',
// US Holidays
events: 'en.usa#holiday@group.v.calendar.google.com',
eventClick: function(arg) {
// opens events in a popup window
window.open(arg.event.url, 'google-calendar-event', 'width=700,height=600');
arg.jsEvent.preventDefault() // don't navigate in main tab
},
loading: function(bool) {
document.getElementById('loading').style.display =
bool ? 'block' : 'none';
}
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#loading {
display: none;
position: absolute;
top: 10px;
right: 10px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='loading'>loading...</div>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='https://github.com/mozilla-comm/ical.js/releases/download/v1.4.0/ical.js'></script>
<script src='../lib/main.js'></script>
<script src='../packages/icalendar/main.global.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
displayEventTime: false,
initialDate: '2019-04-01',
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,listYear'
},
events: {
url: 'ics/feed.ics',
format: 'ics',
failure: function() {
document.getElementById('script-warning').style.display = 'block';
}
},
loading: function(bool) {
document.getElementById('loading').style.display =
bool ? 'block' : 'none';
}
});
calendar.render();
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#script-warning {
display: none;
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: red;
}
#loading {
display: none;
position: absolute;
top: 10px;
right: 10px;
}
#calendar {
max-width: 1100px;
margin: 40px auto;
padding: 0 10px;
}
</style>
</head>
<body>
<div id='script-warning'>
<code>ics/feed.ics</code> must be servable
</div>
<div id='loading'>loading...</div>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
initialDate: '2020-09-12',
editable: true,
navLinks: true, // can click day/week names to navigate views
dayMaxEvents: true, // allow "more" link when too many events
events: {
url: 'php/get-events.php',
failure: function() {
document.getElementById('script-warning').style.display = 'block'
}
},
loading: function(bool) {
document.getElementById('loading').style.display =
bool ? 'block' : 'none';
}
});
calendar.render();
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#script-warning {
display: none;
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: red;
}
#loading {
display: none;
position: absolute;
top: 10px;
right: 10px;
}
#calendar {
max-width: 1100px;
margin: 40px auto;
padding: 0 10px;
}
</style>
</head>
<body>
<div id='script-warning'>
<code>php/get-events.php</code> must be running.
</div>
<div id='loading'>loading...</div>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
height: 'auto',
// stickyHeaderDates: false, // for disabling
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'listMonth,listYear'
},
// customize the button names,
// otherwise they'd all just say "list"
views: {
listMonth: { buttonText: 'list month' },
listYear: { buttonText: 'list year' }
},
initialView: 'listYear',
initialDate: '2020-09-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
events: [
{
title: 'repeating event 1',
daysOfWeek: [ 1, 2, 3 ],
duration: '00:30'
},
{
title: 'repeating event 2',
daysOfWeek: [ 1, 2, 3 ],
duration: '00:30'
},
{
title: 'repeating event 3',
daysOfWeek: [ 1, 2, 3 ],
duration: '00:30'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'listDay,listWeek'
},
// customize the button names,
// otherwise they'd all just say "list"
views: {
listDay: { buttonText: 'list day' },
listWeek: { buttonText: 'list week' }
},
initialView: 'listWeek',
initialDate: '2020-09-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01'
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script src='../lib/locales-all.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var initialLocaleCode = 'en';
var localeSelectorEl = document.getElementById('locale-selector');
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
},
initialDate: '2020-09-12',
locale: initialLocaleCode,
buttonIcons: false, // show the prev/next text
weekNumbers: true,
navLinks: true, // can click day/week names to navigate views
editable: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01'
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
// build the locale selector's options
calendar.getAvailableLocaleCodes().forEach(function(localeCode) {
var optionEl = document.createElement('option');
optionEl.value = localeCode;
optionEl.selected = localeCode == initialLocaleCode;
optionEl.innerText = localeCode;
localeSelectorEl.appendChild(optionEl);
});
// when the selected option changes, dynamically change the calendar option
localeSelectorEl.addEventListener('change', function() {
if (this.value) {
calendar.setOption('locale', this.value);
}
});
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#top {
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
font-size: 12px;
}
#calendar {
max-width: 1100px;
margin: 40px auto;
padding: 0 10px;
}
</style>
</head>
<body>
<div id='top'>
Locales:
<select id='locale-selector'></select>
</div>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
initialDate: '2020-09-12',
editable: true,
selectable: true,
businessHours: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01'
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
initialDate: '2020-09-12',
initialView: 'timeGridWeek',
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
height: 'auto',
navLinks: true, // can click day/week names to navigate views
editable: true,
selectable: true,
selectMirror: true,
nowIndicator: true,
events: [
{
title: 'All Day Event',
start: '2020-09-01',
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
initialDate: '2020-09-12',
navLinks: true, // can click day/week names to navigate views
selectable: true,
selectMirror: true,
select: function(arg) {
var title = prompt('Event Title:');
if (title) {
calendar.addEvent({
title: title,
start: arg.start,
end: arg.end,
allDay: arg.allDay
})
}
calendar.unselect()
},
eventClick: function(arg) {
if (confirm('Are you sure you want to delete this event?')) {
arg.event.remove()
}
},
editable: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01'
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='https://use.fontawesome.com/releases/v5.0.6/css/all.css' rel='stylesheet'>
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script src='js/theme-chooser.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar;
initThemeChooser({
init: function(themeSystem) {
calendar = new FullCalendar.Calendar(calendarEl, {
themeSystem: themeSystem,
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
},
initialDate: '2020-09-12',
weekNumbers: true,
navLinks: true, // can click day/week names to navigate views
editable: true,
selectable: true,
nowIndicator: true,
dayMaxEvents: true, // allow "more" link when too many events
// showNonCurrentDates: false,
events: [
{
title: 'All Day Event',
start: '2020-09-01'
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
},
change: function(themeSystem) {
calendar.setOption('themeSystem', themeSystem);
}
});
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-size: 14px;
}
#top,
#calendar.fc-theme-standard {
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
}
#calendar.fc-theme-bootstrap {
font-size: 14px;
}
#top {
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
font-size: 12px;
color: #000;
}
#top .selector {
display: inline-block;
margin-right: 10px;
}
#top select {
font: inherit; /* mock what Boostrap does, don't compete */
}
.left { float: left }
.right { float: right }
.clear { clear: both }
#calendar {
max-width: 1100px;
margin: 40px auto;
padding: 0 10px;
}
</style>
</head>
<body>
<div id='top'>
<div class='left'>
<div id='theme-system-selector' class='selector'>
Theme System:
<select>
<option value='bootstrap' selected>Bootstrap 4</option>
<option value='standard'>unthemed</option>
</select>
</div>
<div data-theme-system="bootstrap" class='selector' style='display:none'>
Theme Name:
<select>
<option value='' selected>Default</option>
<option value='cerulean'>Cerulean</option>
<option value='cosmo'>Cosmo</option>
<option value='cyborg'>Cyborg</option>
<option value='darkly'>Darkly</option>
<option value='flatly'>Flatly</option>
<option value='journal'>Journal</option>
<option value='litera'>Litera</option>
<option value='lumen'>Lumen</option>
<option value='lux'>Lux</option>
<option value='materia'>Materia</option>
<option value='minty'>Minty</option>
<option value='pulse'>Pulse</option>
<option value='sandstone'>Sandstone</option>
<option value='simplex'>Simplex</option>
<option value='sketchy'>Sketchy</option>
<option value='slate'>Slate</option>
<option value='solar'>Solar</option>
<option value='spacelab'>Spacelab</option>
<option value='superhero'>Superhero</option>
<option value='united'>United</option>
<option value='yeti'>Yeti</option>
</select>
</div>
<span id='loading' style='display:none'>loading theme...</span>
</div>
<div class='right'>
<span class='credits' data-credit-id='bootstrap-standard' style='display:none'>
<a href='https://getbootstrap.com/docs/3.3/' target='_blank'>Theme by Bootstrap</a>
</span>
<span class='credits' data-credit-id='bootstrap-custom' style='display:none'>
<a href='https://bootswatch.com/' target='_blank'>Theme by Bootswatch</a>
</span>
</div>
<div class='clear'></div>
</div>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var initialTimeZone = 'local';
var timeZoneSelectorEl = document.getElementById('time-zone-selector');
var loadingEl = document.getElementById('loading');
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
timeZone: initialTimeZone,
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
initialDate: '2020-09-12',
navLinks: true, // can click day/week names to navigate views
editable: true,
selectable: true,
dayMaxEvents: true, // allow "more" link when too many events
events: {
url: 'php/get-events.php',
failure: function() {
document.getElementById('script-warning').style.display = 'inline'; // show
}
},
loading: function(bool) {
if (bool) {
loadingEl.style.display = 'inline'; // show
} else {
loadingEl.style.display = 'none'; // hide
}
},
eventTimeFormat: { hour: 'numeric', minute: '2-digit', timeZoneName: 'short' },
dateClick: function(arg) {
console.log('dateClick', calendar.formatIso(arg.date));
},
select: function(arg) {
console.log('select', calendar.formatIso(arg.start), calendar.formatIso(arg.end));
}
});
calendar.render();
// load the list of available timezones, build the <select> options
// it's HIGHLY recommended to use a different library for network requests, not this internal util func
FullCalendar.requestJson('GET', 'php/get-time-zones.php', {}, function(timeZones) {
timeZones.forEach(function(timeZone) {
var optionEl;
if (timeZone !== 'UTC') { // UTC is already in the list
optionEl = document.createElement('option');
optionEl.value = timeZone;
optionEl.innerText = timeZone;
timeZoneSelectorEl.appendChild(optionEl);
}
});
}, function() {
// TODO: handle error
});
// when the timezone selector changes, dynamically change the calendar option
timeZoneSelectorEl.addEventListener('change', function() {
calendar.setOption('timeZone', this.value);
});
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#top {
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
font-size: 12px;
}
.left { float: left }
.right { float: right }
.clear { clear: both }
#script-warning, #loading { display: none }
#script-warning { font-weight: bold; color: red }
#calendar {
max-width: 1100px;
margin: 40px auto;
padding: 0 10px;
}
.tzo {
color: #000;
}
</style>
</head>
<body>
<div id='top'>
<div class='left'>
Timezone:
<select id='time-zone-selector'>
<option value='local' selected>local</option>
<option value='UTC'>UTC</option>
</select>
</div>
<div class='right'>
<span id='loading'>loading...</span>
<span id='script-warning'><code>php/get-events.php</code> must be running.</span>
</div>
<div class='clear'></div>
</div>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
height: 'auto', // enough to active sticky headers
dayMinWidth: 200,
slotDuration: '00:05:00',
initialDate: '2020-09-12',
initialView: 'timeGridWeek',
nowIndicator: true,
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
navLinks: true, // can click day/week names to navigate views
editable: true,
selectable: true,
selectMirror: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01',
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
text-align: center;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<p style='margin-bottom: 5em'>
Demo for sticky header. Also, the bottom scrollbars stick.
</p>
<div id='calendar'></div>
<p style='margin-top: 5em'>
Cool, right?
</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
dayMinWidth: 200,
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
initialDate: '2020-09-12',
initialView: 'timeGridWeek',
navLinks: true, // can click day/week names to navigate views
editable: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01',
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
initialDate: '2020-09-12',
initialView: 'timeGridWeek',
nowIndicator: true,
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
navLinks: true, // can click day/week names to navigate views
editable: true,
selectable: true,
selectMirror: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01',
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../lib/main.css' rel='stylesheet' />
<script src='../lib/main.js'></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
initialDate: '2020-09-12',
navLinks: true, // can click day/week names to navigate views
nowIndicator: true,
weekNumbers: true,
weekNumberCalculation: 'ISO',
editable: true,
selectable: true,
dayMaxEvents: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2020-09-01'
},
{
title: 'Long Event',
start: '2020-09-07',
end: '2020-09-10'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-09T16:00:00'
},
{
groupId: 999,
title: 'Repeating Event',
start: '2020-09-16T16:00:00'
},
{
title: 'Conference',
start: '2020-09-11',
end: '2020-09-13'
},
{
title: 'Meeting',
start: '2020-09-12T10:30:00',
end: '2020-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2020-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2020-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2020-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2020-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2020-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2020-09-28'
}
]
});
calendar.render();
});
</script>
<style>
body {
margin: 40px 10px;
padding: 0;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
}
#calendar {
max-width: 1100px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id='calendar'></div>
</body>
</html>
FullCalendar.globalLocales.push(function () {
'use strict';
var fr = {
code: 'fr',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
buttonText: {
prev: 'Précédent',
next: 'Suivant',
today: "Aujourd'hui",
year: 'Année',
month: 'Mois',
week: 'Semaine',
day: 'Jour',
list: 'Planning',
},
weekText: 'Sem.',
allDayText: 'Toute la journée',
moreLinkText: 'en plus',
noEventsText: 'Aucun événement à afficher',
};
return fr;
}());
/* classes attached to <body> */
/* TODO: make fc-event selector work when calender in shadow DOM */
.fc-not-allowed,
.fc-not-allowed .fc-event { /* override events' custom cursors */
cursor: not-allowed;
}
/* TODO: not attached to body. attached to specific els. move */
.fc-unselectable {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.fc {
/* layout of immediate children */
display: flex;
flex-direction: column;
font-size: 1em
}
.fc,
.fc *,
.fc *:before,
.fc *:after {
box-sizing: border-box;
}
.fc table {
border-collapse: collapse;
border-spacing: 0;
font-size: 1em; /* normalize cross-browser */
}
.fc th {
text-align: center;
}
.fc th,
.fc td {
vertical-align: top;
padding: 0;
}
.fc a[data-navlink] {
cursor: pointer;
}
.fc a[data-navlink]:hover {
text-decoration: underline;
}
.fc-direction-ltr {
direction: ltr;
text-align: left;
}
.fc-direction-rtl {
direction: rtl;
text-align: right;
}
.fc-theme-standard td,
.fc-theme-standard th {
border: 1px solid #ddd;
border: 1px solid var(--fc-border-color, #ddd);
}
/* for FF, which doesn't expand a 100% div within a table cell. use absolute positioning */
/* inner-wrappers are responsible for being absolute */
/* TODO: best place for this? */
.fc-liquid-hack td,
.fc-liquid-hack th {
position: relative;
}
@font-face {
font-family: 'fcicons';
src: url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format('truetype');
font-weight: normal;
font-style: normal;
}
.fc-icon {
/* added for fc */
display: inline-block;
width: 1em;
height: 1em;
text-align: center;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'fcicons' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.fc-icon-chevron-left:before {
content: "\e900";
}
.fc-icon-chevron-right:before {
content: "\e901";
}
.fc-icon-chevrons-left:before {
content: "\e902";
}
.fc-icon-chevrons-right:before {
content: "\e903";
}
.fc-icon-minus-square:before {
content: "\e904";
}
.fc-icon-plus-square:before {
content: "\e905";
}
.fc-icon-x:before {
content: "\e906";
}
/*
Lots taken from Flatly (MIT): https://bootswatch.com/4/flatly/bootstrap.css
These styles only apply when the standard-theme is activated.
When it's NOT activated, the fc-button classes won't even be in the DOM.
*/
.fc {
/* reset */
}
.fc .fc-button {
border-radius: 0;
overflow: visible;
text-transform: none;
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
.fc .fc-button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
.fc .fc-button {
-webkit-appearance: button;
}
.fc .fc-button:not(:disabled) {
cursor: pointer;
}
.fc .fc-button::-moz-focus-inner {
padding: 0;
border-style: none;
}
.fc {
/* theme */
}
.fc .fc-button {
display: inline-block;
font-weight: 400;
text-align: center;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: transparent;
border: 1px solid transparent;
padding: 0.4em 0.65em;
font-size: 1em;
line-height: 1.5;
border-radius: 0.25em;
}
.fc .fc-button:hover {
text-decoration: none;
}
.fc .fc-button:focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}
.fc .fc-button:disabled {
opacity: 0.65;
}
.fc {
/* "primary" coloring */
}
.fc .fc-button-primary {
color: #fff;
color: var(--fc-button-text-color, #fff);
background-color: #2C3E50;
background-color: var(--fc-button-bg-color, #2C3E50);
border-color: #2C3E50;
border-color: var(--fc-button-border-color, #2C3E50);
}
.fc .fc-button-primary:hover {
color: #fff;
color: var(--fc-button-text-color, #fff);
background-color: #1e2b37;
background-color: var(--fc-button-hover-bg-color, #1e2b37);
border-color: #1a252f;
border-color: var(--fc-button-hover-border-color, #1a252f);
}
.fc .fc-button-primary:disabled { /* not DRY */
color: #fff;
color: var(--fc-button-text-color, #fff);
background-color: #2C3E50;
background-color: var(--fc-button-bg-color, #2C3E50);
border-color: #2C3E50;
border-color: var(--fc-button-border-color, #2C3E50); /* overrides :hover */
}
.fc .fc-button-primary:focus {
box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);
}
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
color: #fff;
color: var(--fc-button-text-color, #fff);
background-color: #1a252f;
background-color: var(--fc-button-active-bg-color, #1a252f);
border-color: #151e27;
border-color: var(--fc-button-active-border-color, #151e27);
}
.fc .fc-button-primary:not(:disabled):active:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active:focus {
box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);
}
.fc {
/* icons within buttons */
}
.fc .fc-button .fc-icon {
vertical-align: middle;
font-size: 1.5em; /* bump up the size (but don't make it bigger than line-height of button, which is 1.5em also) */
}
.fc .fc-button-group {
position: relative;
display: inline-flex;
vertical-align: middle;
}
.fc .fc-button-group > .fc-button {
position: relative;
flex: 1 1 auto;
}
.fc .fc-button-group > .fc-button:hover {
z-index: 1;
}
.fc .fc-button-group > .fc-button:focus,
.fc .fc-button-group > .fc-button:active,
.fc .fc-button-group > .fc-button.fc-button-active {
z-index: 1;
}
.fc-direction-ltr .fc-button-group > .fc-button:not(:first-child) {
margin-left: -1px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.fc-direction-ltr .fc-button-group > .fc-button:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.fc-direction-rtl .fc-button-group > .fc-button:not(:first-child) {
margin-right: -1px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.fc-direction-rtl .fc-button-group > .fc-button:not(:last-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.fc .fc-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
}
.fc .fc-toolbar.fc-header-toolbar {
margin-bottom: 1.5em;
}
.fc .fc-toolbar.fc-footer-toolbar {
margin-top: 1.5em;
}
.fc .fc-toolbar-title {
font-size: 1.75em;
margin: 0;
}
.fc-direction-ltr .fc-toolbar > * > :not(:first-child) {
margin-left: .75em; /* space between */
}
.fc-direction-rtl .fc-toolbar > * > :not(:first-child) {
margin-right: .75em; /* space between */
}
.fc-direction-rtl .fc-toolbar-ltr { /* when the toolbar-chunk positioning system is explicitly left-to-right */
flex-direction: row-reverse;
}
.fc .fc-scroller {
-webkit-overflow-scrolling: touch;
position: relative; /* for abs-positioned elements within */
}
.fc .fc-scroller-liquid {
height: 100%;
}
.fc .fc-scroller-liquid-absolute {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
.fc .fc-scroller-harness {
position: relative;
overflow: hidden;
direction: ltr;
/* hack for chrome computing the scroller's right/left wrong for rtl. undone below... */
/* TODO: demonstrate in codepen */
}
.fc .fc-scroller-harness-liquid {
height: 100%;
}
.fc-direction-rtl .fc-scroller-harness > .fc-scroller { /* undo above hack */
direction: rtl;
}
.fc-theme-standard .fc-scrollgrid {
border: 1px solid #ddd;
border: 1px solid var(--fc-border-color, #ddd); /* bootstrap does this. match */
}
.fc .fc-scrollgrid,
.fc .fc-scrollgrid table { /* all tables (self included) */
width: 100%; /* because tables don't normally do this */
table-layout: fixed;
}
.fc .fc-scrollgrid table { /* inner tables */
border-top-style: hidden;
border-left-style: hidden;
border-right-style: hidden;
}
.fc .fc-scrollgrid {
border-collapse: separate;
border-right-width: 0;
border-bottom-width: 0;
}
.fc .fc-scrollgrid-liquid {
height: 100%;
}
.fc .fc-scrollgrid-section { /* a <tr> */
height: 1px /* better than 0, for firefox */
}
.fc .fc-scrollgrid-section > td {
height: 1px; /* needs a height so inner div within grow. better than 0, for firefox */
}
.fc .fc-scrollgrid-section table {
height: 1px;
/* for most browsers, if a height isn't set on the table, can't do liquid-height within cells */
/* serves as a min-height. harmless */
}
.fc .fc-scrollgrid-section-liquid > td {
height: 100%; /* better than `auto`, for firefox */
}
.fc .fc-scrollgrid-section > * {
border-top-width: 0;
border-left-width: 0;
}
.fc .fc-scrollgrid-section-header > *,
.fc .fc-scrollgrid-section-footer > * {
border-bottom-width: 0;
}
.fc .fc-scrollgrid-section-body table,
.fc .fc-scrollgrid-section-footer table {
border-bottom-style: hidden; /* head keeps its bottom border tho */
}
.fc {
/* stickiness */
}
.fc .fc-scrollgrid-section-sticky > * {
background: #fff;
background: var(--fc-page-bg-color, #fff);
position: sticky;
z-index: 3; /* TODO: var */
/* TODO: box-shadow when sticking */
}
.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky > * {
top: 0; /* because border-sharing causes a gap at the top */
/* TODO: give safari -1. has bug */
}
.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky > * {
bottom: 0; /* known bug: bottom-stickiness doesn't work in safari */
}
.fc .fc-scrollgrid-sticky-shim { /* for horizontal scrollbar */
height: 1px; /* needs height to create scrollbars */
margin-bottom: -1px;
}
.fc-sticky { /* no .fc wrap because used as child of body */
position: sticky;
}
.fc .fc-view-harness {
flex-grow: 1; /* because this harness is WITHIN the .fc's flexbox */
position: relative;
}
.fc {
/* when the harness controls the height, make the view liquid */
}
.fc .fc-view-harness-active > .fc-view {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.fc .fc-col-header-cell-cushion {
display: inline-block; /* x-browser for when sticky (when multi-tier header) */
padding: 2px 4px;
}
.fc .fc-bg-event,
.fc .fc-non-business,
.fc .fc-highlight {
/* will always have a harness with position:relative/absolute, so absolutely expand */
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fc .fc-non-business {
background: rgba(215, 215, 215, 0.3);
background: var(--fc-non-business-color, rgba(215, 215, 215, 0.3));
}
.fc .fc-bg-event {
background: rgb(143, 223, 130);
background: var(--fc-bg-event-color, rgb(143, 223, 130));
opacity: 0.3;
opacity: var(--fc-bg-event-opacity, 0.3)
}
.fc .fc-bg-event .fc-event-title {
margin: .5em;
font-size: .85em;
font-size: var(--fc-small-font-size, .85em);
font-style: italic;
}
.fc .fc-highlight {
background: rgba(188, 232, 241, 0.3);
background: var(--fc-highlight-color, rgba(188, 232, 241, 0.3));
}
.fc .fc-cell-shaded,
.fc .fc-day-disabled {
background: rgba(208, 208, 208, 0.3);
background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
}
/* link resets */
/* ---------------------------------------------------------------------------------------------------- */
a.fc-event,
a.fc-event:hover {
text-decoration: none;
}
/* cursor */
.fc-event[href],
.fc-event.fc-event-draggable {
cursor: pointer;
}
/* event text content */
/* ---------------------------------------------------------------------------------------------------- */
.fc-event .fc-event-main {
position: relative;
z-index: 2;
}
/* dragging */
/* ---------------------------------------------------------------------------------------------------- */
.fc-event-dragging:not(.fc-event-selected) { /* MOUSE */
opacity: 0.75;
}
.fc-event-dragging.fc-event-selected { /* TOUCH */
box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);
}
/* resizing */
/* ---------------------------------------------------------------------------------------------------- */
/* (subclasses should hone positioning for touch and non-touch) */
.fc-event .fc-event-resizer {
display: none;
position: absolute;
z-index: 4;
}
.fc-event:hover, /* MOUSE */
.fc-event-selected { /* TOUCH */
}
.fc-event:hover .fc-event-resizer, .fc-event-selected .fc-event-resizer {
display: block;
}
.fc-event-selected .fc-event-resizer {
border-radius: 4px;
border-radius: calc(var(--fc-event-resizer-dot-total-width, 8px) / 2);
border-width: 1px;
border-width: var(--fc-event-resizer-dot-border-width, 1px);
width: 8px;
width: var(--fc-event-resizer-dot-total-width, 8px);
height: 8px;
height: var(--fc-event-resizer-dot-total-width, 8px);
border-style: solid;
border-color: inherit;
background: #fff;
background: var(--fc-page-bg-color, #fff)
/* expand hit area */
}
.fc-event-selected .fc-event-resizer:before {
content: '';
position: absolute;
top: -20px;
left: -20px;
right: -20px;
bottom: -20px;
}
/* selecting (always TOUCH) */
/* ---------------------------------------------------------------------------------------------------- */
.fc-event-selected {
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2)
/* expand hit area (subclasses should expand) */
}
.fc-event-selected:before {
content: "";
position: absolute;
z-index: 3;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.fc-event-selected {
/* dimmer effect */
}
.fc-event-selected:after {
content: "";
background: rgba(0, 0, 0, 0.25);
background: var(--fc-event-selected-overlay-color, rgba(0, 0, 0, 0.25));
position: absolute;
z-index: 1;
/* assume there's a border on all sides. overcome it. */
/* sometimes there's NOT a border, in which case the dimmer will go over */
/* an adjacent border, which looks fine. */
top: -1px;
left: -1px;
right: -1px;
bottom: -1px;
}
/*
A HORIZONTAL event
*/
.fc-h-event { /* allowed to be top-level */
display: block;
border: 1px solid #3788d8;
border: 1px solid var(--fc-event-border-color, #3788d8);
background-color: #3788d8;
background-color: var(--fc-event-bg-color, #3788d8)
}
.fc-h-event .fc-event-main {
color: #fff;
color: var(--fc-event-text-color, #fff);
}
.fc-h-event .fc-event-main-frame {
display: flex; /* for make fc-event-title-container expand */
}
.fc-h-event .fc-event-time {
max-width: 100%; /* clip overflow on this element */
overflow: hidden;
}
.fc-h-event .fc-event-title-container { /* serves as a container for the sticky cushion */
flex-grow: 1;
flex-shrink: 1;
min-width: 0; /* important for allowing to shrink all the way */
}
.fc-h-event .fc-event-title {
display: inline-block; /* need this to be sticky cross-browser */
vertical-align: top; /* for not messing up line-height */
left: 0; /* for sticky */
right: 0; /* for sticky */
max-width: 100%; /* clip overflow on this element */
overflow: hidden;
}
.fc-h-event.fc-event-selected:before {
/* expand hit area */
top: -10px;
bottom: -10px;
}
/* adjust border and border-radius (if there is any) for non-start/end */
.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),
.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-left-width: 0;
}
.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),
.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right-width: 0;
}
/* resizers */
.fc-h-event:not(.fc-event-selected) .fc-event-resizer {
top: 0;
bottom: 0;
width: 8px;
width: var(--fc-event-resizer-thickness, 8px);
}
.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,
.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end {
cursor: w-resize;
left: -4px;
left: calc(var(--fc-event-resizer-thickness, 8px) / -2);
}
.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,
.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start {
cursor: e-resize;
right: -4px;
right: calc(var(--fc-event-resizer-thickness, 8px) / -2);
}
/* resizers for TOUCH */
.fc-h-event.fc-event-selected .fc-event-resizer {
top: 50%;
margin-top: -4px;
margin-top: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);
}
.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,
.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end {
left: -4px;
left: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);
}
.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,
.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start {
right: -4px;
right: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);
}
.fc .fc-popover {
position: absolute;
z-index: 9999;
box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.fc .fc-popover-header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 3px 4px;
}
.fc .fc-popover-title {
margin: 0 2px;
}
.fc .fc-popover-close {
cursor: pointer;
opacity: 0.65;
font-size: 1.1em;
}
.fc-theme-standard .fc-popover {
border: 1px solid #ddd;
border: 1px solid var(--fc-border-color, #ddd);
background: #fff;
background: var(--fc-page-bg-color, #fff);
}
.fc-theme-standard .fc-popover-header {
background: rgba(208, 208, 208, 0.3);
background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
}
:root {
--fc-daygrid-event-dot-width: 8px;
}
/* help things clear margins of inner content */
.fc-daygrid-day-frame,
.fc-daygrid-day-events,
.fc-daygrid-event-harness { /* for event top/bottom margins */
}
.fc-daygrid-day-frame:before, .fc-daygrid-day-events:before, .fc-daygrid-event-harness:before {
content: "";
clear: both;
display: table; }
.fc-daygrid-day-frame:after, .fc-daygrid-day-events:after, .fc-daygrid-event-harness:after {
content: "";
clear: both;
display: table; }
.fc .fc-daygrid-body { /* a <div> that wraps the table */
position: relative;
z-index: 1; /* container inner z-index's because <tr>s can't do it */
}
.fc .fc-daygrid-day.fc-day-today {
background-color: rgba(255, 220, 40, 0.15);
background-color: var(--fc-today-bg-color, rgba(255, 220, 40, 0.15));
}
.fc .fc-daygrid-day-frame {
position: relative;
min-height: 100%; /* seems to work better than `height` because sets height after rows/cells naturally do it */
}
.fc {
/* cell top */
}
.fc .fc-daygrid-day-top {
display: flex;
flex-direction: row-reverse;
}
.fc .fc-day-other .fc-daygrid-day-top {
opacity: 0.3;
}
.fc {
/* day number (within cell top) */
}
.fc .fc-daygrid-day-number {
position: relative;
z-index: 4;
padding: 4px;
}
.fc {
/* event container */
}
.fc .fc-daygrid-day-events {
margin-top: 1px; /* needs to be margin, not padding, so that available cell height can be computed */
}
.fc {
/* positioning for balanced vs natural */
}
.fc .fc-daygrid-body-balanced .fc-daygrid-day-events {
position: absolute;
left: 0;
right: 0;
}
.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events {
position: relative; /* for containing abs positioned event harnesses */
min-height: 2em; /* in addition to being a min-height during natural height, equalizes the heights a little bit */
}
.fc .fc-daygrid-body-natural { /* can coexist with -unbalanced */
}
.fc .fc-daygrid-body-natural .fc-daygrid-day-events {
margin-bottom: 1em;
}
.fc {
/* event harness */
}
.fc .fc-daygrid-event-harness {
position: relative;
}
.fc .fc-daygrid-event-harness-abs {
position: absolute;
top: 0; /* fallback coords for when cannot yet be computed */
left: 0; /* */
right: 0; /* */
}
.fc .fc-daygrid-bg-harness {
position: absolute;
top: 0;
bottom: 0;
}
.fc {
/* bg content */
}
.fc .fc-daygrid-day-bg .fc-non-business { z-index: 1 }
.fc .fc-daygrid-day-bg .fc-bg-event { z-index: 2 }
.fc .fc-daygrid-day-bg .fc-highlight { z-index: 3 }
.fc {
/* events */
}
.fc .fc-daygrid-event {
z-index: 6;
margin-top: 1px;
}
.fc .fc-daygrid-event.fc-event-mirror {
z-index: 7;
}
.fc {
/* cell bottom (within day-events) */
}
.fc .fc-daygrid-day-bottom {
font-size: .85em;
padding: 2px 3px 0
}
.fc .fc-daygrid-day-bottom:before {
content: "";
clear: both;
display: table; }
.fc .fc-daygrid-more-link {
position: relative;
z-index: 4;
cursor: pointer;
}
.fc {
/* week number (within frame) */
}
.fc .fc-daygrid-week-number {
position: absolute;
z-index: 5;
top: 0;
padding: 2px;
min-width: 1.5em;
text-align: center;
background-color: rgba(208, 208, 208, 0.3);
background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
color: #808080;
color: var(--fc-neutral-text-color, #808080);
}
.fc {
/* popover */
}
.fc .fc-more-popover .fc-popover-body {
min-width: 220px;
padding: 10px;
}
.fc-direction-ltr .fc-daygrid-event.fc-event-start,
.fc-direction-rtl .fc-daygrid-event.fc-event-end {
margin-left: 2px;
}
.fc-direction-ltr .fc-daygrid-event.fc-event-end,
.fc-direction-rtl .fc-daygrid-event.fc-event-start {
margin-right: 2px;
}
.fc-direction-ltr .fc-daygrid-week-number {
left: 0;
border-radius: 0 0 3px 0;
}
.fc-direction-rtl .fc-daygrid-week-number {
right: 0;
border-radius: 0 0 0 3px;
}
.fc-liquid-hack .fc-daygrid-day-frame {
position: static; /* will cause inner absolute stuff to expand to <td> */
}
.fc-daygrid-event { /* make root-level, because will be dragged-and-dropped outside of a component root */
position: relative; /* for z-indexes assigned later */
white-space: nowrap;
border-radius: 3px; /* dot event needs this to when selected */
font-size: .85em;
font-size: var(--fc-small-font-size, .85em);
}
/* --- the rectangle ("block") style of event --- */
.fc-daygrid-block-event .fc-event-time {
font-weight: bold;
}
.fc-daygrid-block-event .fc-event-time,
.fc-daygrid-block-event .fc-event-title {
padding: 1px;
}
/* --- the dot style of event --- */
.fc-daygrid-dot-event {
display: flex;
align-items: center;
padding: 2px 0
}
.fc-daygrid-dot-event .fc-event-title {
flex-grow: 1;
flex-shrink: 1;
min-width: 0; /* important for allowing to shrink all the way */
overflow: hidden;
font-weight: bold;
}
.fc-daygrid-dot-event:hover,
.fc-daygrid-dot-event.fc-event-mirror {
background: rgba(0, 0, 0, 0.1);
}
.fc-daygrid-dot-event.fc-event-selected:before {
/* expand hit area */
top: -10px;
bottom: -10px;
}
.fc-daygrid-event-dot { /* the actual dot */
margin: 0 4px;
box-sizing: content-box;
width: 0;
height: 0;
border: 4px solid #3788d8;
border: calc(var(--fc-daygrid-event-dot-width, 8px) / 2) solid var(--fc-event-border-color, #3788d8);
border-radius: 4px;
border-radius: calc(var(--fc-daygrid-event-dot-width, 8px) / 2);
}
/* --- spacing between time and title --- */
.fc-direction-ltr .fc-daygrid-event .fc-event-time {
margin-right: 3px;
}
.fc-direction-rtl .fc-daygrid-event .fc-event-time {
margin-left: 3px;
}
/*
A VERTICAL event
*/
.fc-v-event { /* allowed to be top-level */
display: block;
border: 1px solid #3788d8;
border: 1px solid var(--fc-event-border-color, #3788d8);
background-color: #3788d8;
background-color: var(--fc-event-bg-color, #3788d8)
}
.fc-v-event .fc-event-main {
color: #fff;
color: var(--fc-event-text-color, #fff);
height: 100%;
}
.fc-v-event .fc-event-main-frame {
height: 100%;
display: flex;
flex-direction: column;
}
.fc-v-event .fc-event-time {
flex-grow: 0;
flex-shrink: 0;
max-height: 100%;
overflow: hidden;
}
.fc-v-event .fc-event-title-container { /* a container for the sticky cushion */
flex-grow: 1;
flex-shrink: 1;
min-height: 0; /* important for allowing to shrink all the way */
}
.fc-v-event .fc-event-title { /* will have fc-sticky on it */
top: 0;
bottom: 0;
max-height: 100%; /* clip overflow */
overflow: hidden;
}
.fc-v-event:not(.fc-event-start) {
border-top-width: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.fc-v-event:not(.fc-event-end) {
border-bottom-width: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.fc-v-event.fc-event-selected:before {
/* expand hit area */
left: -10px;
right: -10px;
}
.fc-v-event {
/* resizer (mouse AND touch) */
}
.fc-v-event .fc-event-resizer-start {
cursor: n-resize;
}
.fc-v-event .fc-event-resizer-end {
cursor: s-resize;
}
.fc-v-event {
/* resizer for MOUSE */
}
.fc-v-event:not(.fc-event-selected) .fc-event-resizer {
height: 8px;
height: var(--fc-event-resizer-thickness, 8px);
left: 0;
right: 0;
}
.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start {
top: -4px;
top: calc(var(--fc-event-resizer-thickness, 8px) / -2);
}
.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end {
bottom: -4px;
bottom: calc(var(--fc-event-resizer-thickness, 8px) / -2);
}
.fc-v-event {
/* resizer for TOUCH (when event is "selected") */
}
.fc-v-event.fc-event-selected .fc-event-resizer {
left: 50%;
margin-left: -4px;
margin-left: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);
}
.fc-v-event.fc-event-selected .fc-event-resizer-start {
top: -4px;
top: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);
}
.fc-v-event.fc-event-selected .fc-event-resizer-end {
bottom: -4px;
bottom: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);
}
.fc .fc-timegrid .fc-daygrid-body { /* the all-day daygrid within the timegrid view */
z-index: 2; /* put above the timegrid-body so that more-popover is above everything. TODO: better solution */
}
.fc .fc-timegrid-divider {
padding: 0 0 2px; /* browsers get confused when you set height. use padding instead */
}
.fc .fc-timegrid-body {
position: relative;
z-index: 1; /* scope the z-indexes of slots and cols */
min-height: 100%; /* fill height always, even when slat table doesn't grow */
}
.fc .fc-timegrid-axis-chunk { /* for advanced ScrollGrid */
position: relative /* offset parent for now-indicator-container */
}
.fc .fc-timegrid-axis-chunk > table {
position: relative;
z-index: 1; /* above the now-indicator-container */
}
.fc .fc-timegrid-slots {
position: relative;
z-index: 1;
}
.fc .fc-timegrid-slot { /* a <td> */
height: 1.5em;
border-bottom: 0 /* each cell owns its top border */
}
.fc .fc-timegrid-slot:empty:before {
content: '\00a0'; /* make sure there's at least an empty space to create height for height syncing */
}
.fc .fc-timegrid-slot-minor {
border-top-style: dotted;
}
.fc .fc-timegrid-slot-label-cushion {
display: inline-block;
white-space: nowrap;
}
.fc .fc-timegrid-slot-label {
vertical-align: middle; /* vertical align the slots */
}
.fc {
/* slots AND axis cells (top-left corner of view including the "all-day" text) */
}
.fc .fc-timegrid-axis-cushion,
.fc .fc-timegrid-slot-label-cushion {
padding: 0 4px;
}
.fc {
/* axis cells (top-left corner of view including the "all-day" text) */
/* vertical align is more complicated, uses flexbox */
}
.fc .fc-timegrid-axis-frame-liquid {
height: 100%; /* will need liquid-hack in FF */
}
.fc .fc-timegrid-axis-frame {
overflow: hidden;
display: flex;
align-items: center; /* vertical align */
justify-content: flex-end; /* horizontal align. matches text-align below */
}
.fc .fc-timegrid-axis-cushion {
max-width: 60px; /* limits the width of the "all-day" text */
flex-shrink: 0; /* allows text to expand how it normally would, regardless of constrained width */
}
.fc-direction-ltr .fc-timegrid-slot-label-frame {
text-align: right;
}
.fc-direction-rtl .fc-timegrid-slot-label-frame {
text-align: left;
}
.fc-liquid-hack .fc-timegrid-axis-frame-liquid {
height: auto;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.fc .fc-timegrid-col.fc-day-today {
background-color: rgba(255, 220, 40, 0.15);
background-color: var(--fc-today-bg-color, rgba(255, 220, 40, 0.15));
}
.fc .fc-timegrid-col-frame {
min-height: 100%; /* liquid-hack is below */
position: relative;
}
.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame {
height: auto;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.fc-media-screen .fc-timegrid-cols {
position: absolute; /* no z-index. children will decide and go above slots */
top: 0;
left: 0;
right: 0;
bottom: 0
}
.fc-media-screen .fc-timegrid-cols > table {
height: 100%;
}
.fc-media-screen .fc-timegrid-col-bg,
.fc-media-screen .fc-timegrid-col-events,
.fc-media-screen .fc-timegrid-now-indicator-container {
position: absolute;
top: 0;
left: 0;
right: 0;
}
.fc {
/* bg */
}
.fc .fc-timegrid-col-bg {
z-index: 2; /* TODO: kill */
}
.fc .fc-timegrid-col-bg .fc-non-business { z-index: 1 }
.fc .fc-timegrid-col-bg .fc-bg-event { z-index: 2 }
.fc .fc-timegrid-col-bg .fc-highlight { z-index: 3 }
.fc .fc-timegrid-bg-harness {
position: absolute; /* top/bottom will be set by JS */
left: 0;
right: 0;
}
.fc {
/* fg events */
/* (the mirror segs are put into a separate container with same classname, */
/* and they must be after the normal seg container to appear at a higher z-index) */
}
.fc .fc-timegrid-col-events {
z-index: 3;
/* child event segs have z-indexes that are scoped within this div */
}
.fc {
/* now indicator */
}
.fc .fc-timegrid-now-indicator-container {
bottom: 0;
overflow: hidden; /* don't let overflow of lines/arrows cause unnecessary scrolling */
/* z-index is set on the individual elements */
}
.fc-direction-ltr .fc-timegrid-col-events {
margin: 0 2.5% 0 2px;
}
.fc-direction-rtl .fc-timegrid-col-events {
margin: 0 2px 0 2.5%;
}
.fc-timegrid-event-harness {
position: absolute /* top/left/right/bottom will all be set by JS */
}
.fc-timegrid-event-harness > .fc-timegrid-event {
position: absolute; /* absolute WITHIN the harness */
top: 0; /* for when not yet positioned */
bottom: 0; /* " */
left: 0;
right: 0;
}
.fc-timegrid-event-harness-inset .fc-timegrid-event,
.fc-timegrid-event.fc-event-mirror,
.fc-timegrid-more-link {
box-shadow: 0px 0px 0px 1px #fff;
box-shadow: 0px 0px 0px 1px var(--fc-page-bg-color, #fff);
}
.fc-timegrid-event,
.fc-timegrid-more-link { /* events need to be root */
font-size: .85em;
font-size: var(--fc-small-font-size, .85em);
border-radius: 3px;
}
.fc-timegrid-event { /* events need to be root */
margin-bottom: 1px /* give some space from bottom */
}
.fc-timegrid-event .fc-event-main {
padding: 1px 1px 0;
}
.fc-timegrid-event .fc-event-time {
white-space: nowrap;
font-size: .85em;
font-size: var(--fc-small-font-size, .85em);
margin-bottom: 1px;
}
.fc-timegrid-event-short .fc-event-main-frame {
flex-direction: row;
overflow: hidden;
}
.fc-timegrid-event-short .fc-event-time:after {
content: '\00a0-\00a0'; /* dash surrounded by non-breaking spaces */
}
.fc-timegrid-event-short .fc-event-title {
font-size: .85em;
font-size: var(--fc-small-font-size, .85em)
}
.fc-timegrid-more-link { /* does NOT inherit from fc-timegrid-event */
position: absolute;
z-index: 9999; /* hack */
color: inherit;
color: var(--fc-more-link-text-color, inherit);
background: #d0d0d0;
background: var(--fc-more-link-bg-color, #d0d0d0);
cursor: pointer;
margin-bottom: 1px; /* match space below fc-timegrid-event */
}
.fc-timegrid-more-link-inner { /* has fc-sticky */
padding: 3px 2px;
top: 0;
}
.fc-direction-ltr .fc-timegrid-more-link {
right: 0;
}
.fc-direction-rtl .fc-timegrid-more-link {
left: 0;
}
.fc {
/* line */
}
.fc .fc-timegrid-now-indicator-line {
position: absolute;
z-index: 4;
left: 0;
right: 0;
border-style: solid;
border-color: red;
border-color: var(--fc-now-indicator-color, red);
border-width: 1px 0 0;
}
.fc {
/* arrow */
}
.fc .fc-timegrid-now-indicator-arrow {
position: absolute;
z-index: 4;
margin-top: -5px; /* vertically center on top coordinate */
border-style: solid;
border-color: red;
border-color: var(--fc-now-indicator-color, red);
}
.fc-direction-ltr .fc-timegrid-now-indicator-arrow {
left: 0;
/* triangle pointing right. TODO: mixin */
border-width: 5px 0 5px 6px;
border-top-color: transparent;
border-bottom-color: transparent;
}
.fc-direction-rtl .fc-timegrid-now-indicator-arrow {
right: 0;
/* triangle pointing left. TODO: mixin */
border-width: 5px 6px 5px 0;
border-top-color: transparent;
border-bottom-color: transparent;
}
:root {
--fc-list-event-dot-width: 10px;
--fc-list-event-hover-bg-color: #f5f5f5;
}
.fc-theme-standard .fc-list {
border: 1px solid #ddd;
border: 1px solid var(--fc-border-color, #ddd);
}
.fc {
/* message when no events */
}
.fc .fc-list-empty {
background-color: rgba(208, 208, 208, 0.3);
background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
height: 100%;
display: flex;
justify-content: center;
align-items: center; /* vertically aligns fc-list-empty-inner */
}
.fc .fc-list-empty-cushion {
margin: 5em 0;
}
.fc {
/* table within the scroller */
/* ---------------------------------------------------------------------------------------------------- */
}
.fc .fc-list-table {
width: 100%;
border-style: hidden; /* kill outer border on theme */
}
.fc .fc-list-table tr > * {
border-left: 0;
border-right: 0;
}
.fc .fc-list-sticky .fc-list-day > * { /* the cells */
position: sticky;
top: 0;
background: #fff;
background: var(--fc-page-bg-color, #fff); /* for when headers are styled to be transparent and sticky */
}
.fc .fc-list-table th {
padding: 0; /* uses an inner-wrapper instead... */
}
.fc .fc-list-table td,
.fc .fc-list-day-cushion {
padding: 8px 14px;
}
.fc {
/* date heading rows */
/* ---------------------------------------------------------------------------------------------------- */
}
.fc .fc-list-day-cushion:after {
content: "";
clear: both;
display: table; /* clear floating */
}
.fc-theme-standard .fc-list-day-cushion {
background-color: rgba(208, 208, 208, 0.3);
background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
}
.fc-direction-ltr .fc-list-day-text,
.fc-direction-rtl .fc-list-day-side-text {
float: left;
}
.fc-direction-ltr .fc-list-day-side-text,
.fc-direction-rtl .fc-list-day-text {
float: right;
}
/* make the dot closer to the event title */
.fc-direction-ltr .fc-list-table .fc-list-event-graphic { padding-right: 0 }
.fc-direction-rtl .fc-list-table .fc-list-event-graphic { padding-left: 0 }
.fc .fc-list-event.fc-event-forced-url {
cursor: pointer; /* whole row will seem clickable */
}
.fc .fc-list-event:hover td {
background-color: #f5f5f5;
background-color: var(--fc-list-event-hover-bg-color, #f5f5f5);
}
.fc {
/* shrink certain cols */
}
.fc .fc-list-event-graphic,
.fc .fc-list-event-time {
white-space: nowrap;
width: 1px;
}
.fc .fc-list-event-dot {
display: inline-block;
box-sizing: content-box;
width: 0;
height: 0;
border: 5px solid #3788d8;
border: calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8);
border-radius: 5px;
border-radius: calc(var(--fc-list-event-dot-width, 10px) / 2);
}
.fc {
/* reset <a> styling */
}
.fc .fc-list-event-title a {
color: inherit;
text-decoration: none;
}
.fc {
/* underline link when hovering over any part of row */
}
.fc .fc-list-event.fc-event-forced-url:hover a {
text-decoration: underline;
}
.fc-theme-bootstrap a:not([href]) {
color: inherit; /* natural color for navlinks */
}
This source diff could not be displayed because it is too large. You can view the blob instead.
.fc-icon,.fc-unselectable{-moz-user-select:none;-ms-user-select:none}.fc .fc-button,.fc-icon{text-transform:none;font-weight:400}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc .fc-button:not(:disabled),.fc a[data-navlink],.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-unselectable{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.fc{display:flex;flex-direction:column;font-size:1em}.fc .fc-button,.fc-icon{display:inline-block;text-align:center}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{vertical-align:top;padding:0}.fc .fc-button,.fc .fc-button .fc-icon,.fc .fc-button-group,.fc .fc-timegrid-slot-label{vertical-align:middle}.fc a[data-navlink]:hover{text-decoration:underline}.fc .fc-button:hover,.fc .fc-list-event-title a,a.fc-event,a.fc-event:hover{text-decoration:none}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid #ddd;border:1px solid var(--fc-border-color,#ddd)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format('truetype');font-weight:400;font-style:normal}.fc-icon{width:1em;height:1em;-webkit-user-select:none;user-select:none;font-family:fcicons!important;speak:none;font-style:normal;font-variant:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fc-icon-chevron-left:before{content:"\e900"}.fc-icon-chevron-right:before{content:"\e901"}.fc-icon-chevrons-left:before{content:"\e902"}.fc-icon-chevrons-right:before{content:"\e903"}.fc-icon-minus-square:before{content:"\e904"}.fc-icon-plus-square:before{content:"\e905"}.fc-icon-x:before{content:"\e906"}.fc .fc-button{overflow:visible;text-transform:none;margin:0;font-family:inherit}.fc .fc-button::-moz-focus-inner{padding:0;border-style:none}.fc .fc-button{-webkit-appearance:button;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.4em .65em;font-size:1em;line-height:1.5;border-radius:.25em}.fc .fc-button:focus{outline:0;box-shadow:0 0 0 .2rem rgba(44,62,80,.25)}.fc .fc-button-primary:focus,.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{color:#fff;color:var(--fc-button-text-color,#fff);background-color:#2C3E50;background-color:var(--fc-button-bg-color,#2C3E50);border-color:#2C3E50;border-color:var(--fc-button-border-color,#2C3E50)}.fc .fc-button-primary:hover{color:#fff;color:var(--fc-button-text-color,#fff);background-color:#1e2b37;background-color:var(--fc-button-hover-bg-color,#1e2b37);border-color:#1a252f;border-color:var(--fc-button-hover-border-color,#1a252f)}.fc .fc-button-primary:disabled{color:#fff;color:var(--fc-button-text-color,#fff);background-color:#2C3E50;background-color:var(--fc-button-bg-color,#2C3E50);border-color:#2C3E50;border-color:var(--fc-button-border-color,#2C3E50)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{color:#fff;color:var(--fc-button-text-color,#fff);background-color:#1a252f;background-color:var(--fc-button-active-bg-color,#1a252f);border-color:#151e27;border-color:var(--fc-button-active-border-color,#151e27)}.fc .fc-button .fc-icon{font-size:1.5em}.fc .fc-button-group{position:relative;display:inline-flex}.fc .fc-button-group>.fc-button{position:relative;flex:1 1 auto}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-top-left-radius:0;border-bottom-left-radius:0}.fc .fc-toolbar{display:flex;justify-content:space-between;align-items:center}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{position:absolute;top:0;right:0;left:0;bottom:0}.fc .fc-scroller-harness{position:relative;overflow:hidden;direction:ltr}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid #ddd;border:1px solid var(--fc-border-color,#ddd)}.fc .fc-scrollgrid,.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{width:100%;table-layout:fixed}.fc .fc-scrollgrid table{border-top-style:hidden;border-left-style:hidden;border-right-style:hidden}.fc .fc-scrollgrid{border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-top-width:0;border-left-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color,#fff);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business,.fc .fc-view-harness-active>.fc-view{position:absolute;top:0;left:0;right:0;bottom:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-non-business{background:rgba(215,215,215,.3);background:var(--fc-non-business-color,rgba(215,215,215,.3))}.fc .fc-bg-event{background:var(--fc-bg-event-color,#8fdf82);opacity:.3;opacity:var(--fc-bg-event-opacity,.3)}.fc .fc-bg-event .fc-event-title{margin:.5em;font-size:.85em;font-size:var(--fc-small-font-size,.85em);font-style:italic}.fc .fc-highlight{background:rgba(188,232,241,.3);background:var(--fc-highlight-color,rgba(188,232,241,.3))}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:rgba(208,208,208,.3);background:var(--fc-neutral-bg-color,rgba(208,208,208,.3))}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer,.fc-h-event{display:block}.fc-event-selected .fc-event-resizer{border-radius:4px;border-radius:calc(var(--fc-event-resizer-dot-total-width,8px)/ 2);border-width:1px;border-width:var(--fc-event-resizer-dot-border-width,1px);width:8px;width:var(--fc-event-resizer-dot-total-width,8px);height:8px;height:var(--fc-event-resizer-dot-total-width,8px);border-style:solid;border-color:inherit;background:var(--fc-page-bg-color,#fff)}.fc-event-selected .fc-event-resizer:before{content:'';position:absolute;top:-20px;left:-20px;right:-20px;bottom:-20px}.fc-event-selected{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before{content:"";position:absolute;z-index:3;top:0;left:0;right:0;bottom:0}.fc-event-selected:after{content:"";background:rgba(0,0,0,.25);background:var(--fc-event-selected-overlay-color,rgba(0,0,0,.25));position:absolute;z-index:1;top:-1px;left:-1px;right:-1px;bottom:-1px}.fc-h-event{border:1px solid #3788d8;border:1px solid var(--fc-event-border-color,#3788d8);background-color:#3788d8;background-color:var(--fc-event-bg-color,#3788d8)}.fc-h-event .fc-event-main{color:#fff;color:var(--fc-event-text-color,#fff)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;vertical-align:top;left:0;right:0;max-width:100%;overflow:hidden}.fc-h-event.fc-event-selected:before{top:-10px;bottom:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{top:0;bottom:0;width:8px;width:var(--fc-event-resizer-thickness,8px)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:-4px;left:calc(var(--fc-event-resizer-thickness,8px)/ -2)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:-4px;right:calc(var(--fc-event-resizer-thickness,8px)/ -2)}.fc-h-event.fc-event-selected .fc-event-resizer{top:50%;margin-top:-4px;margin-top:calc(var(--fc-event-resizer-dot-total-width,8px)/ -2)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:-4px;left:calc(var(--fc-event-resizer-dot-total-width,8px)/ -2)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:-4px;right:calc(var(--fc-event-resizer-dot-total-width,8px)/ -2)}.fc .fc-popover{position:absolute;z-index:9999;box-shadow:0 2px 6px rgba(0,0,0,.15)}.fc .fc-popover-header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;opacity:.65;font-size:1.1em}.fc-theme-standard .fc-popover{border:1px solid #ddd;border:1px solid var(--fc-border-color,#ddd);background:var(--fc-page-bg-color,#fff)}.fc-theme-standard .fc-popover-header{background:rgba(208,208,208,.3);background:var(--fc-neutral-bg-color,rgba(208,208,208,.3))}:root{--fc-daygrid-event-dot-width:8px;--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{content:"";clear:both;display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:rgba(255,220,40,.15);background-color:var(--fc-today-bg-color,rgba(255,220,40,.15))}.fc .fc-daygrid-day-frame{position:relative;min-height:100%}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{position:relative;z-index:4;padding:4px}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{position:absolute;left:0;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{position:relative;min-height:2em}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{position:absolute;top:0;left:0;right:0}.fc .fc-daygrid-bg-harness{position:absolute;top:0;bottom:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{z-index:6;margin-top:1px}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;padding:2px 3px 0}.fc .fc-daygrid-day-bottom:before{content:"";clear:both;display:table}.fc .fc-daygrid-more-link{position:relative;z-index:4;cursor:pointer}.fc .fc-daygrid-week-number{position:absolute;z-index:5;top:0;padding:2px;min-width:1.5em;text-align:center;background-color:rgba(208,208,208,.3);background-color:var(--fc-neutral-bg-color,rgba(208,208,208,.3));color:grey;color:var(--fc-neutral-text-color,grey)}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-week-number{left:0;border-radius:0 0 3px}.fc-direction-rtl .fc-daygrid-week-number{right:0;border-radius:0 0 0 3px}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{position:relative;white-space:nowrap;border-radius:3px;font-size:.85em;font-size:var(--fc-small-font-size,.85em)}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{display:flex;align-items:center;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;min-width:0;overflow:hidden;font-weight:700}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{top:-10px;bottom:-10px}.fc-daygrid-event-dot{margin:0 4px;box-sizing:content-box;width:0;height:0;border:4px solid #3788d8;border:calc(var(--fc-daygrid-event-dot-width,8px)/ 2) solid var(--fc-event-border-color,#3788d8);border-radius:4px;border-radius:calc(var(--fc-daygrid-event-dot-width,8px)/ 2)}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}.fc-v-event{display:block;border:1px solid #3788d8;border:1px solid var(--fc-event-border-color,#3788d8);background-color:#3788d8;background-color:var(--fc-event-bg-color,#3788d8)}.fc-v-event .fc-event-main{color:#fff;color:var(--fc-event-text-color,#fff);height:100%}.fc-v-event .fc-event-main-frame{height:100%;display:flex;flex-direction:column}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{top:0;bottom:0;max-height:100%;overflow:hidden}.fc-v-event:not(.fc-event-start){border-top-width:0;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event:not(.fc-event-end){border-bottom-width:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:8px;height:var(--fc-event-resizer-thickness,8px);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:-4px;top:calc(var(--fc-event-resizer-thickness,8px)/ -2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:-4px;bottom:calc(var(--fc-event-resizer-thickness,8px)/ -2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:-4px;margin-left:calc(var(--fc-event-resizer-dot-total-width,8px)/ -2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:-4px;top:calc(var(--fc-event-resizer-dot-total-width,8px)/ -2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:-4px;bottom:calc(var(--fc-event-resizer-dot-total-width,8px)/ -2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-body,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-slot{height:1.5em;border-bottom:0}.fc .fc-timegrid-slot:empty:before{content:'\00a0'}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{overflow:hidden;display:flex;align-items:center;justify-content:flex-end}.fc .fc-timegrid-axis-cushion{max-width:60px;flex-shrink:0}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{height:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fc .fc-timegrid-col.fc-day-today{background-color:rgba(255,220,40,.15);background-color:var(--fc-today-bg-color,rgba(255,220,40,.15))}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{height:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fc-media-screen .fc-timegrid-cols{position:absolute;top:0;left:0;right:0;bottom:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{position:absolute;top:0;left:0;right:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight,.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-bg-harness{position:absolute;left:0;right:0}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{position:absolute;top:0;bottom:0;left:0;right:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px #fff;box-shadow:0 0 0 1px var(--fc-page-bg-color,#fff)}.fc-timegrid-event,.fc-timegrid-more-link{font-size:.85em;font-size:var(--fc-small-font-size,.85em);border-radius:3px}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{white-space:nowrap;font-size:.85em;font-size:var(--fc-small-font-size,.85em);margin-bottom:1px}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:'\00a0-\00a0'}.fc-timegrid-event-short .fc-event-title{font-size:.85em;font-size:var(--fc-small-font-size,.85em)}.fc-timegrid-more-link{position:absolute;z-index:9999;color:inherit;color:var(--fc-more-link-text-color,inherit);background:var(--fc-more-link-bg-color,#d0d0d0);cursor:pointer;margin-bottom:1px}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{position:absolute;z-index:4;left:0;right:0;border-style:solid;border-color:red;border-color:var(--fc-now-indicator-color,red);border-width:1px 0 0}.fc .fc-timegrid-now-indicator-arrow{position:absolute;z-index:4;margin-top:-5px;border-style:solid;border-color:red;border-color:var(--fc-now-indicator-color,red)}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}.fc-theme-standard .fc-list{border:1px solid #ddd;border:1px solid var(--fc-border-color,#ddd)}.fc .fc-list-empty{background-color:rgba(208,208,208,.3);background-color:var(--fc-neutral-bg-color,rgba(208,208,208,.3));height:100%;display:flex;justify-content:center;align-items:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{width:100%;border-style:hidden}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{position:sticky;top:0;background:var(--fc-page-bg-color,#fff)}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{content:"";clear:both;display:table}.fc-theme-standard .fc-list-day-cushion{background-color:rgba(208,208,208,.3);background-color:var(--fc-neutral-bg-color,rgba(208,208,208,.3))}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:#f5f5f5;background-color:var(--fc-list-event-hover-bg-color,#f5f5f5)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{display:inline-block;box-sizing:content-box;width:0;height:0;border:5px solid #3788d8;border:calc(var(--fc-list-event-dot-width,10px)/ 2) solid var(--fc-event-border-color,#3788d8);border-radius:5px;border-radius:calc(var(--fc-list-event-dot-width,10px)/ 2)}.fc .fc-list-event-title a{color:inherit}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}.fc-theme-bootstrap a:not([href]){color:inherit}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -386,7 +386,7 @@ try {
}
if (getCookie('deconnect_option') && $('#deconnect').length == 0) {
//Add deconnect button
// Add deconnect button
//$('body').prepend($('<button>').attr('id','password_change').text('Changer mon mot de passe'));
$('body').prepend($('<button>').attr('id', 'deconnect')
.attr('type', 'button')
......@@ -397,6 +397,11 @@ if (getCookie('deconnect_option') && $('#deconnect').length == 0) {
$('#password_change').click(function() {
window.location.href = '/website/change_pwd';
});
} else if (getCookie('deconnect_option') && $('#deconnect').length !== 0) {
// If a deconnect button already exists
$('#deconnect').click(function() {
window.location.href = "/website/deconnect";
});
}
function eanCheckDigit(s) {
......
......@@ -35,7 +35,7 @@ function get_shift_name(s_data) {
if (s_data && s_data.week) {
shift_name = weeks_name[s_data.week];
if (s_data.type == 2) {
if (s_data.type == 2 && typeof manage_ftop != "undefined" && manage_ftop == true) {
shift_name = 'Volant';
} else {
shift_name += s_data.day + ' - ' + s_data.begin;
......
/*!
Copyright 2014-2021 SpryMedia Ltd.
This source file is free software, available under the following license:
MIT license - http://datatables.net/license/mit
This source file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
For details please refer to: http://www.datatables.net
Responsive 2.2.9
2014-2021 SpryMedia Ltd - datatables.net/license
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,k,m){b instanceof String&&(b=String(b));for(var n=b.length,p=0;p<n;p++){var y=b[p];if(k.call(m,y,p,b))return{i:p,v:y}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,k,m){if(b==Array.prototype||b==Object.prototype)return b;b[k]=m.value;return b};$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var k=0;k<b.length;++k){var m=b[k];if(m&&m.Math==Math)return m}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,k){var m=$jscomp.propertyToPolyfillSymbol[k];if(null==m)return b[k];m=b[m];return void 0!==m?m:b[k]};
$jscomp.polyfill=function(b,k,m,n){k&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,k,m,n):$jscomp.polyfillUnisolated(b,k,m,n))};$jscomp.polyfillUnisolated=function(b,k,m,n){m=$jscomp.global;b=b.split(".");for(n=0;n<b.length-1;n++){var p=b[n];if(!(p in m))return;m=m[p]}b=b[b.length-1];n=m[b];k=k(n);k!=n&&null!=k&&$jscomp.defineProperty(m,b,{configurable:!0,writable:!0,value:k})};
$jscomp.polyfillIsolated=function(b,k,m,n){var p=b.split(".");b=1===p.length;n=p[0];n=!b&&n in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<p.length-1;y++){var z=p[y];if(!(z in n))return;n=n[z]}p=p[p.length-1];m=$jscomp.IS_SYMBOL_NATIVE&&"es6"===m?n[p]:null;k=k(m);null!=k&&(b?$jscomp.defineProperty($jscomp.polyfills,p,{configurable:!0,writable:!0,value:k}):k!==m&&($jscomp.propertyToPolyfillSymbol[p]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(p):$jscomp.POLYFILL_PREFIX+p,p=
$jscomp.propertyToPolyfillSymbol[p],$jscomp.defineProperty(n,p,{configurable:!0,writable:!0,value:k})))};$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(k,m){return $jscomp.findInternal(this,k,m).v}},"es6","es3");
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(k){return b(k,window,document)}):"object"===typeof exports?module.exports=function(k,m){k||(k=window);m&&m.fn.dataTable||(m=require("datatables.net")(k,m).$);return b(m,k,k.document)}:b(jQuery,window,document)})(function(b,k,m,n){function p(a,c,d){var f=c+"-"+d;if(A[f])return A[f];var g=[];a=a.cell(c,d).node().childNodes;c=0;for(d=a.length;c<d;c++)g.push(a[c]);return A[f]=g}function y(a,c,d){var f=c+"-"+
d;if(A[f]){a=a.cell(c,d).node();d=A[f][0].parentNode.childNodes;c=[];for(var g=0,l=d.length;g<l;g++)c.push(d[g]);d=0;for(g=c.length;d<g;d++)a.appendChild(c[d]);A[f]=n}}var z=b.fn.dataTable,u=function(a,c){if(!z.versionCheck||!z.versionCheck("1.10.10"))throw"DataTables Responsive requires DataTables 1.10.10 or newer";this.s={dt:new z.Api(a),columns:[],current:[]};this.s.dt.settings()[0].responsive||(c&&"string"===typeof c.details?c.details={type:c.details}:c&&!1===c.details?c.details={type:!1}:c&&
!0===c.details&&(c.details={type:"inline"}),this.c=b.extend(!0,{},u.defaults,z.defaults.responsive,c),a.responsive=this,this._constructor())};b.extend(u.prototype,{_constructor:function(){var a=this,c=this.s.dt,d=c.settings()[0],f=b(k).innerWidth();c.settings()[0]._responsive=this;b(k).on("resize.dtr orientationchange.dtr",z.util.throttle(function(){var g=b(k).innerWidth();g!==f&&(a._resize(),f=g)}));d.oApi._fnCallbackReg(d,"aoRowCreatedCallback",function(g,l,h){-1!==b.inArray(!1,a.s.current)&&b(">td, >th",
g).each(function(e){e=c.column.index("toData",e);!1===a.s.current[e]&&b(this).css("display","none")})});c.on("destroy.dtr",function(){c.off(".dtr");b(c.table().body()).off(".dtr");b(k).off("resize.dtr orientationchange.dtr");c.cells(".dtr-control").nodes().to$().removeClass("dtr-control");b.each(a.s.current,function(g,l){!1===l&&a._setColumnVis(g,!0)})});this.c.breakpoints.sort(function(g,l){return g.width<l.width?1:g.width>l.width?-1:0});this._classLogic();this._resizeAuto();d=this.c.details;!1!==
d.type&&(a._detailsInit(),c.on("column-visibility.dtr",function(){a._timer&&clearTimeout(a._timer);a._timer=setTimeout(function(){a._timer=null;a._classLogic();a._resizeAuto();a._resize(!0);a._redrawChildren()},100)}),c.on("draw.dtr",function(){a._redrawChildren()}),b(c.table().node()).addClass("dtr-"+d.type));c.on("column-reorder.dtr",function(g,l,h){a._classLogic();a._resizeAuto();a._resize(!0)});c.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});c.on("preXhr.dtr",function(){var g=
[];c.rows().every(function(){this.child.isShown()&&g.push(this.id(!0))});c.one("draw.dtr",function(){a._resizeAuto();a._resize();c.rows(g).every(function(){a._detailsDisplay(this,!1)})})});c.on("draw.dtr",function(){a._controlClass()}).on("init.dtr",function(g,l,h){"dt"===g.namespace&&(a._resizeAuto(),a._resize(),b.inArray(!1,a.s.current)&&c.columns.adjust())});this._resize()},_columnsVisiblity:function(a){var c=this.s.dt,d=this.s.columns,f,g=d.map(function(t,v){return{columnIdx:v,priority:t.priority}}).sort(function(t,
v){return t.priority!==v.priority?t.priority-v.priority:t.columnIdx-v.columnIdx}),l=b.map(d,function(t,v){return!1===c.column(v).visible()?"not-visible":t.auto&&null===t.minWidth?!1:!0===t.auto?"-":-1!==b.inArray(a,t.includeIn)}),h=0;var e=0;for(f=l.length;e<f;e++)!0===l[e]&&(h+=d[e].minWidth);e=c.settings()[0].oScroll;e=e.sY||e.sX?e.iBarWidth:0;h=c.table().container().offsetWidth-e-h;e=0;for(f=l.length;e<f;e++)d[e].control&&(h-=d[e].minWidth);var r=!1;e=0;for(f=g.length;e<f;e++){var q=g[e].columnIdx;
"-"===l[q]&&!d[q].control&&d[q].minWidth&&(r||0>h-d[q].minWidth?(r=!0,l[q]=!1):l[q]=!0,h-=d[q].minWidth)}g=!1;e=0;for(f=d.length;e<f;e++)if(!d[e].control&&!d[e].never&&!1===l[e]){g=!0;break}e=0;for(f=d.length;e<f;e++)d[e].control&&(l[e]=g),"not-visible"===l[e]&&(l[e]=!1);-1===b.inArray(!0,l)&&(l[0]=!0);return l},_classLogic:function(){var a=this,c=this.c.breakpoints,d=this.s.dt,f=d.columns().eq(0).map(function(h){var e=this.column(h),r=e.header().className;h=d.settings()[0].aoColumns[h].responsivePriority;
e=e.header().getAttribute("data-priority");h===n&&(h=e===n||null===e?1E4:1*e);return{className:r,includeIn:[],auto:!1,control:!1,never:r.match(/\bnever\b/)?!0:!1,priority:h}}),g=function(h,e){h=f[h].includeIn;-1===b.inArray(e,h)&&h.push(e)},l=function(h,e,r,q){if(!r)f[h].includeIn.push(e);else if("max-"===r)for(q=a._find(e).width,e=0,r=c.length;e<r;e++)c[e].width<=q&&g(h,c[e].name);else if("min-"===r)for(q=a._find(e).width,e=0,r=c.length;e<r;e++)c[e].width>=q&&g(h,c[e].name);else if("not-"===r)for(e=
0,r=c.length;e<r;e++)-1===c[e].name.indexOf(q)&&g(h,c[e].name)};f.each(function(h,e){for(var r=h.className.split(" "),q=!1,t=0,v=r.length;t<v;t++){var B=r[t].trim();if("all"===B){q=!0;h.includeIn=b.map(c,function(w){return w.name});return}if("none"===B||h.never){q=!0;return}if("control"===B||"dtr-control"===B){q=!0;h.control=!0;return}b.each(c,function(w,D){w=D.name.split("-");var x=B.match(new RegExp("(min\\-|max\\-|not\\-)?("+w[0]+")(\\-[_a-zA-Z0-9])?"));x&&(q=!0,x[2]===w[0]&&x[3]==="-"+w[1]?l(e,
D.name,x[1],x[2]+x[3]):x[2]!==w[0]||x[3]||l(e,D.name,x[1],x[2]))})}q||(h.auto=!0)});this.s.columns=f},_controlClass:function(){if("inline"===this.c.details.type){var a=this.s.dt,c=b.inArray(!0,this.s.current);a.cells(null,function(d){return d!==c},{page:"current"}).nodes().to$().filter(".dtr-control").removeClass("dtr-control");a.cells(null,c,{page:"current"}).nodes().to$().addClass("dtr-control")}},_detailsDisplay:function(a,c){var d=this,f=this.s.dt,g=this.c.details;if(g&&!1!==g.type){var l=g.display(a,
c,function(){return g.renderer(f,a[0],d._detailsObj(a[0]))});!0!==l&&!1!==l||b(f.table().node()).triggerHandler("responsive-display.dt",[f,a,l,c])}},_detailsInit:function(){var a=this,c=this.s.dt,d=this.c.details;"inline"===d.type&&(d.target="td.dtr-control, th.dtr-control");c.on("draw.dtr",function(){a._tabIndexes()});a._tabIndexes();b(c.table().body()).on("keyup.dtr","td, th",function(g){13===g.keyCode&&b(this).data("dtr-keyboard")&&b(this).click()});var f=d.target;d="string"===typeof f?f:"td, th";
if(f!==n||null!==f)b(c.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",d,function(g){if(b(c.table().node()).hasClass("collapsed")&&-1!==b.inArray(b(this).closest("tr").get(0),c.rows().nodes().toArray())){if("number"===typeof f){var l=0>f?c.columns().eq(0).length+f:f;if(c.cell(this).index().column!==l)return}l=c.row(b(this).closest("tr"));"click"===g.type?a._detailsDisplay(l,!1):"mousedown"===g.type?b(this).css("outline","none"):"mouseup"===g.type&&b(this).trigger("blur").css("outline","")}})},
_detailsObj:function(a){var c=this,d=this.s.dt;return b.map(this.s.columns,function(f,g){if(!f.never&&!f.control)return f=d.settings()[0].aoColumns[g],{className:f.sClass,columnIndex:g,data:d.cell(a,g).render(c.c.orthogonal),hidden:d.column(g).visible()&&!c.s.current[g],rowIndex:a,title:null!==f.sTitle?f.sTitle:b(d.column(g).header()).text()}})},_find:function(a){for(var c=this.c.breakpoints,d=0,f=c.length;d<f;d++)if(c[d].name===a)return c[d]},_redrawChildren:function(){var a=this,c=this.s.dt;c.rows({page:"current"}).iterator("row",
function(d,f){c.row(f);a._detailsDisplay(c.row(f),!0)})},_resize:function(a){var c=this,d=this.s.dt,f=b(k).innerWidth(),g=this.c.breakpoints,l=g[0].name,h=this.s.columns,e,r=this.s.current.slice();for(e=g.length-1;0<=e;e--)if(f<=g[e].width){l=g[e].name;break}var q=this._columnsVisiblity(l);this.s.current=q;g=!1;e=0;for(f=h.length;e<f;e++)if(!1===q[e]&&!h[e].never&&!h[e].control&&!1===!d.column(e).visible()){g=!0;break}b(d.table().node()).toggleClass("collapsed",g);var t=!1,v=0;d.columns().eq(0).each(function(B,
w){!0===q[w]&&v++;if(a||q[w]!==r[w])t=!0,c._setColumnVis(B,q[w])});t&&(this._redrawChildren(),b(d.table().node()).trigger("responsive-resize.dt",[d,this.s.current]),0===d.page.info().recordsDisplay&&b("td",d.table().body()).eq(0).attr("colspan",v));c._controlClass()},_resizeAuto:function(){var a=this.s.dt,c=this.s.columns;if(this.c.auto&&-1!==b.inArray(!0,b.map(c,function(e){return e.auto}))){b.isEmptyObject(A)||b.each(A,function(e){e=e.split("-");y(a,1*e[0],1*e[1])});a.table().node();var d=a.table().node().cloneNode(!1),
f=b(a.table().header().cloneNode(!1)).appendTo(d),g=b(a.table().body()).clone(!1,!1).empty().appendTo(d);d.style.width="auto";var l=a.columns().header().filter(function(e){return a.column(e).visible()}).to$().clone(!1).css("display","table-cell").css("width","auto").css("min-width",0);b(g).append(b(a.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");if(g=a.table().footer()){g=b(g.cloneNode(!1)).appendTo(d);var h=a.columns().footer().filter(function(e){return a.column(e).visible()}).to$().clone(!1).css("display",
"table-cell");b("<tr/>").append(h).appendTo(g)}b("<tr/>").append(l).appendTo(f);"inline"===this.c.details.type&&b(d).addClass("dtr-inline collapsed");b(d).find("[name]").removeAttr("name");b(d).css("position","relative");d=b("<div/>").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(d);d.insertBefore(a.table().node());l.each(function(e){e=a.column.index("fromVisible",e);c[e].minWidth=this.offsetWidth||0});d.remove()}},_responsiveOnlyHidden:function(){var a=this.s.dt;return b.map(this.s.current,
function(c,d){return!1===a.column(d).visible()?!0:c})},_setColumnVis:function(a,c){var d=this.s.dt;c=c?"":"none";b(d.column(a).header()).css("display",c);b(d.column(a).footer()).css("display",c);d.column(a).nodes().to$().css("display",c);b.isEmptyObject(A)||d.cells(null,a).indexes().each(function(f){y(d,f.row,f.column)})},_tabIndexes:function(){var a=this.s.dt,c=a.cells({page:"current"}).nodes().to$(),d=a.settings()[0],f=this.c.details.target;c.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");
"number"===typeof f?a.cells(null,f,{page:"current"}).nodes().to$().attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1):("td:first-child, th:first-child"===f&&(f=">td:first-child, >th:first-child"),b(f,a.rows({page:"current"}).nodes()).attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1))}});u.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];u.display={childRow:function(a,c,d){if(c){if(b(a.node()).hasClass("parent"))return a.child(d(),
"child").show(),!0}else{if(a.child.isShown())return a.child(!1),b(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();b(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,c,d){if(!c&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),b(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();b(a.node()).addClass("parent");return!0},modal:function(a){return function(c,d,f){if(d)b("div.dtr-modal-content").empty().append(f());else{var g=function(){l.remove();
b(m).off("keypress.dtr")},l=b('<div class="dtr-modal"/>').append(b('<div class="dtr-modal-display"/>').append(b('<div class="dtr-modal-content"/>').append(f())).append(b('<div class="dtr-modal-close">&times;</div>').click(function(){g()}))).append(b('<div class="dtr-modal-background"/>').click(function(){g()})).appendTo("body");b(m).on("keyup.dtr",function(h){27===h.keyCode&&(h.stopPropagation(),g())})}a&&a.header&&b("div.dtr-modal-content").prepend("<h2>"+a.header(c)+"</h2>")}}};var A={};u.renderer=
{listHiddenNodes:function(){return function(a,c,d){var f=b('<ul data-dtr-index="'+c+'" class="dtr-details"/>'),g=!1;b.each(d,function(l,h){h.hidden&&(b("<li "+(h.className?'class="'+h.className+'"':"")+' data-dtr-index="'+h.columnIndex+'" data-dt-row="'+h.rowIndex+'" data-dt-column="'+h.columnIndex+'"><span class="dtr-title">'+h.title+"</span> </li>").append(b('<span class="dtr-data"/>').append(p(a,h.rowIndex,h.columnIndex))).appendTo(f),g=!0)});return g?f:!1}},listHidden:function(){return function(a,
c,d){return(a=b.map(d,function(f){var g=f.className?'class="'+f.className+'"':"";return f.hidden?"<li "+g+' data-dtr-index="'+f.columnIndex+'" data-dt-row="'+f.rowIndex+'" data-dt-column="'+f.columnIndex+'"><span class="dtr-title">'+f.title+'</span> <span class="dtr-data">'+f.data+"</span></li>":""}).join(""))?b('<ul data-dtr-index="'+c+'" class="dtr-details"/>').append(a):!1}},tableAll:function(a){a=b.extend({tableClass:""},a);return function(c,d,f){c=b.map(f,function(g){return"<tr "+(g.className?
'class="'+g.className+'"':"")+' data-dt-row="'+g.rowIndex+'" data-dt-column="'+g.columnIndex+'"><td>'+g.title+":</td> <td>"+g.data+"</td></tr>"}).join("");return b('<table class="'+a.tableClass+' dtr-details" width="100%"/>').append(c)}}};u.defaults={breakpoints:u.breakpoints,auto:!0,details:{display:u.display.childRow,renderer:u.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var C=b.fn.dataTable.Api;C.register("responsive()",function(){return this});C.register("responsive.index()",
function(a){a=b(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});C.register("responsive.rebuild()",function(){return this.iterator("table",function(a){a._responsive&&a._responsive._classLogic()})});C.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});C.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==b.inArray(!1,a._responsive._responsiveOnlyHidden()):
!1});C.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(a,c){return a._responsive?a._responsive._responsiveOnlyHidden()[c]:!1},1)});u.version="2.2.9";b.fn.dataTable.Responsive=u;b.fn.DataTable.Responsive=u;b(m).on("preInit.dt.dtr",function(a,c,d){"dt"===a.namespace&&(b(c.nTable).hasClass("responsive")||b(c.nTable).hasClass("dt-responsive")||c.oInit.responsive||z.defaults.responsive)&&(a=c.oInit.responsive,!1!==a&&new u(c,
b.isPlainObject(a)?a:{}))});return u});
\ No newline at end of file
var param_template = $('#templates #param'),
submit_btn = $('#templates #submit_button'),
main_content = $('#main_content');
submit_btn = $('#templates .submit_button'),
main_content = $('#main_content'),
msettings = [];
function save_module_settings() {
var form_data = new FormData(main_content.get(0));
var data = {};
var form_elts = $('.input-container'),
data = {};
for (var pair of form_data.entries()) {
let val = pair[1],
key = pair[0];
let elt = main_content.find('[name="' + key +'"]');
form_elts.each(function(i, elt){
console.log(elt)
const label = $(elt).closest('.param').find('label'),
key = label.attr('for');
data[key] = {title: elt.closest('.param').find('label')
.text(),
type: elt.get(0).type,
value: val};
if (key.length > 0 && key != 'iname') {
let value = "";
data[key] = msettings[key];
}
if ($(elt).hasClass('ql-container')) {
value = $(elt).find('.ql-editor').html().replace('<p><br></p>','')
} else {
value = $(elt).find('input').val();
}
data[key].value = value;
}
});
post_form(
'settings', {params: JSON.stringify(data)},
function(err, result) {
......@@ -39,28 +51,74 @@ function save_module_settings() {
);
}
function quillify(params) {
let quill = new Quill(params.id, {
modules: {
toolbar: [
[{ header: [1, 2, false] }],
['bold', 'italic', 'underline'],
[{ 'size': ['small', false, 'large', 'huge'] }],
[{ 'color': [] }, { 'background': [] }],
]
},
placeholder: '',
theme: 'snow'
});
quill.root.innerHTML = params.content;
}
function get_sorted_keys(obj) {
var keys = Object.keys(obj);
return keys.sort(function(a,b){return obj[a].sort_order-obj[b].sort_order});
}
function get_module_settings() {
$.ajax('settings')
.done(function(rData) {
try {
if (typeof rData.res.settings != "undefined") {
var added_elts = [];
msettings = rData.res.settings;
var added_elts = [],
quill_containers = [];
for (let key in rData.res.settings) {
get_sorted_keys(msettings).forEach(function(key){
var param = $(param_template.clone().html());
// param html include textarea and input : one of them will be removed
var input = null;
let data = rData.res.settings[key];
let data = msettings[key];
// Fill the label content
param.find('label').text(data.title)
.attr('for', key);
.attr('for', key)
if (data.type == 'textarea') {
param.find('input').remove();
// create an accordean button with label content as "text"
let accordeon_btn = $('<button>').attr('type', 'button')
.addClass('accordion')
.html(param.find('label').remove())
param.prepend(accordeon_btn);
input = param.find('textarea');
input.attr('name', key).text(data.value);
// create a div wrapper and put textarea in it
let content_div = $('<div>').attr('id', 'quill-' + key)
.css('height', '375px')
.html(input.remove())
param.find('.input-container').addClass('panel')
.addClass('ql-container')
.append(content_div);
quill_containers.push(
{
id: '#quill-' + key,
content: data.value
}
)
} else {
param.find('textarea').remove();
input = param.find('input');
input.attr('name', key).attr('value', data.value);
if (typeof data.class != "undefined") input.addClass(data.class);
}
/*
......@@ -69,12 +127,20 @@ function get_module_settings() {
console.log(param)
*/
param.appendTo(main_content);
added_elts.push(key);
}
})
if (added_elts.length > 0) {
submit_btn.appendTo(main_content);
submit_btn.prependTo(main_content);
}
submit_btn.click(save_module_settings);
quill_containers.forEach(function(params){
quillify(params);
});
// setTimeout(function() {
// }, 5000);
}
} catch (e) {
console.log(e);
......@@ -83,4 +149,18 @@ function get_module_settings() {
});
}
get_module_settings();
\ No newline at end of file
get_module_settings();
$(document).on('click', '.accordion', function(){
/* Toggle between adding and removing the "active" class,
to highlight the button that controls the panel */
this.classList.toggle("active");
/* Toggle between hiding and showing the active panel */
var panel = this.nextElementSibling;
if (panel.style.display === "block") {
panel.style.display = "none";
} else {
panel.style.display = "block";
}
});
\ No newline at end of file
/*!
* Quill Editor v1.3.6
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
.ql-container {
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
height: 100%;
margin: 0px;
position: relative;
}
.ql-container.ql-disabled .ql-tooltip {
visibility: hidden;
}
.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {
pointer-events: none;
}
.ql-clipboard {
left: -100000px;
height: 1px;
overflow-y: hidden;
position: absolute;
top: 50%;
}
.ql-clipboard p {
margin: 0;
padding: 0;
}
.ql-editor {
box-sizing: border-box;
line-height: 1.42;
height: 100%;
outline: none;
overflow-y: auto;
padding: 12px 15px;
tab-size: 4;
-moz-tab-size: 4;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.ql-editor > * {
cursor: text;
}
.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0;
padding: 0;
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol,
.ql-editor ul {
padding-left: 1.5em;
}
.ql-editor ol > li,
.ql-editor ul > li {
list-style-type: none;
}
.ql-editor ul > li::before {
content: '\2022';
}
.ql-editor ul[data-checked=true],
.ql-editor ul[data-checked=false] {
pointer-events: none;
}
.ql-editor ul[data-checked=true] > li *,
.ql-editor ul[data-checked=false] > li * {
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before,
.ql-editor ul[data-checked=false] > li::before {
color: #777;
cursor: pointer;
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before {
content: '\2611';
}
.ql-editor ul[data-checked=false] > li::before {
content: '\2610';
}
.ql-editor li::before {
display: inline-block;
white-space: nowrap;
width: 1.2em;
}
.ql-editor li:not(.ql-direction-rtl)::before {
margin-left: -1.5em;
margin-right: 0.3em;
text-align: right;
}
.ql-editor li.ql-direction-rtl::before {
margin-left: 0.3em;
margin-right: -1.5em;
}
.ql-editor ol li:not(.ql-direction-rtl),
.ql-editor ul li:not(.ql-direction-rtl) {
padding-left: 1.5em;
}
.ql-editor ol li.ql-direction-rtl,
.ql-editor ul li.ql-direction-rtl {
padding-right: 1.5em;
}
.ql-editor ol li {
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
counter-increment: list-0;
}
.ql-editor ol li:before {
content: counter(list-0, decimal) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-increment: list-1;
}
.ql-editor ol li.ql-indent-1:before {
content: counter(list-1, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-2 {
counter-increment: list-2;
}
.ql-editor ol li.ql-indent-2:before {
content: counter(list-2, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-2 {
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-3 {
counter-increment: list-3;
}
.ql-editor ol li.ql-indent-3:before {
content: counter(list-3, decimal) '. ';
}
.ql-editor ol li.ql-indent-3 {
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-4 {
counter-increment: list-4;
}
.ql-editor ol li.ql-indent-4:before {
content: counter(list-4, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-4 {
counter-reset: list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-5 {
counter-increment: list-5;
}
.ql-editor ol li.ql-indent-5:before {
content: counter(list-5, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-5 {
counter-reset: list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-6 {
counter-increment: list-6;
}
.ql-editor ol li.ql-indent-6:before {
content: counter(list-6, decimal) '. ';
}
.ql-editor ol li.ql-indent-6 {
counter-reset: list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-7 {
counter-increment: list-7;
}
.ql-editor ol li.ql-indent-7:before {
content: counter(list-7, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-7 {
counter-reset: list-8 list-9;
}
.ql-editor ol li.ql-indent-8 {
counter-increment: list-8;
}
.ql-editor ol li.ql-indent-8:before {
content: counter(list-8, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-8 {
counter-reset: list-9;
}
.ql-editor ol li.ql-indent-9 {
counter-increment: list-9;
}
.ql-editor ol li.ql-indent-9:before {
content: counter(list-9, decimal) '. ';
}
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
padding-left: 3em;
}
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
padding-left: 4.5em;
}
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 3em;
}
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 4.5em;
}
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
padding-left: 7.5em;
}
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 7.5em;
}
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
padding-left: 9em;
}
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
padding-left: 10.5em;
}
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 9em;
}
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 10.5em;
}
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
padding-left: 13.5em;
}
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 13.5em;
}
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
padding-left: 15em;
}
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
padding-left: 16.5em;
}
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 15em;
}
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 16.5em;
}
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
padding-left: 19.5em;
}
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 19.5em;
}
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
padding-left: 21em;
}
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
padding-left: 22.5em;
}
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 21em;
}
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 22.5em;
}
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
padding-left: 24em;
}
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
padding-left: 25.5em;
}
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 24em;
}
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 25.5em;
}
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
padding-left: 27em;
}
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
padding-left: 28.5em;
}
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 27em;
}
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 28.5em;
}
.ql-editor .ql-video {
display: block;
max-width: 100%;
}
.ql-editor .ql-video.ql-align-center {
margin: 0 auto;
}
.ql-editor .ql-video.ql-align-right {
margin: 0 0 0 auto;
}
.ql-editor .ql-bg-black {
background-color: #000;
}
.ql-editor .ql-bg-red {
background-color: #e60000;
}
.ql-editor .ql-bg-orange {
background-color: #f90;
}
.ql-editor .ql-bg-yellow {
background-color: #ff0;
}
.ql-editor .ql-bg-green {
background-color: #008a00;
}
.ql-editor .ql-bg-blue {
background-color: #06c;
}
.ql-editor .ql-bg-purple {
background-color: #93f;
}
.ql-editor .ql-color-white {
color: #fff;
}
.ql-editor .ql-color-red {
color: #e60000;
}
.ql-editor .ql-color-orange {
color: #f90;
}
.ql-editor .ql-color-yellow {
color: #ff0;
}
.ql-editor .ql-color-green {
color: #008a00;
}
.ql-editor .ql-color-blue {
color: #06c;
}
.ql-editor .ql-color-purple {
color: #93f;
}
.ql-editor .ql-font-serif {
font-family: Georgia, Times New Roman, serif;
}
.ql-editor .ql-font-monospace {
font-family: Monaco, Courier New, monospace;
}
.ql-editor .ql-size-small {
font-size: 0.75em;
}
.ql-editor .ql-size-large {
font-size: 1.5em;
}
.ql-editor .ql-size-huge {
font-size: 2.5em;
}
.ql-editor .ql-direction-rtl {
direction: rtl;
text-align: inherit;
}
.ql-editor .ql-align-center {
text-align: center;
}
.ql-editor .ql-align-justify {
text-align: justify;
}
.ql-editor .ql-align-right {
text-align: right;
}
.ql-editor.ql-blank::before {
color: rgba(0,0,0,0.6);
content: attr(data-placeholder);
font-style: italic;
left: 15px;
pointer-events: none;
position: absolute;
right: 15px;
}
.ql-bubble.ql-toolbar:after,
.ql-bubble .ql-toolbar:after {
clear: both;
content: '';
display: table;
}
.ql-bubble.ql-toolbar button,
.ql-bubble .ql-toolbar button {
background: none;
border: none;
cursor: pointer;
display: inline-block;
float: left;
height: 24px;
padding: 3px 5px;
width: 28px;
}
.ql-bubble.ql-toolbar button svg,
.ql-bubble .ql-toolbar button svg {
float: left;
height: 100%;
}
.ql-bubble.ql-toolbar button:active:hover,
.ql-bubble .ql-toolbar button:active:hover {
outline: none;
}
.ql-bubble.ql-toolbar input.ql-image[type=file],
.ql-bubble .ql-toolbar input.ql-image[type=file] {
display: none;
}
.ql-bubble.ql-toolbar button:hover,
.ql-bubble .ql-toolbar button:hover,
.ql-bubble.ql-toolbar button:focus,
.ql-bubble .ql-toolbar button:focus,
.ql-bubble.ql-toolbar button.ql-active,
.ql-bubble .ql-toolbar button.ql-active,
.ql-bubble.ql-toolbar .ql-picker-label:hover,
.ql-bubble .ql-toolbar .ql-picker-label:hover,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active,
.ql-bubble.ql-toolbar .ql-picker-item:hover,
.ql-bubble .ql-toolbar .ql-picker-item:hover,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected {
color: #fff;
}
.ql-bubble.ql-toolbar button:hover .ql-fill,
.ql-bubble .ql-toolbar button:hover .ql-fill,
.ql-bubble.ql-toolbar button:focus .ql-fill,
.ql-bubble .ql-toolbar button:focus .ql-fill,
.ql-bubble.ql-toolbar button.ql-active .ql-fill,
.ql-bubble .ql-toolbar button.ql-active .ql-fill,
.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
fill: #fff;
}
.ql-bubble.ql-toolbar button:hover .ql-stroke,
.ql-bubble .ql-toolbar button:hover .ql-stroke,
.ql-bubble.ql-toolbar button:focus .ql-stroke,
.ql-bubble .ql-toolbar button:focus .ql-stroke,
.ql-bubble.ql-toolbar button.ql-active .ql-stroke,
.ql-bubble .ql-toolbar button.ql-active .ql-stroke,
.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,
.ql-bubble .ql-toolbar button:hover .ql-stroke-miter,
.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,
.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,
.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,
.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,
.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
stroke: #fff;
}
@media (pointer: coarse) {
.ql-bubble.ql-toolbar button:hover:not(.ql-active),
.ql-bubble .ql-toolbar button:hover:not(.ql-active) {
color: #ccc;
}
.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,
.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,
.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,
.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {
fill: #ccc;
}
.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,
.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,
.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,
.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {
stroke: #ccc;
}
}
.ql-bubble {
box-sizing: border-box;
}
.ql-bubble * {
box-sizing: border-box;
}
.ql-bubble .ql-hidden {
display: none;
}
.ql-bubble .ql-out-bottom,
.ql-bubble .ql-out-top {
visibility: hidden;
}
.ql-bubble .ql-tooltip {
position: absolute;
transform: translateY(10px);
}
.ql-bubble .ql-tooltip a {
cursor: pointer;
text-decoration: none;
}
.ql-bubble .ql-tooltip.ql-flip {
transform: translateY(-10px);
}
.ql-bubble .ql-formats {
display: inline-block;
vertical-align: middle;
}
.ql-bubble .ql-formats:after {
clear: both;
content: '';
display: table;
}
.ql-bubble .ql-stroke {
fill: none;
stroke: #ccc;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2;
}
.ql-bubble .ql-stroke-miter {
fill: none;
stroke: #ccc;
stroke-miterlimit: 10;
stroke-width: 2;
}
.ql-bubble .ql-fill,
.ql-bubble .ql-stroke.ql-fill {
fill: #ccc;
}
.ql-bubble .ql-empty {
fill: none;
}
.ql-bubble .ql-even {
fill-rule: evenodd;
}
.ql-bubble .ql-thin,
.ql-bubble .ql-stroke.ql-thin {
stroke-width: 1;
}
.ql-bubble .ql-transparent {
opacity: 0.4;
}
.ql-bubble .ql-direction svg:last-child {
display: none;
}
.ql-bubble .ql-direction.ql-active svg:last-child {
display: inline;
}
.ql-bubble .ql-direction.ql-active svg:first-child {
display: none;
}
.ql-bubble .ql-editor h1 {
font-size: 2em;
}
.ql-bubble .ql-editor h2 {
font-size: 1.5em;
}
.ql-bubble .ql-editor h3 {
font-size: 1.17em;
}
.ql-bubble .ql-editor h4 {
font-size: 1em;
}
.ql-bubble .ql-editor h5 {
font-size: 0.83em;
}
.ql-bubble .ql-editor h6 {
font-size: 0.67em;
}
.ql-bubble .ql-editor a {
text-decoration: underline;
}
.ql-bubble .ql-editor blockquote {
border-left: 4px solid #ccc;
margin-bottom: 5px;
margin-top: 5px;
padding-left: 16px;
}
.ql-bubble .ql-editor code,
.ql-bubble .ql-editor pre {
background-color: #f0f0f0;
border-radius: 3px;
}
.ql-bubble .ql-editor pre {
white-space: pre-wrap;
margin-bottom: 5px;
margin-top: 5px;
padding: 5px 10px;
}
.ql-bubble .ql-editor code {
font-size: 85%;
padding: 2px 4px;
}
.ql-bubble .ql-editor pre.ql-syntax {
background-color: #23241f;
color: #f8f8f2;
overflow: visible;
}
.ql-bubble .ql-editor img {
max-width: 100%;
}
.ql-bubble .ql-picker {
color: #ccc;
display: inline-block;
float: left;
font-size: 14px;
font-weight: 500;
height: 24px;
position: relative;
vertical-align: middle;
}
.ql-bubble .ql-picker-label {
cursor: pointer;
display: inline-block;
height: 100%;
padding-left: 8px;
padding-right: 2px;
position: relative;
width: 100%;
}
.ql-bubble .ql-picker-label::before {
display: inline-block;
line-height: 22px;
}
.ql-bubble .ql-picker-options {
background-color: #444;
display: none;
min-width: 100%;
padding: 4px 8px;
position: absolute;
white-space: nowrap;
}
.ql-bubble .ql-picker-options .ql-picker-item {
cursor: pointer;
display: block;
padding-bottom: 5px;
padding-top: 5px;
}
.ql-bubble .ql-picker.ql-expanded .ql-picker-label {
color: #777;
z-index: 2;
}
.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill {
fill: #777;
}
.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke {
stroke: #777;
}
.ql-bubble .ql-picker.ql-expanded .ql-picker-options {
display: block;
margin-top: -1px;
top: 100%;
z-index: 1;
}
.ql-bubble .ql-color-picker,
.ql-bubble .ql-icon-picker {
width: 28px;
}
.ql-bubble .ql-color-picker .ql-picker-label,
.ql-bubble .ql-icon-picker .ql-picker-label {
padding: 2px 4px;
}
.ql-bubble .ql-color-picker .ql-picker-label svg,
.ql-bubble .ql-icon-picker .ql-picker-label svg {
right: 4px;
}
.ql-bubble .ql-icon-picker .ql-picker-options {
padding: 4px 0px;
}
.ql-bubble .ql-icon-picker .ql-picker-item {
height: 24px;
width: 24px;
padding: 2px 4px;
}
.ql-bubble .ql-color-picker .ql-picker-options {
padding: 3px 5px;
width: 152px;
}
.ql-bubble .ql-color-picker .ql-picker-item {
border: 1px solid transparent;
float: left;
height: 16px;
margin: 2px;
padding: 0px;
width: 16px;
}
.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
position: absolute;
margin-top: -9px;
right: 0;
top: 50%;
width: 18px;
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {
content: attr(data-label);
}
.ql-bubble .ql-picker.ql-header {
width: 98px;
}
.ql-bubble .ql-picker.ql-header .ql-picker-label::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item::before {
content: 'Normal';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: 'Heading 1';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: 'Heading 2';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: 'Heading 3';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: 'Heading 4';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: 'Heading 5';
}
.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: 'Heading 6';
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
font-size: 2em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
font-size: 1.5em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
font-size: 1.17em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
font-size: 1em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
font-size: 0.83em;
}
.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
font-size: 0.67em;
}
.ql-bubble .ql-picker.ql-font {
width: 108px;
}
.ql-bubble .ql-picker.ql-font .ql-picker-label::before,
.ql-bubble .ql-picker.ql-font .ql-picker-item::before {
content: 'Sans Serif';
}
.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
content: 'Serif';
}
.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
content: 'Monospace';
}
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
font-family: Georgia, Times New Roman, serif;
}
.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
font-family: Monaco, Courier New, monospace;
}
.ql-bubble .ql-picker.ql-size {
width: 98px;
}
.ql-bubble .ql-picker.ql-size .ql-picker-label::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item::before {
content: 'Normal';
}
.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
content: 'Small';
}
.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
content: 'Large';
}
.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
content: 'Huge';
}
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
font-size: 10px;
}
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
font-size: 18px;
}
.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
font-size: 32px;
}
.ql-bubble .ql-color-picker.ql-background .ql-picker-item {
background-color: #fff;
}
.ql-bubble .ql-color-picker.ql-color .ql-picker-item {
background-color: #000;
}
.ql-bubble .ql-toolbar .ql-formats {
margin: 8px 12px 8px 0px;
}
.ql-bubble .ql-toolbar .ql-formats:first-child {
margin-left: 12px;
}
.ql-bubble .ql-color-picker svg {
margin: 1px;
}
.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,
.ql-bubble .ql-color-picker .ql-picker-item:hover {
border-color: #fff;
}
.ql-bubble .ql-tooltip {
background-color: #444;
border-radius: 25px;
color: #fff;
}
.ql-bubble .ql-tooltip-arrow {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
content: " ";
display: block;
left: 50%;
margin-left: -6px;
position: absolute;
}
.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow {
border-bottom: 6px solid #444;
top: -6px;
}
.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow {
border-top: 6px solid #444;
bottom: -6px;
}
.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor {
display: block;
}
.ql-bubble .ql-tooltip.ql-editing .ql-formats {
visibility: hidden;
}
.ql-bubble .ql-tooltip-editor {
display: none;
}
.ql-bubble .ql-tooltip-editor input[type=text] {
background: transparent;
border: none;
color: #fff;
font-size: 13px;
height: 100%;
outline: none;
padding: 10px 20px;
position: absolute;
width: 100%;
}
.ql-bubble .ql-tooltip-editor a {
top: 10px;
position: absolute;
right: 20px;
}
.ql-bubble .ql-tooltip-editor a:before {
color: #ccc;
content: "\D7";
font-size: 16px;
font-weight: bold;
}
.ql-container.ql-bubble:not(.ql-disabled) a {
position: relative;
white-space: nowrap;
}
.ql-container.ql-bubble:not(.ql-disabled) a::before {
background-color: #444;
border-radius: 15px;
top: -5px;
font-size: 12px;
color: #fff;
content: attr(href);
font-weight: normal;
overflow: hidden;
padding: 5px 15px;
text-decoration: none;
z-index: 1;
}
.ql-container.ql-bubble:not(.ql-disabled) a::after {
border-top: 6px solid #444;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
top: 0;
content: " ";
height: 0;
width: 0;
}
.ql-container.ql-bubble:not(.ql-disabled) a::before,
.ql-container.ql-bubble:not(.ql-disabled) a::after {
left: 0;
margin-left: 50%;
position: absolute;
transform: translate(-50%, -100%);
transition: visibility 0s ease 200ms;
visibility: hidden;
}
.ql-container.ql-bubble:not(.ql-disabled) a:hover::before,
.ql-container.ql-bubble:not(.ql-disabled) a:hover::after {
visibility: visible;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* Quill Editor v1.3.6
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
.ql-container {
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
height: 100%;
margin: 0px;
position: relative;
}
.ql-container.ql-disabled .ql-tooltip {
visibility: hidden;
}
.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {
pointer-events: none;
}
.ql-clipboard {
left: -100000px;
height: 1px;
overflow-y: hidden;
position: absolute;
top: 50%;
}
.ql-clipboard p {
margin: 0;
padding: 0;
}
.ql-editor {
box-sizing: border-box;
line-height: 1.42;
height: 100%;
outline: none;
overflow-y: auto;
padding: 12px 15px;
tab-size: 4;
-moz-tab-size: 4;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.ql-editor > * {
cursor: text;
}
.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0;
padding: 0;
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol,
.ql-editor ul {
padding-left: 1.5em;
}
.ql-editor ol > li,
.ql-editor ul > li {
list-style-type: none;
}
.ql-editor ul > li::before {
content: '\2022';
}
.ql-editor ul[data-checked=true],
.ql-editor ul[data-checked=false] {
pointer-events: none;
}
.ql-editor ul[data-checked=true] > li *,
.ql-editor ul[data-checked=false] > li * {
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before,
.ql-editor ul[data-checked=false] > li::before {
color: #777;
cursor: pointer;
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before {
content: '\2611';
}
.ql-editor ul[data-checked=false] > li::before {
content: '\2610';
}
.ql-editor li::before {
display: inline-block;
white-space: nowrap;
width: 1.2em;
}
.ql-editor li:not(.ql-direction-rtl)::before {
margin-left: -1.5em;
margin-right: 0.3em;
text-align: right;
}
.ql-editor li.ql-direction-rtl::before {
margin-left: 0.3em;
margin-right: -1.5em;
}
.ql-editor ol li:not(.ql-direction-rtl),
.ql-editor ul li:not(.ql-direction-rtl) {
padding-left: 1.5em;
}
.ql-editor ol li.ql-direction-rtl,
.ql-editor ul li.ql-direction-rtl {
padding-right: 1.5em;
}
.ql-editor ol li {
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
counter-increment: list-0;
}
.ql-editor ol li:before {
content: counter(list-0, decimal) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-increment: list-1;
}
.ql-editor ol li.ql-indent-1:before {
content: counter(list-1, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-2 {
counter-increment: list-2;
}
.ql-editor ol li.ql-indent-2:before {
content: counter(list-2, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-2 {
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-3 {
counter-increment: list-3;
}
.ql-editor ol li.ql-indent-3:before {
content: counter(list-3, decimal) '. ';
}
.ql-editor ol li.ql-indent-3 {
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-4 {
counter-increment: list-4;
}
.ql-editor ol li.ql-indent-4:before {
content: counter(list-4, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-4 {
counter-reset: list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-5 {
counter-increment: list-5;
}
.ql-editor ol li.ql-indent-5:before {
content: counter(list-5, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-5 {
counter-reset: list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-6 {
counter-increment: list-6;
}
.ql-editor ol li.ql-indent-6:before {
content: counter(list-6, decimal) '. ';
}
.ql-editor ol li.ql-indent-6 {
counter-reset: list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-7 {
counter-increment: list-7;
}
.ql-editor ol li.ql-indent-7:before {
content: counter(list-7, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-7 {
counter-reset: list-8 list-9;
}
.ql-editor ol li.ql-indent-8 {
counter-increment: list-8;
}
.ql-editor ol li.ql-indent-8:before {
content: counter(list-8, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-8 {
counter-reset: list-9;
}
.ql-editor ol li.ql-indent-9 {
counter-increment: list-9;
}
.ql-editor ol li.ql-indent-9:before {
content: counter(list-9, decimal) '. ';
}
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
padding-left: 3em;
}
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
padding-left: 4.5em;
}
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 3em;
}
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 4.5em;
}
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
padding-left: 7.5em;
}
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 7.5em;
}
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
padding-left: 9em;
}
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
padding-left: 10.5em;
}
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 9em;
}
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 10.5em;
}
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
padding-left: 13.5em;
}
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 13.5em;
}
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
padding-left: 15em;
}
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
padding-left: 16.5em;
}
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 15em;
}
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 16.5em;
}
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
padding-left: 19.5em;
}
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 19.5em;
}
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
padding-left: 21em;
}
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
padding-left: 22.5em;
}
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 21em;
}
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 22.5em;
}
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
padding-left: 24em;
}
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
padding-left: 25.5em;
}
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 24em;
}
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 25.5em;
}
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
padding-left: 27em;
}
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
padding-left: 28.5em;
}
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 27em;
}
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 28.5em;
}
.ql-editor .ql-video {
display: block;
max-width: 100%;
}
.ql-editor .ql-video.ql-align-center {
margin: 0 auto;
}
.ql-editor .ql-video.ql-align-right {
margin: 0 0 0 auto;
}
.ql-editor .ql-bg-black {
background-color: #000;
}
.ql-editor .ql-bg-red {
background-color: #e60000;
}
.ql-editor .ql-bg-orange {
background-color: #f90;
}
.ql-editor .ql-bg-yellow {
background-color: #ff0;
}
.ql-editor .ql-bg-green {
background-color: #008a00;
}
.ql-editor .ql-bg-blue {
background-color: #06c;
}
.ql-editor .ql-bg-purple {
background-color: #93f;
}
.ql-editor .ql-color-white {
color: #fff;
}
.ql-editor .ql-color-red {
color: #e60000;
}
.ql-editor .ql-color-orange {
color: #f90;
}
.ql-editor .ql-color-yellow {
color: #ff0;
}
.ql-editor .ql-color-green {
color: #008a00;
}
.ql-editor .ql-color-blue {
color: #06c;
}
.ql-editor .ql-color-purple {
color: #93f;
}
.ql-editor .ql-font-serif {
font-family: Georgia, Times New Roman, serif;
}
.ql-editor .ql-font-monospace {
font-family: Monaco, Courier New, monospace;
}
.ql-editor .ql-size-small {
font-size: 0.75em;
}
.ql-editor .ql-size-large {
font-size: 1.5em;
}
.ql-editor .ql-size-huge {
font-size: 2.5em;
}
.ql-editor .ql-direction-rtl {
direction: rtl;
text-align: inherit;
}
.ql-editor .ql-align-center {
text-align: center;
}
.ql-editor .ql-align-justify {
text-align: justify;
}
.ql-editor .ql-align-right {
text-align: right;
}
.ql-editor.ql-blank::before {
color: rgba(0,0,0,0.6);
content: attr(data-placeholder);
font-style: italic;
left: 15px;
pointer-events: none;
position: absolute;
right: 15px;
}
.ql-snow.ql-toolbar:after,
.ql-snow .ql-toolbar:after {
clear: both;
content: '';
display: table;
}
.ql-snow.ql-toolbar button,
.ql-snow .ql-toolbar button {
background: none;
border: none;
cursor: pointer;
display: inline-block;
float: left;
height: 24px;
padding: 3px 5px;
width: 28px;
}
.ql-snow.ql-toolbar button svg,
.ql-snow .ql-toolbar button svg {
float: left;
height: 100%;
}
.ql-snow.ql-toolbar button:active:hover,
.ql-snow .ql-toolbar button:active:hover {
outline: none;
}
.ql-snow.ql-toolbar input.ql-image[type=file],
.ql-snow .ql-toolbar input.ql-image[type=file] {
display: none;
}
.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button:focus,
.ql-snow .ql-toolbar button:focus,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow .ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow .ql-toolbar .ql-picker-label.ql-active,
.ql-snow.ql-toolbar .ql-picker-item:hover,
.ql-snow .ql-toolbar .ql-picker-item:hover,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected {
color: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button:focus .ql-fill,
.ql-snow .ql-toolbar button:focus .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
fill: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button:focus .ql-stroke,
.ql-snow .ql-toolbar button:focus .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow.ql-toolbar button:hover .ql-stroke-miter,
.ql-snow .ql-toolbar button:hover .ql-stroke-miter,
.ql-snow.ql-toolbar button:focus .ql-stroke-miter,
.ql-snow .ql-toolbar button:focus .ql-stroke-miter,
.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,
.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
stroke: #06c;
}
@media (pointer: coarse) {
.ql-snow.ql-toolbar button:hover:not(.ql-active),
.ql-snow .ql-toolbar button:hover:not(.ql-active) {
color: #444;
}
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {
fill: #444;
}
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {
stroke: #444;
}
}
.ql-snow {
box-sizing: border-box;
}
.ql-snow * {
box-sizing: border-box;
}
.ql-snow .ql-hidden {
display: none;
}
.ql-snow .ql-out-bottom,
.ql-snow .ql-out-top {
visibility: hidden;
}
.ql-snow .ql-tooltip {
position: absolute;
transform: translateY(10px);
}
.ql-snow .ql-tooltip a {
cursor: pointer;
text-decoration: none;
}
.ql-snow .ql-tooltip.ql-flip {
transform: translateY(-10px);
}
.ql-snow .ql-formats {
display: inline-block;
vertical-align: middle;
}
.ql-snow .ql-formats:after {
clear: both;
content: '';
display: table;
}
.ql-snow .ql-stroke {
fill: none;
stroke: #444;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2;
}
.ql-snow .ql-stroke-miter {
fill: none;
stroke: #444;
stroke-miterlimit: 10;
stroke-width: 2;
}
.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
fill: #444;
}
.ql-snow .ql-empty {
fill: none;
}
.ql-snow .ql-even {
fill-rule: evenodd;
}
.ql-snow .ql-thin,
.ql-snow .ql-stroke.ql-thin {
stroke-width: 1;
}
.ql-snow .ql-transparent {
opacity: 0.4;
}
.ql-snow .ql-direction svg:last-child {
display: none;
}
.ql-snow .ql-direction.ql-active svg:last-child {
display: inline;
}
.ql-snow .ql-direction.ql-active svg:first-child {
display: none;
}
.ql-snow .ql-editor h1 {
font-size: 2em;
}
.ql-snow .ql-editor h2 {
font-size: 1.5em;
}
.ql-snow .ql-editor h3 {
font-size: 1.17em;
}
.ql-snow .ql-editor h4 {
font-size: 1em;
}
.ql-snow .ql-editor h5 {
font-size: 0.83em;
}
.ql-snow .ql-editor h6 {
font-size: 0.67em;
}
.ql-snow .ql-editor a {
text-decoration: underline;
}
.ql-snow .ql-editor blockquote {
border-left: 4px solid #ccc;
margin-bottom: 5px;
margin-top: 5px;
padding-left: 16px;
}
.ql-snow .ql-editor code,
.ql-snow .ql-editor pre {
background-color: #f0f0f0;
border-radius: 3px;
}
.ql-snow .ql-editor pre {
white-space: pre-wrap;
margin-bottom: 5px;
margin-top: 5px;
padding: 5px 10px;
}
.ql-snow .ql-editor code {
font-size: 85%;
padding: 2px 4px;
}
.ql-snow .ql-editor pre.ql-syntax {
background-color: #23241f;
color: #f8f8f2;
overflow: visible;
}
.ql-snow .ql-editor img {
max-width: 100%;
}
.ql-snow .ql-picker {
color: #444;
display: inline-block;
float: left;
font-size: 14px;
font-weight: 500;
height: 24px;
position: relative;
vertical-align: middle;
}
.ql-snow .ql-picker-label {
cursor: pointer;
display: inline-block;
height: 100%;
padding-left: 8px;
padding-right: 2px;
position: relative;
width: 100%;
}
.ql-snow .ql-picker-label::before {
display: inline-block;
line-height: 22px;
}
.ql-snow .ql-picker-options {
background-color: #fff;
display: none;
min-width: 100%;
padding: 4px 8px;
position: absolute;
white-space: nowrap;
}
.ql-snow .ql-picker-options .ql-picker-item {
cursor: pointer;
display: block;
padding-bottom: 5px;
padding-top: 5px;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label {
color: #ccc;
z-index: 2;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {
fill: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {
stroke: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-options {
display: block;
margin-top: -1px;
top: 100%;
z-index: 1;
}
.ql-snow .ql-color-picker,
.ql-snow .ql-icon-picker {
width: 28px;
}
.ql-snow .ql-color-picker .ql-picker-label,
.ql-snow .ql-icon-picker .ql-picker-label {
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-label svg,
.ql-snow .ql-icon-picker .ql-picker-label svg {
right: 4px;
}
.ql-snow .ql-icon-picker .ql-picker-options {
padding: 4px 0px;
}
.ql-snow .ql-icon-picker .ql-picker-item {
height: 24px;
width: 24px;
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-options {
padding: 3px 5px;
width: 152px;
}
.ql-snow .ql-color-picker .ql-picker-item {
border: 1px solid transparent;
float: left;
height: 16px;
margin: 2px;
padding: 0px;
width: 16px;
}
.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
position: absolute;
margin-top: -9px;
right: 0;
top: 50%;
width: 18px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {
content: attr(data-label);
}
.ql-snow .ql-picker.ql-header {
width: 98px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: 'Heading 1';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: 'Heading 2';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: 'Heading 3';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: 'Heading 4';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: 'Heading 5';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: 'Heading 6';
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
font-size: 2em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
font-size: 1.5em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
font-size: 1.17em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
font-size: 1em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
font-size: 0.83em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
font-size: 0.67em;
}
.ql-snow .ql-picker.ql-font {
width: 108px;
}
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: 'Sans Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
content: 'Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
content: 'Monospace';
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
font-family: Georgia, Times New Roman, serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
font-family: Monaco, Courier New, monospace;
}
.ql-snow .ql-picker.ql-size {
width: 98px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
content: 'Small';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
content: 'Large';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
content: 'Huge';
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
font-size: 10px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
font-size: 18px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
font-size: 32px;
}
.ql-snow .ql-color-picker.ql-background .ql-picker-item {
background-color: #fff;
}
.ql-snow .ql-color-picker.ql-color .ql-picker-item {
background-color: #000;
}
.ql-toolbar.ql-snow {
border: 1px solid #ccc;
box-sizing: border-box;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
padding: 8px;
}
.ql-toolbar.ql-snow .ql-formats {
margin-right: 15px;
}
.ql-toolbar.ql-snow .ql-picker-label {
border: 1px solid transparent;
}
.ql-toolbar.ql-snow .ql-picker-options {
border: 1px solid transparent;
box-shadow: rgba(0,0,0,0.2) 0 2px 8px;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {
border-color: #000;
}
.ql-toolbar.ql-snow + .ql-container.ql-snow {
border-top: 0px;
}
.ql-snow .ql-tooltip {
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0px 0px 5px #ddd;
color: #444;
padding: 5px 12px;
white-space: nowrap;
}
.ql-snow .ql-tooltip::before {
content: "Visit URL:";
line-height: 26px;
margin-right: 8px;
}
.ql-snow .ql-tooltip input[type=text] {
display: none;
border: 1px solid #ccc;
font-size: 13px;
height: 26px;
margin: 0px;
padding: 3px 5px;
width: 170px;
}
.ql-snow .ql-tooltip a.ql-preview {
display: inline-block;
max-width: 200px;
overflow-x: hidden;
text-overflow: ellipsis;
vertical-align: top;
}
.ql-snow .ql-tooltip a.ql-action::after {
border-right: 1px solid #ccc;
content: 'Edit';
margin-left: 16px;
padding-right: 8px;
}
.ql-snow .ql-tooltip a.ql-remove::before {
content: 'Remove';
margin-left: 8px;
}
.ql-snow .ql-tooltip a {
line-height: 26px;
}
.ql-snow .ql-tooltip.ql-editing a.ql-preview,
.ql-snow .ql-tooltip.ql-editing a.ql-remove {
display: none;
}
.ql-snow .ql-tooltip.ql-editing input[type=text] {
display: inline-block;
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
border-right: 0px;
content: 'Save';
padding-right: 0px;
}
.ql-snow .ql-tooltip[data-mode=link]::before {
content: "Enter link:";
}
.ql-snow .ql-tooltip[data-mode=formula]::before {
content: "Enter formula:";
}
.ql-snow .ql-tooltip[data-mode=video]::before {
content: "Enter video:";
}
.ql-snow a {
color: #06c;
}
.ql-container.ql-snow {
border: 1px solid #ccc;
}
......@@ -45,6 +45,7 @@ urlpatterns = [
url(r'^shop/', include('shop.urls')),
url(r'^shelfs/', include('shelfs.urls')),
url(r'^sales/', include('sales.urls')),
url(r'^members_space/', include('members_space.urls')),
]
try:
......
......@@ -17,13 +17,28 @@ class CagetteShift(models.Model):
self.tz = pytz.timezone("Europe/Paris")
self.o_api = OdooAPI()
def get_shift(self, id):
"""Get one shift by id"""
cond = [['id', '=', id]]
fields = ['date_begin_tz']
listService = self.o_api.search_read('shift.shift', cond, fields)
try:
return listService[0]
except Exception as e:
print(str(e))
return None
def get_data_partner(self, id):
"""Retrieve partner data useful to make decision about shift options"""
cond = [['id', '=', id]]
fields = ['display_name', 'display_std_points',
'shift_type', 'date_alert_stop', 'date_delay_stop', 'extension_ids',
'cooperative_state', 'final_standard_point', 'create_date',
'final_ftop_point', 'in_ftop_team', 'leave_ids']
'final_ftop_point', 'shift_type', 'leave_ids', 'makeups_to_do', 'barcode_base',
'street', 'street2', 'zip', 'city', 'mobile', 'phone', 'email',
'is_associated_people', 'parent_id']
partnerData = self.o_api.search_read('res.partner', cond, fields, 1)
if partnerData:
partnerData = partnerData[0]
......@@ -74,6 +89,15 @@ class CagetteShift(models.Model):
shiftData = self.o_api.search_read('shift.registration', cond, fields, order ="date_begin ASC")
return shiftData
def shift_is_makeup(self, id):
"""vérifie si une shift est un rattrapage"""
fields = ["is_makeup", "id"]
cond = [['id', '=', id]]
shiftData = self.o_api.search_read('shift.registration', cond, fields)
return shiftData[0]["is_makeup"]
def get_shift_calendar(self, id, start, end):
"""Récupère les shifts à partir de maintenant pour le calendier"""
cond = [['date_begin', '>', datetime.datetime.now().isoformat()],
......@@ -105,12 +129,14 @@ class CagetteShift(models.Model):
fields = ['stop_date', 'id', 'start_date']
return self.o_api.search_read('shift.leave', cond, fields)
def get_shift_ticket(self,idShift, in_ftop_team):
def get_shift_ticket(self,idShift, shift_type):
"""Récupérer le shift_ticket suivant le membre et flotant ou pas"""
if getattr(settings, 'USE_STANDARD_SHIFT', True) == False:
shift_type = "ftop"
fields = ['shift_ticket_ids']
cond = [['id', "=", idShift]]
listeTicket = self.o_api.search_read('shift.shift', cond, fields)
if in_ftop_team == "True":
if shift_type == "ftop":
return listeTicket[0]['shift_ticket_ids'][1]
else:
return listeTicket[0]['shift_ticket_ids'][0]
......@@ -119,11 +145,15 @@ class CagetteShift(models.Model):
"""Shift registration"""
st_r_id = False
try:
shift_type = "standard"
if data['shift_type'] == "ftop" or getattr(settings, 'USE_STANDARD_SHIFT', True) == False:
shift_type = "ftop"
fieldsDatas = { "partner_id": data['idPartner'],
"shift_id": data['idShift'],
"shift_ticket_id": self.get_shift_ticket(data['idShift'], data['in_ftop_team']),
"shift_type": "standard", # ftop
"related_shift_state": 'confirm',
"shift_ticket_id": self.get_shift_ticket(data['idShift'], data['shift_type']),
"shift_type": shift_type,
"origin": 'memberspace',
"is_makeup": data['is_makeup'],
"state": 'open'}
st_r_id = self.o_api.create('shift.registration', fieldsDatas)
......@@ -160,21 +190,23 @@ class CagetteShift(models.Model):
coop_logger.error("Reopen shift : %s", str(e))
return response
def create_delay(self, data):
"""Create a delay for a member.
A delay is 28 days from the given start_date.
def create_delay(self, data, duration=28):
"""
Create a delay for a member.
If no duration is specified, a delay is by default 28 days from the given start_date.
If the partner already has a current extension: extend it by 28 days.
If the partner already has a current extension: extend it by [duration] days.
Else, create a 28 days delay.
Args:
idPartner: int
start_date: string date at iso format (eg. "2019-11-19")
Date from which the 28 days delay is calculated
Date from which the delay end date is calculated
(optionnal) extension_beginning: string date at iso format
If specified, will be the actual starting date of the extension.
Should be inferior than start_date.
(at creation only: odoo ignores delays if today's not inside)
duration: nb of days
"""
action = 'create'
......@@ -205,7 +237,7 @@ class CagetteShift(models.Model):
# Update current extension
if action == 'update':
ext_date_stop = datetime.datetime.strptime(extension['date_stop'], '%Y-%m-%d').date()
ext_new_date_stop = (ext_date_stop + datetime.timedelta(days=28))
ext_new_date_stop = (ext_date_stop + datetime.timedelta(days=duration))
update_data = {
'date_stop': ext_new_date_stop.isoformat()
......@@ -220,14 +252,13 @@ class CagetteShift(models.Model):
for val in extension_types:
if val['name'] == 'Extension':
ext_type_id = val['id']
starting_date = datetime.datetime.strptime(data['start_date'], '%Y-%m-%d').date()
ending_date = (starting_date + datetime.timedelta(days=28))
ending_date = (starting_date + datetime.timedelta(days=duration))
if 'extension_beginning' in data:
starting_date = datetime.datetime.strptime(data['extension_beginning'], '%Y-%m-%d').date()
#TODO : bloquer si nextmonth > date_end_alert+5months ? (blocage js)
fields= {
"partner_id": data['idPartner'],
"type_id": ext_type_id,
......@@ -279,3 +310,21 @@ class CagetteShift(models.Model):
def get_test(self, odooModel, cond, fieldsDatas):
return self.o_api.search_read(odooModel, cond, fieldsDatas, limit = 1000)
def decrement_makeups_to_do(self, partner_id):
""" Decrements partners makeups to do if > 0 """
cond = [['id', '=', partner_id]]
fields = ['makeups_to_do']
makeups_to_do = self.o_api.search_read('res.partner', cond, fields)[0]["makeups_to_do"]
if makeups_to_do > 0:
makeups_to_do -= 1
f = { "makeups_to_do": makeups_to_do }
return self.o_api.update('res.partner', [partner_id], f)
else:
return "makeups already at 0"
def member_can_have_delay(self, partner_id):
""" Can a member have a delay? """
return self.o_api.execute('res.partner', 'can_have_extension', [partner_id])
\ No newline at end of file
......@@ -57,7 +57,7 @@ function loadShiftPartner(partner_id) {
$('#shift_msg').remove();
$('#partnerData').append('<div id="shift_msg"></div>');
if (dataPartner.in_ftop_team == "True" || listeShiftPartner.length > 0) {
if (dataPartner.shift_type == "ftop" || listeShiftPartner.length > 0) {
// ftop, no shift planned
if (listeShiftPartner.length == 0) {
var date = new Date(dataPartner.next_regular_shift_date);
......@@ -79,7 +79,7 @@ function loadShiftPartner(partner_id) {
// Set DOM for partner's shifts and shift message for ftops
iniListShift(listeShiftPartner, true);
if (dataPartner.in_ftop_team == "True") {
if (dataPartner.shift_type == "ftop") {
$('#shift_msg').append("<br /><strong>Je peux choisir d'autres services pour les mois à venir ou échanger un de ceux de la liste.</strong>");
}
}
......@@ -92,7 +92,7 @@ function changeShift(idOldRegister, idNewShift) {
if (is_time_to('change_shift')) {
openModal(); // loading on
tData = 'idNewShift=' + idNewShift +'&idPartner=' + dataPartner.partner_id + '&in_ftop_team=' + dataPartner.in_ftop_team + '&verif_token=' + dataPartner.verif_token;
tData = 'idNewShift=' + idNewShift +'&idPartner=' + dataPartner.partner_id + '&shift_type=' + dataPartner.shift_type + '&verif_token=' + dataPartner.verif_token;
if (idOldRegister == "") {
tUrl = '/shifts/add_shift';
} else {
......@@ -133,9 +133,15 @@ function changeShift(idOldRegister, idNewShift) {
);
}
},
error: function() {
error: function(error) {
closeModal();
alert('Une erreur est survenue. Il est néanmoins possible que la requête ait abouti, veuillez patienter quelques secondes puis vérifier vos services enregistrés.');
if (error.status === 400) {
alert(`Désolé ! Le service que vous souhaitez échanger démarre dans moins de 24h. Il n'est plus possible de l'échanger.`);
} else {
alert('Une erreur est survenue. Il est néanmoins possible que la requête ait abouti, veuillez patienter quelques secondes puis vérifier vos services enregistrés.');
}
// Refectch shifts anyway:
// in case an error rises but the registration/exchange was still succesful
setTimeout( // Due to chrome effect
......@@ -155,7 +161,7 @@ function canMakeExchange() {
var answer = false;
// Set the partner's limit date (after which he'll loose a point)
if (dataPartner.dateProlonge != "False" || dataPartner.final_standard_point < 0 || dataPartner.in_ftop_team == "True") {
if (dataPartner.dateProlonge != "False" || dataPartner.final_standard_point < 0 || dataPartner.shift_type == "ftop") {
var dateProlonge = new Date(dataPartner.dateProlonge);
var dateNextRegularShift = new Date(dataPartner.next_regular_shift_date);
......@@ -164,7 +170,7 @@ function canMakeExchange() {
// For ABCD : the limit date is end of alert
var dateEndAlert = new Date(dataPartner.date_alert_stop);
if (dataPartner.in_ftop_team == "False" && limitDate < dateEndAlert) {
if (dataPartner.shift_type == "ftop" && limitDate < dateEndAlert) {
limitDate = dateEndAlert;
}
......@@ -198,7 +204,7 @@ function canMakeExchange() {
});
// Allow exchange if points >= 0 or he already has enough services booked before the limit date
var partner_points = dataPartner.in_ftop_team == "True" ? dataPartner.final_ftop_point : dataPartner.final_standard_point;
var partner_points = dataPartner.shift_type == "ftop" ? dataPartner.final_ftop_point : dataPartner.final_standard_point;
if (partner_points >= 0 || shifts_before_limit >= 1) {
answer = true;
......@@ -210,7 +216,7 @@ function canMakeExchange() {
}
// ftop can always exchange service
if (dataPartner.in_ftop_team == "True") {
if (dataPartner.shift_type == "ftop") {
answer = true;
}
}
......@@ -224,7 +230,7 @@ Génère le message à afficher lorsque le coop doit faire un rattrapage.
Pour les volants, chaque service compte comme un rattrapage.
*/
function addMakeUpMsg() {
var partner_points = dataPartner.in_ftop_team == "True" ? dataPartner.final_ftop_point : dataPartner.final_standard_point;
var partner_points = dataPartner.shift_type == "ftop" ? dataPartner.final_ftop_point : dataPartner.final_standard_point;
let shifts_before_limit = 0;
// Calcul du nombre de rattrapages à faire
......@@ -275,7 +281,7 @@ function addMakeUpMsg() {
}
// Si le membre est un volant
if (dataPartner.in_ftop_team == "True") {
if (dataPartner.shift_type == "ftop") {
msg = "Je dois faire " + make_up_nb + " service";
if (make_up_nb > 1) msg += "s";
if (non_regular_shifts.length > 0) msg += " en plus";
......@@ -314,7 +320,7 @@ function canAddShift(date_new_shift) {
var answer = false;
// If partner is ftop (ftop = volant)
if (dataPartner["in_ftop_team"] == "True") {
if (dataPartner["shift_type"] == "ftop") {
// If points >= 0 : can register to any shift
if (dataPartner.final_ftop_point >= 0) {
answer = true;
......@@ -408,7 +414,7 @@ $(document).ready(function() {
loadShiftPartner(dataPartner.partner_id);
// Display information depending on partner's type and state
if (dataPartner.in_ftop_team == "True") {
if (dataPartner.shift_type == "ftop") {
$('div.intro div h2').text("Bienvenue dans le système de choix et d'échange de services");
$('.additionnal_intro_data').text(' ou en choisir un nouveau');
......@@ -537,7 +543,7 @@ $(document).ready(function() {
// For partners who can't add a shift as it is
if (!can_add_shift) {
// Partners who could ask for a delay
if (dataPartner.in_ftop_team == "True" || dataPartner.in_ftop_team == "False" && dateShiftNew > limitDate) {
if (dataPartner.shift_type == "ftop" || dateShiftNew > limitDate) {
// Member can ask for 6 delays, which is 24 weeks after entering alert status
// 'date_alert_stop' field is begining of alert + 4 weeks
let date_end_alert = new Date(dataPartner.date_alert_stop);
......
from outils.common_imports import *
from outils.for_view_imports import *
from shifts.models import CagetteShift
from outils.common import Verification
from shifts.models import CagetteShift
from members.models import CagetteMember
# working_state = ['up_to_date', 'alert', 'exempted', 'delay', 'suspended']
state_shift_allowed = ["up_to_date", "alert", "delay"]
tz = pytz.timezone("Europe/Paris")
def dateIsoUTC(myDate):
tDate = tz.localize(datetime.datetime.strptime(myDate, '%Y-%m-%d %H:%M:%S'))
return tDate.isoformat()
def home(request, partner_id, hashed_date):
import hashlib
cs = CagetteShift()
......@@ -106,6 +98,8 @@ def get_list_shift_calendar(request, partner_id):
cs = CagetteShift()
registerPartner = cs.get_shift_partner(partner_id)
use_new_members_space = getattr(settings, 'USE_NEW_MEMBERS_SPACE', False)
listRegisterPartner = []
for v in registerPartner:
listRegisterPartner.append(v['id'])
......@@ -117,35 +111,55 @@ def get_list_shift_calendar(request, partner_id):
events = []
for value in listService:
events.append(value)
if value['shift_type_id'][0] == 1:
if value['shift_type_id'][0] == 1 or getattr(settings, 'USE_STANDARD_SHIFT', True) is False:
l = set(value['registration_ids']) & set(listRegisterPartner)
# if (int(value['seats_reserved']) == int(value['seats_max']) and len(l) > 0 ) or (int(value['seats_reserved']) < int(value['seats_max'])):
if (int(value['seats_available']) > 0 or len(l) > 0 ):
event = {}
event["id"] = value['id']
smax = int(value['seats_available']) + int(value['seats_reserved'])
company_code = getattr(settings, 'COMPANY_CODE', '')
title_prefix = ''
if len(value['address_id']) == 2 and ',' in value['address_id'][1]:
title_prefix = str(value['address_id'][1]).split(",")[1] + " -- "
if company_code != "lacagette" and len(value['address_id']) == 2 and ',' in value['address_id'][1]:
title_prefix = str(value['address_id'][1]).split(",")[1] + " --"
elif company_code == "lacagette":
title_prefix = " - "
event["title"] = title_prefix + str(value['seats_reserved']) + "/" + str(smax)
event["start"] = dateIsoUTC(value['date_begin_tz'])
event["end"] = dateIsoUTC(value['date_begin_tz'])
datetime_object = datetime.datetime.strptime(value['date_end_tz'], "%Y-%m-%d %H:%M:%S") - datetime.timedelta(minutes=15)
event["end"] = dateIsoUTC(datetime_object.strftime("%Y-%m-%d %H:%M:%S"))
if len(l) > 0:
event["className"] = "shift_booked"
if use_new_members_space is True:
event["classNames"] = ["shift_booked"]
else:
event["className"] = "shift_booked"
event["changed"] = False
# elif int(value['seats_reserved']) == int(value['seats_max']):
# event["className"] = "shift_full"
# event["changed"] = False
elif int(value['seats_reserved']) == 0:
event["className"] = "shift_empty"
if use_new_members_space is True:
event["classNames"] = ["shift_empty"]
else:
event["className"] = "shift_empty"
event["changed"] = True
elif _is_middled_filled_considered(value['seats_reserved'], smax) is True:
event["className"] = "shift_less_alf"
if use_new_members_space is True:
event["classNames"] = ["shift_less_alf"]
else:
event["className"] = "shift_less_alf"
event["changed"] = True
else:
event["className"] = "shift_other"
if use_new_members_space is True:
event["classNames"] = ["shift_other"]
else:
event["className"] = "shift_other"
event["changed"] = True
event["registration_ids"] = value['registration_ids']
......@@ -157,9 +171,14 @@ def get_list_shift_calendar(request, partner_id):
def get_list_shift_partner(request, partner_id):
cs = CagetteShift()
shiftData = cs.get_shift_partner(partner_id)
empty_data = False
for value in shiftData:
value['date_begin'] = value['date_begin'] + "Z"
value['date_end'] = value['date_end'] + "Z"
if "Services des comités" in value['shift_id'][1]:
empty_data = True
if empty_data is True:
shiftData = []
return JsonResponse(shiftData, safe=False)
def change_shift(request):
......@@ -170,7 +189,26 @@ def change_shift(request):
if 'idNewShift' in request.POST and 'idOldShift' in request.POST:
idOldShift = request.POST['idOldShift']
data = {"idPartner": int(request.POST['idPartner']), "idShift":int(request.POST['idNewShift']), "in_ftop_team":request.POST['in_ftop_team']}
listRegister = [int(request.POST['idRegister'])]
data = {
"idPartner": int(request.POST['idPartner']),
"idShift": int(request.POST['idNewShift']),
"shift_type": request.POST['shift_type'],
"is_makeup": cs.shift_is_makeup(listRegister[0])
}
should_block_service_exchange = getattr(settings, 'BLOCK_SERVICE_EXCHANGE_24H_BEFORE', False)
if should_block_service_exchange:
# Block change if old shift is to happen in less than 24 hours
now = datetime.datetime.now(tz)
old_shift = cs.get_shift(idOldShift)
day_before_old_shift_date_start = tz.localize(datetime.datetime.strptime(old_shift['date_begin_tz'], '%Y-%m-%d %H:%M:%S') - datetime.timedelta(hours=24))
if now > day_before_old_shift_date_start:
response = {'msg': "Old service in less than 24hours."}
return JsonResponse(response, status=400)
st_r_id = False
#Insertion du nouveau shift
try:
......@@ -179,7 +217,8 @@ def change_shift(request):
coop_logger.error("Change shift : %s, %s", str(e), str(data))
if st_r_id:
listRegister = [int(request.POST['idRegister'])]
# Annul l'ancien shift
# Annule l'ancien shift
response = cs.cancel_shift(listRegister)
response = {'result': True}
......@@ -199,18 +238,37 @@ def add_shift(request):
cs = CagetteShift()
if 'idNewShift' in request.POST and 'idPartner' in request.POST:
data = {"idPartner": int(request.POST['idPartner']), "idShift":int(request.POST['idNewShift']), "in_ftop_team":request.POST['in_ftop_team']}
data = {
"idPartner": int(request.POST['idPartner']),
"idShift":int(request.POST['idNewShift']),
"shift_type":request.POST['shift_type'],
"is_makeup":True
}
#Insertion du nouveau shift
st_r_id = False
try:
st_r_id = cs.set_shift(data)
except Exception as e:
coop_logger.error("Add shift : %s, %s", str(e), str(data))
if st_r_id:
response = {'result': True}
else:
response = {'result': False}
# decrement makeups_to_do
res_decrement = False
try:
res_decrement = cs.decrement_makeups_to_do(int(request.POST['idPartner']))
except Exception as e:
coop_logger.error("Decrement makeups to do : %s, %s", str(e), str(data))
if res_decrement:
response["decrement_makeups"] = res_decrement
else:
response["decrement_makeups"] = False
else:
response = {'result': False}
return JsonResponse(response)
......@@ -223,22 +281,60 @@ def request_delay(request):
if 'verif_token' in request.POST:
if Verification.verif_token(request.POST.get('verif_token'), int(request.POST.get('idPartner'))) is True:
cs = CagetteShift()
partner_id = int(request.POST['idPartner'])
use_new_members_space = getattr(settings, 'USE_NEW_MEMBERS_SPACE', False)
if use_new_members_space is True:
member_can_have_delay = cs.member_can_have_delay(int(request.POST.get('idPartner')))
if member_can_have_delay is False:
res = { 'message' : 'delays limit reached'}
return JsonResponse(res, status=403)
data = {
"idPartner": int(request.POST['idPartner']),
"idPartner": partner_id,
"start_date" : request.POST['start_date']
}
if ('extension_beginning' in request.POST):
data['extension_beginning'] = request.POST['extension_beginning']
duration = 28
if ('duration' in request.POST):
duration = int(request.POST['duration'])
response = {'result': False}
try:
new_id = cs.create_delay(data)
new_id = cs.create_delay(data, duration)
if (new_id):
try:
cm = CagetteMember(partner_id)
# Add 0 pt to counter so odoo updates member status
data = {
'name': "Forcer l'entrée en délai",
'shift_id': False,
'type': "standard",
'partner_id': partner_id,
'point_qty': 0
}
cm.update_member_points(data)
data = {
'name': "Forcer l'entrée en délai",
'shift_id': False,
'type': "ftop",
'partner_id': partner_id,
'point_qty': 0
}
cm.update_member_points(data)
except Exception as e:
print(str(e))
response = {'result': True}
else:
coop_logger.error("request delay : %s, %s", str(new_id), str(data))
return HttpResponseServerError()
except Exception as e:
coop_logger.error("request delay : %s, %s", str(e), str(data))
return HttpResponseServerError()
return JsonResponse(response)
......
......@@ -66,9 +66,12 @@
{% block content %}{% endblock %}
{% csrf_token %}
<br class="mtop25" />
{% if app_env != "prod" %}
<footer>
Lit et écrit sur : {{odoo}}
</footer>
{% endif %}
</body>
</html>
{% extends "base.html" %}
{% load static %}
{% block additionnal_css %}
<link rel="stylesheet" href="{% static 'css/datatables/datatables.min.css' %}">
<link rel="stylesheet" href="{% static 'css/members_admin.css' %}">
<link rel="stylesheet" href="{% static 'jquery-ui-1.12.1/jquery-ui.min.css' %}">
{% endblock %}
{% block additionnal_scripts %}
<script type="text/javascript" src="{% static 'jquery-ui-1.12.1/jquery-ui.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/datatables/datatables.min.js' %}"></script>
{% endblock %}
{% block content %}
<div class="page_body">
<div class="login_area">
{% include "common/conn_admin.html" %}
</div>
<div class="header txtcenter">
<h1>Bureau des membres</h1>
</div>
<div class="page_content">
<section class="tabs autogrid">
<div class="button tab active" id="tab_makeups"><h5>Rattrapages</h5></div>
</section>
<div id="tab_makeups_content" class="tab_content">
<div id="table_top_area">
<h3>Liste des membres devant effectuer un rattrapage</h3>
<div class="table_grouped_action">
<button type="button" class="btn--primary" id="decrement_selected_members_makeups">
-1 rattrapage pour les membres sélectionnés
</button>
</div>
</div>
<div class="table_area">
<table id="makeups_members_table" class="display" cellspacing="0" width="100%"></table>
</div>
<div id="add_members_area">
<div id="add_members_form_area">
<h4>Ou, ajouter un rattrapage à un.e membre</h4>
<form id="search_member_form" action="javascript:;" method="post">
<input type="text" id="search_member_input" value="" placeholder="Nom ou numéro du coop..." required>
<button type="submit" class="btn--primary" id="search_member_button">Recherche</button>
</form>
</div>
<div class="search_member_results_area" style="display:none;">
<div class="search_results_text">
<p><i>Choisissez parmi les membres trouvés :</i></p>
</div>
<div class="search_member_results"></div>
</div>
</div>
</div>
</div>
<div id="templates" style="display:none;"></div>
</div>
<script src='{% static "js/all_common.js" %}?v='></script>
<script src='{% static "js/members_admin.js" %}?v='></script>
{% endblock %}
......@@ -8,7 +8,7 @@
<script type="text/javascript">
// Prevent back page
// Add actual page to history
history.pushState(null, null, location.pathname)
history.pushState(null, null, location.pathname);
// Register back button click
window.onpopstate = function (e) {
......@@ -16,12 +16,17 @@
e.preventDefault()
// Add actual page to history again
history.pushState(null, null, location.pathname)
}
};
window.late_mode = {% if LATE_MODE %}true{% else %}false{% endif %};
{% if committees_shift_id %}
window.committees_shift_id = {{committees_shift_id}};
{% endif %}
</script>
<script src="{% static "js/webcam.min.js" %}">
</script>
<script src="{% static "js/JsBarcode.all.min.js" %}">
</script>
<script type="text/javascript" src="{% static 'js/notify.min.js' %}?v="></script>
<script defer src="{% static "fontawesome/js/fontawesome-all.js" %}"></script>
{% endblock %}
......@@ -183,6 +188,9 @@
<h1 class="col-6 txtcenter">Bon service !</h1>
<section class="col-6 txtcenter">
<span class="member_name"></span><br />
{% if ENTRANCE_VALIDATE_PRESENCE_MESSAGE != '' %}
{{ENTRANCE_VALIDATE_PRESENCE_MESSAGE|safe}}
{% else %}
Votre présence est bien enregistrée ! <br />
<div class="compteur">
Votre compteur est dorénavant à <span class="points"></span> point(s).<br />
......@@ -195,6 +203,7 @@
</div>
</div>
Votre prochain service <span class="service_verb">est prévu</span> le <span class="next_shift"></span>
{% endif %}
</section>
<div class="col-2"></div>
<a class="btn col-2" data-next="first_page">Coopérateur suivant</a>
......
......@@ -20,6 +20,8 @@
{% if open_on_sunday %}
let open_on_sunday = true
{% endif %}
let manage_ftop = {% if show_ftop_button %}true{% else %}false{% endif %};
</script>
{% endblock %}
{% block content %}
......
......@@ -12,7 +12,7 @@
<script type="text/javascript">
var type = 2;
var context = 'validation';
let manage_ftop = {% if show_ftop_button %}true{% else %}false{% endif %};
</script>
{% endblock %}
{% block content %}
......
......@@ -4,9 +4,11 @@
</div>
<div class="col-1 lat_menu">
<button class="flex-container--column highlighted" data-select="{{mag_place_string}}">Magasin</button>
{% if show_ftop_button %}
ou ...
<br />
<button class="flex-container--column" data-select="Volant">Volant</button>
{% endif %}
<div class="info"></div>
</div>
<div class="col-5 main_content">
......
......@@ -17,6 +17,7 @@
history.pushState(null, null, location.pathname)
}
var coop = {{coop|safe}};
let manage_ftop = {% if show_ftop_button %}true{% else %}false{% endif %};
</script>
{% endblock %}
{% block content %}
......
<div id="faqBDM" class=" mt-3">
<div class="page_title txtcenter">
<h1>
Problèmes et Demandes
</h1>
</div>
<div class="tiles_container">
<div class="tile full_width_tile">
<div class="tile_content">
<div class="block">
<div class="faq_intro_texts">
<p>Je rencontre un problème ou j'ai une demande concernant mon statut de membre :</p>
<ul>
<li>
Je clique sur l'onglet qui correspond à ma demande puis je remplis le formulaire adéquat.
</li>
<li>
Un·e coopérateur·rice du Bureau Des Membres répondra à ma demande dès que possible.
</li>
</ul>
<div class="info_slots_shifts">
<p><i class="fas fa-exclamation-circle"></i> Créneau/service c'est quoi la différence?</p>
<p>Un créneau, c'est une plage récurrente, par exemple, tous les jeudi de semaine A de 13h30 à 16h30.</p>
<p>Un service, c'est une plage horaire en particulier, par exemple le jeudi 28 novembre de 13h30 à 16h30.</p>
</div>
</div>
<div class="param">
<button type="button" class="accordion btn_faq">
<span class="full_width">000 Gestion de mon créneau: réinscription, changement, désinscription temporaire (absence de moyenne ou longue durée)</span>
</button>
<div class="input-container panel">
<div class="grp_text">
<h3><b>Créneau/service c'est quoi la différence?</b></h3>
<p>
Un créneau, c'est une plage récurrente, par exemple, tous les jeudi de semaine A de 13h30 à 16h30.<br/>
Un service, c'est une plage horaire en particulier, par exemple le jeudi 28 novembre de 13h30 à 16h30.
</p>
</div>
<div class="grp_text">
<h3><b>Se réinscrire à un créneau:</b></h3>
<p>
Si tu es désinscrit.e parce que tu as manqué des services sans faire tes rattrapages il faut te réinscrire à un créneau. Il te faudra tout de même faire tes rattrapages avant d'être à jour de tes services.<br/>
<b>ATTENTION:</b> si tu es en binôme c'est avec le nom du.de la titulaire qu'il faut remplir le formulaire.
</p>
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="unsuscribe_form_link_btn"
>
Réinscription à un créneau
</a>
</div>
</div>
<div class="grp_text">
<h3><b>Changer de créneau:</b></h3>
<p>
Si ton créneau ne te convient plus tu peux demander à le changer.<br/>
<b>ATTENTION:</b> si tu es en binôme c'est avec le nom du.de la titulaire qu'il faut remplir le formulaire.
</p>
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="change_template_form_link_btn"
>
Changement de créneau
</a>
</div>
</div>
<div class="grp_text">
<h3><b>Se désinscrire de son créneau:</b></h3>
<p>
- Si tu as prévu de t'absenter de Montpellier ou que tu vas rencontrer une période durant laquelle tu ne pourras pas faire tes services tu peux te désinscrire de ton créneau. A ton retour il te faudra remplir le formulaire "réinscription à un créneau".<br/>
- Si tu ne souhaites plus participer à la coopérative mais que tu ne souhaites pas démissionner tout de suite, notamment car tu souhaites attendre que la part sociale prenne de la valeur pour te faire rembourser, tu dois te désinscrire de ton créneau. Au moment où tu souhaiteras démissionner il faudra remplir le formulaire du même nom. Tu ne pourras plus faire tes courses à la Cagette.<br/>
<b>ATTENTION:</b> si tu es en binôme et que l'autre personne souhaite continuer à participer il faut remplir le formulaire "se désolidariser de son binôme". Si tu es la personne titulaire du binôme l'autre personne devra remplir le formulaire "se réinscrire à un créneau".
</p>
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="template_unsubscribe_form_link_btn"
>
Se désinscrire de son créneau
</a>
</div>
</div>
</div>
<button type="button" class="accordion btn_faq">
<span class="full_width" >001 Gestion de mes services: échanger son service, arrivé.e en retard à son service, demande de congés maladie ou parental</span>
</button>
<div class="input-container panel">
<div class="grp_text">
<h3><b>Créneau/service c'est quoi la différence?</b></h3>
<p>
Un créneau, c'est une plage récurrente, par exemple, tous les jeudi de semaine A de 13h30 à 16h30.<br/>
Un service, c'est une plage horaire en particulier, par exemple le jeudi 28 novembre de 13h30 à 16h30.
</p>
</div>
<div class="grp_text">
<h3><b>Échanger son service:</b></h3>
<p>
Si tu ne peux pas venir effectuer ton service à la date prévue il te faut l'échanger sur ton espace membre.<br/>
<b>ATTENTION:</b> si tu es en binôme c'est via l'espace membre du titulaire du binôme qu'il faut le faire.
</p>
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
type="button"
class="btn--primary faq_link_button"
id="shift_exchange_btn"
>
Échange de services
</a>
</div>
</div>
<div class="grp_text">
<h3><b>Demande de congé maladie ou parental</b></h3>
<p><b>
- Si tu t'absentes sur une période de 4 semaines autre que pour une raison de santé ou parentale il t'es demandé de déplacer ton service.<br/>
- Si tu t'absentes plus il te faut se désinscrire de ton créneau puis, à ton retour te réinscrire à un créneau . Pendant cette période de désinscription tu ne dois pas faire de service et tu ne peux pas pas faire tes courses.
</p></b>
<p></b></p>
</div>
<div class="grp_text">
<b><h3>Les congés maladie:</h3></b>
Les congés maladie peuvent être pris en cas d’impossibilité physique de réaliser son service pendant une longue durée qui prend en compte<b> minimum 2 services</b>. Si ton impossibilité est d'un mois il t'es demandé de déplacer ton service.<br />
En cas de rhume nous encourageons les coops à simplement déplacer leur service depuis l’espace membre. La coop a besoin de la participation de chacun.e !<br />
<b>ATTENTION:</b> Compte tenu de la facilité offerte par le statut de binôme, les personnes formant un binôme ne pourront pas<br />
bénéficier de congés maladie. Il sera alors possible de se désolidariser de son binôme en remplissant le formulaire adéquat sur l’espace membre afin d’en bénéficier.<br />
</div>
<div class="grp_text"><h3><b>Les congés parentaux</b></h3>
Lors de la naissance d’un enfant, les coops peuvent continuer de faire leur courses sans faire de services pendant 12 mois.<br />
Si les deux parents font partie de la coopérative, ils peuvent se partager leurs 12 mois comme il l’entendent. Il peuvent prendre par exemple 6 mois chacun.e en même temps ou 8 mois pour l'un.e puis 4 mois pour l'autre.<br />
<br />
Particularités: si les deux parents forment un binôme, i.elles ont alors accès à 6 mois de congé parental simultanément. S’ielles souhaitent répartir le congé différement il faut alors qu’ielles se débinomisent. Si l’un.e des deux parents est binôme avec un.e personne qui n’est pas l’autre parent, ielle doit se débinomiser pour bénéficier du congé parental.<br />
<br />
</div>
<div class="grp_text"><h3><b>L'exemption</b></h3>
Si ton état de santé ne te permet pas ou plus de faire tes services et que cette situation ne va pas évoluer ou si tu as 80 ans il est possible de demander une exemption. Cela te permet de ne pas être dans l'obligation de faire tes services tout en pouvant faire tes courses. Cette exemption n'a pas de date de fin, c'est pour cela qu'elle est a demandée dans des cas précis. Aucun justificatif médical n'est demandé, nous nous basons sur la confiance.<br /><br/>
Quelque soit ta demande de congés merci de remplir le formulaire ci dessous:<br />
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="sick_leave_form_link_btn"
>
Demande de congés
</a>
</div>
</div>
</div>
<button type="button" class="accordion btn_faq">
<span class="full_width">002 Mon Statut : Je suis en statut "Rattrapage" ou désinscrit.e et je ne peux pas faire mes courses</span>
</button>
<div class="input-container panel">
<div class="grp_text">
<h2><b>Dans quel cas ?</b></h2>
Tu es en statut "Rattrapage" si tu as raté un service.<br />
Tu es désinscrit.e après avoir raté trois services d’affilée sans les rattraper. Tu es désinscrit.e de ton créneau afin d'y libérer une place.<br />
Attention, le binôme est un cas particulier où une des deux personnes est la titulaire et l'autre la suppléante dont le statut est "désinscrit.e".<br />
</div>
<div class="grp_text">
<img src="/static/img/diagramme_etat_statut_cooperateurs.png" />
<h3><b>Que faire ?
</b></h3>
<h4>Si tu es en statut "Rattrapage" :</h4>
Tu as raté un service et que tu ne t'es pas inscrit à un rattrapage. Tu n'as plus le droit de faire tes courses. Il faut t'inscrire au rattrapage sur ton espace membre, tu as 6 mois l'effectué. Quand tu seras inscrit à ton rattrapage tu seras en statut "délais" et tu pourras de nouveau faire tes courses.<br />
Pour choisir tes rattrapages, clique sur le bouton ci-dessous.<br />
<div class="faq_link_button_area">
<a
href="echange-de-services"
type="button"
class="btn--primary faq_link_button"
>
Je sélectionne mes rattrapages
</a>
</div>
</div>
<div class="grp_text">
<h4>Si tu es désinscrit.e :</h4>
Tu as raté trois services d’affilée sans les rattraper ou n'a pas effectué tes rattrapages auxquels tu était inscrit.<br/>
Tu es désinscrit.e de ton créneau afin d'y libérer une place.<br/><br/>
Dans ce cas là, tu ne peux plus rien faire, ni t’inscrire à un rattrapage ni faire tes courses. il faut te réinscrire sur un créneau.<br/><br/>
Pour te réinscrire, il faut remplir le formulaire "Se réinscrire sur un créneau" et attendre qu'il soit traité. Dès que tu es réinscrit sur un créneau, n'oublie pas de t'inscrire à tes deux rattrapages.<br/>
</div>
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="unsuscribe_form_link_btn2"
>
Réinscription à un créneau
</a>
</div>
<div class="grp_text">
Attention, le binôme est un cas particulier où une des deux personnes est la titulaire et l'autre la suppléante dont le statut est "désinscrit.e".<br/><br/>
Si tu ne comprends pas pourquoi tu es désinscrit.e ou suspendu.e, tu peux le signaler au bureau des membres pour qu'il règle ton problème.<br/>
N'hésite pas à renseigner un maximum d'information sur ta situation pour nous aider à régler ton problème : <br />
</div>
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="request_form_link_btn2"
>
Faire une demande au BDM
</a>
</div>
</div>
<button type="button" class="accordion btn_faq">
<span class="full_width" >003 Mon binôme: créer un binôme, se désolidariser de son binôme, changer de binôme</span>
</button>
<div class="input-container panel">
<div class="grp_text">
<h3><b>Créer un binôme</b></h3>
Afin de faciliter l’intégration de personnes qui ont des difficultés à rejoindre la Cagette et par mesure de solidarité : Chaque coopérateur·rice peut rattacher un·e autre coopérateur·rice. <br />
Cependant, La Cagette a besoin de forces vives pour pouvoir fonctionner correctement et il est nécessaire qu'un maximum de personnes soient présentes sur les créneaux. <h4><b>C'est pourquoi ce statut de binôme, qui doit rester exceptionnel, est réservé à des personnes qui rencontrent de grandes difficultés organisationnelles dans leur quotidien.</b></h4> Ces difficultés sont à évaluer par la personne concernée. Par exemple : les mères ou les pères célibataires avec enfants, les personnes ayant une charge de travail et /ou des conditions particulières de travail, les aidants, les personnes rencontrant des problèmes de santé... Ce statut est transitoire selon l’évolution des conditions de vie de la personne concernée.
<b>Comprendre le contexte du binôme : Titulaire du créneau et suppléant</b><br />
La procédure de création de binôme concerne deux membres, le titulaire et le suppléant.<br />
<b>Le titulaire </b>est le coopérateur qui va devenir responsable du binôme. Il est responsable de la réalisation des services. Par exemple, si le titulaire n’est pas à jour de ses services, les deux membres du binôme ne pourront plus faire leurs courses. C’est le titulaire qui doit faire la demande de binôme. C'est à partir de son espace membre que les services sont gérés.<br />
<b>Le suppléant</b> est la personne qui va se rattacher au compte du titulaire. Elle n’aura pas d’obligation de faire un service et pourra faire ses courses. Son statut est &quot;désinscrit&quot;, c'est normal. Lorsqu'ielle vient faire un service c'est au nom du de la titulaire du binôme. En revanche, lors du passage en caisse chaque membre du binôme doit donner son propre nom.<br />
Le titulaire et le suppléant peuvent s’organiser comme ils l’entendent pour remplir les obligations du titulaire. Ils peuvent faire un service sur deux ou se répartir l’année en deux semestres, ou bien encore, le titulaire peut faire tous les services et le suppléant aucun. Peu importe, ça les regarde.<br />
<b>Il existe 3 conditions pour créer un binôme :</b><br />
Les deux coopérateur.trice.s doivent justifier que leur situation nécessite un binôme.<br />
Les deux coopérateur.trice.s doivent avoir fait au moins 4 créneaux avant de pouvoir former un binôme,<br />
Les deux coopérateur.trice.s doivent être “à jour” pour former un binôme. Si l’un des membres n’est pas à jour, ses points négatifs peuvent être transférés à l’autre membre. Ainsi, une personne qui a 2 points d’avance peut rattacher à son compte une personne qui a -2 points à son compteur.<br />
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="associated_subscribe_form_link_btn"
>
Création de binôme
</a>
</div>
</div>
<div class="grp_text">
<h3><b>Se désolidariser de son binôme</b></h3>
Si pour quelconque raison l&quot;une des deux personnes composant le binôme souhaite le désolidarisé il faut remplir le formulaire qui suit. Par défaut nous inscrirons la personne suppléante sur le même créneau que la personne titulaire. Si cela ne lui convient pas elle devra demander à changer de créneau.<br />
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="associated_unsubscribe_form_link_btn"
>
Ce désolidariser de binôme
</a>
</div>
</div>
<div class="grp_text">
<h3><b>Changer de binôme</b></h3>
Si l'un.e des deux personne composant le binôme souhaite changer de binôme il faut faire les deux demandes l'une après l'autre.
</div>
</div>
<button type="button" class="accordion btn_faq">
<span class="full_width" >005 Je veux que mes enfants puissent faire les courses à ma place</span>
</button>
<div class="input-container panel">
<div class="grp_text">
<h3><b>Dans quel cas ?</b></h3>
Les coops peuvent créer un compte de &quot;mineur rattaché&quot; à leurs enfants pour leur permettre d’aller faire les commissions.<br />
<h3></b>Comment faire ?</b></h3>
Rien de plus simple ! <br />
Il suffit de remplir ce formulaire<br />
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="underage_subscribe_form_link_btn"
>
Cr&eacute;er un compte mineur rattach&eacute;
</a>
</div>
Le Bureau des Membres traitera la demande dès que possible ! <br />
Merci et bonne journée !
</div>
</div>
<button type="button" class="accordion btn_faq">
<span class="full_width" >006 Je veux changer d'adresse mail</span>
</button>
<div class="input-container panel">
<div class="grp_text">
<h3><b>Dans quel cas ?</b></h3>
Il arrive qu’au moment de l’inscription, une adresse mail erronée soit saisie. <br />
Il se peut aussi qu’un membre change d’adresse mail.<br />
Or l'adresse mail est utilisée comme identifiant pour se connecter à notre espace membre. <br />
<h3><b>Comment faire ?</b></h2>
C’est très simple ! <br />
Il suffit de remplir ce formulaire<br />
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="change_email_form_link_btn"
>
Changer d'adresse mail
</a>
</div>
Le Bureau des Membres traitera la demande dès que possible ! <br />
Merci et bonne journée !
</div>
</div>
<button type="button" class="accordion btn_faq">
<span class="full_width" >007 Je veux quitter la coopérative</span>
</button>
<div class="input-container panel">
<div class="grp_text">
<h3><b>Dans quel cas ?</b></h3>
Les membres de La Cagette peuvent quitter la coopérative à tout moment, quel que soit le motif.<br />
En ce qui concerne tes parts sociales, tu peux en demander le remboursement. Par défaut, si tu démissionnes et que tu ne fais pas de demande de remboursement, le montant de tes parts sociales sera considéré comme un don à la Cagette. <br />
Cas particulier : <br />
Si tu as acheté plus de 10 parts sociales de la Cagette, tu peux demander le remboursement de tes parts sociales au-delà de 10, tout en restant coopérateur.rice. Pour cela, tu n’as qu’à remplir le formulaire de demande de remboursement ci-dessous.<br />
<br/><br>
<h3><b>Modalités de remboursement</b></h3>
<br>
<h3>Délais de remboursement</h3>
Ta demande de remboursement sera traitée lors de l’Assemblée Générale Ordinaire (AGO) qui statuera sur les comptes de l’exercice comptable au cours duquel ta demande a été faite (soit 4 à 5 mois après le 30 juin qui suit la demande). Après l'assemblée générale ordinaire annuelle, La Cagette pourra procéder au remboursement des anciens associés par virement. Toutefois certaines conditions particulières peuvent différer ce remboursement :<br />
Si le capital de la coopérative a baissé de manière significative au point de mettre en danger la trésorerie de l’entreprise et son fonctionnement dans les mois à venir, l’AGO peut différer le remboursement à l’année suivante en maintenant la valeur de remboursement qu’elle vient de définir. Ce report pourrait se répéter 4 fois selon la situation financière de l’entreprise. Le remboursement doit quoi qu’il en soit intervenir dans un délai de maximum 5 ans à compter de la date de la demande.<br />
<br>
<h3>Valeur de remboursement des parts sociales</h3>
La valeur nominale (d’émission) des parts sociales est fixe dans le temps (10€ la part), mais la valeur de remboursement des parts sociales, elle, varie en fonction des résultats économiques de l’entreprise. La Cagette étant une coopérative à but non lucratif, la valeur de la part ne pourra jamais excéder 10€, mais elle peut être moindre :<br />
La valeur de la part dépend du résultat cumulé de la coopérative depuis sa création. Pour ouvrir le supermarché, nous avons réalisé de gros investissements. Aujourd'hui encore, bien que nos résultats aient été positifs en 2019 et 2020, le résultat net cumulé de la coopérative est négatif. En 2018, nous avons remboursé à une valeur de 5,02€ la part. Puis en 2019, à 7,58€ et en 2020, à 7,82€. Nous espérons pouvoir bientôt pouvoir atteindre une valeur de remboursement de 10€ la part, mais nous ne pouvons pas nous engager sur une année ou une date précise. La valeur de remboursement ne peut pas être connue avant la clôture de l’exercice le 30 juin.<br />
La procédure de calcul de la valeur de remboursement de la part sociale à la Cagette résulte de l’application stricte de l’article 8 de la Loi de 1947 sur les sociétés coopératives. <br />
Si tu souhaites attendre que la part sociale prenne de la valeur avant de te faire rembourser, il faut geler ton compte et demander ta démission et ton remboursement plus tard. Pour cela il suffit de te désinscrire de ton créneau en remplissant le formulaire &quot;Se désinscrire de son créneau&quot; dans la rubrique “Gestion de mon créneau”. Tu resteras membre de la cagette, ton statut sera “désinscrit”, tu n’auras pas de service à faire, et ne pourras plus faire tes courses).<br />
<br><br>
<h3><b>Comment faire ?</b></h3>
C'est très simple : remplis ce formulaire pour obtenir par mail les documents de démission et/ou de demande de remboursement à nous renvoyer.<br />
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="coop_unsubscribe_form_link_btn"
>
Se D&eacute;sinscrire de la coop&eacute;rative
</a>
</div>
</div>
</div>
<button type="button" class="accordion btn_faq">
<span class="full_width" >009 Faire une autre demande au BDM: seulement si les autres formulaires ne correspondent pas à ma demande </span>
</button>
<div class="input-container panel">
<div class="grp_text">
<br>
Nous avons créé des formulaires spécifiques pour la plupart des problèmes rencontrés par les membres. Changer de créneau, créer un binôme, ajouter un produit à la gamme, partir en vacances... <br />
Cela dit, nous en découvrons de nouveaux tous les jours.<br />
Si tu n'as pas su quel formulaire remplir, tu es au bon endroit. <br />
Vas-y dit nous tout !<br />
<div class="faq_link_button_area">
<a
href="javascript:void(0);"
target="_blank"
type="button"
class="btn--primary faq_link_button"
id="request_form_link_btn"
>
Faire une demande au BDM
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% load static %}
{% block additionnal_css %}
<link rel="stylesheet" href="{% static 'css/members-space-header.css' %}">
{% endblock %}
{% block content %}
<div class="topnav" id="topnav">
<a href="javascript:void(0);" class="nav_item active" id="nav_home">Espace Membre</a>
<a href="javascript:void(0);" class="nav_item" id="nav_my_info">Mes Infos</a>
<a href="javascript:void(0);" class="nav_item" id="nav_my_shifts">Mes Services</a>
<a href="javascript:void(0);" class="nav_item" id="nav_shifts_exchange">Échange de services</a>
<a href="javascript:void(0);" class="nav_item" id="nav_faq">Problèmes et Demandes</a>
<a
href="javascript:void(0);"
target="_blank"
class="nav_item"
id="nav_calendar"
>
Calendrier ABCD
</a>
{# Disconnection button must have this id (logic in all_common.js) #}
<a href="javascript:void(0);" id="deconnect">Déconnexion</a>
<a href="javascript:void(0);" class="icon" onclick="toggleHeader()">
<i class="fa fa-bars"></i>
</a>
</div>
<div class="pairs_info">
<span>
<i class="fas fa-exclamation-circle"></i> Je suis en binôme.
Toutes les actions (changement de service, choix d'un rattrapage...)
ne sont faisables que sur l'espace membre du <b>binôme principal</b>.
Dans mon espace membre, les infos ne sont visibles qu'en lecture seule.
</span>
</div>
<script type="text/javascript" src="{% static 'js/members-space-header.js' %}"></script>
{% endblock %}
<div id="home">
<div class="page_title txtcenter">
<h1>Espace Membre</h1>
</div>
<div class="tiles_container">
<div class="tile high_tile" id="home_tile_my_info">
<div class="tile_title">
<i class="fas fa-user tile_icon"></i>
<span class="member_info member_name"></span>
</div>
<div class="tile_content">
{# <p><span class="member_info member_name"></span></p> #}
<p class="member_status_text_container">Mon statut : <span class="member_info member_status"></span></p>
<div class="delay_date_stop_container">
( jusqu'au <span class="delay_date_stop"></span> )
</div>
<div id="member_status_action">
<a href="#" target="_blank" class="btn--warning unsuscribed_form_link">
J'accède au formulaire
</a>
<button type="button" class="btn--danger choose_makeups">
Je sélectionne mes rattrapages
</button>
</div>
<div class="member_shift_name_area">
<span>Mon créneau : </span>
<span class="member_shift_name member_info"></span>
</div>
<div class="member_coop_number_area">
<span>Mon numéro de coop : </span>
<span class="member_coop_number member_info"></span>
</div>
<div class="member_associated_partner_area">
<span>Je suis en binôme avec : </span>
<span class="member_associated_partner member_info"></span>
</div>
<div id="see_more_info">
<button type="button", class="btn btn--primary home_link_button" id="see_more_info_link">
Accéder à mes infos et comprendre mon statut
</button>
</div>
</div>
</div>
<div class="tile high_tile" id="home_tile_my_services">
<div class="tile_title">
<i class="fas fa-clipboard tile_icon"></i>
Mes Services
</div>
<div class="tile_content">
<h3>Services à venir</h3>
<div id="home_incoming_services">
<i class="fas fa-spinner fa-spin fa-lg"></i>
</div>
<div id="go_to_shift_history_area">
<button type="button", class="btn btn--primary" id="home_go_to_shift_history">
Accéder à mon historique
</button>
</div>
</div>
</div>
<div class="tile small_tile" id="home_tile_services_exchange">
<div class="tile_title">
<i class="fas fa-exchange-alt tile_icon"></i>
Échange de services
</div>
<div class="tile_content">
<div>
Un empêchement ? J'anticipe et déplace mes services jusqu'à 24h avant leur début !
</div>
<div class="home_link_button_area">
<button type="button" class="btn--primary home_link_button" id="go_to_shifts_calendar">
Accéder au calendrier d'échange de services
</button>
</div>
</div>
</div>
<div class="tile small_tile" id="home_tile_help">
<div class="tile_title">
<i class="fas fa-question-circle tile_icon"></i>
J'ai une demande
</div>
<div class="tile_content">
<div class="home_link_button_area">
<a
href="javascript:void(0);"
class="btn--primary home_link_button"
id="go_to_forms"
>
Accéder aux formulaires
</a>
</div>
</div>
</div>
<div class="tile small_tile" id="home_tile_shop_info">
<div class="tile_title">
<i class="fas fa-newspaper tile_icon"></i>
Informations magasins
</div>
<div id="shop_info_content">
<div class="shop_info_item shop_opening_hours">
<div class="shop_info_item_content">
<div class="opening_hours_title">
Horaires du magasin :
</div>
<div class="opening_hours_content">
{{shop_opening_hours|safe}}
</div>
</div>
</div>
<div class="shop_info_item shop_message">
<div class="shop_info_item_content shop_message_content">
{{msg_accueil|safe}}
</div>
</div>
</div>
</div>
</div>
</div>
{% extends "base.html" %}
{% load static %}
{% block additionnal_css %}
<link rel="stylesheet" href="{% static 'css/datatables/jquery.dataTables.css' %}">
<link rel="stylesheet" href="{% static 'css/datatables/responsive.dataTables.min.css' %}">
<link rel="stylesheet" href="{% static 'fullcalendar-5.9.0/lib/main.min.css' %}">
<link rel="stylesheet" href="{% static "css/members-space.css" %}?v=">
<link rel="stylesheet" href="{% static "css/members-space-my-shifts.css" %}?v=">
<link rel="stylesheet" href="{% static "css/members-space-faq.css" %}?v=">
<link rel="stylesheet" href="{% static "css/members-space-my-info.css" %}?v=">
<link rel="stylesheet" href="{% static "css/members-space-shifts-exchange.css" %}?v=">
{% endblock %}
{% block additionnal_scripts %}
<script type="text/javascript" src="{% static 'js/datatables/jquery.dataTables.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/datatables/dataTables.responsive.min.js' %}"></script>
<script type="text/javascript" src="{% static 'fullcalendar-5.9.0/lib/main.min.js' %}"></script>
<script type="text/javascript" src="{% static 'fullcalendar-5.9.0/lib/locales/fr.js' %}"></script>
{% endblock %}
{% block content %}
<div class="page_body">
{% include "members_space/header.html" %}
<div id="main_content" class="page_content">
</div>
<div id="templates" style="display:none;">
<div id="shift_line_template">
<div class="shift_line">
<i class="fas fa-chevron-right shift_line_chevron"></i>
<span class="shift_line_date"></span> - <span class="shift_line_time"></span>
</div>
</div>
<div id="selectable_shift_line_template">
<div class="selectable_shift_line btn--primary">
<input type="checkbox" class="checkbox">
<div class="selectable_shift_line_text">
<span class="shift_line_date"></span> - <span class="shift_line_time"></span>
</div>
</div>
</div>
<div id="modal_shift_exchange_template">
<div>Je suis sur le point d'échanger le service du : </div>
<div><span class="date_old_shift"></span> à <span class="time_old_shift"></span></div>
<div>par celui du : </div>
<div><span class="date_new_shift"></span> à <span class="time_new_shift"></span></div>
</div>
<div id="modal_add_shift_template">
<div>Je suis sur le point de m'inscrire au service du : <span class="date_new_shift"></span> à <span class="time_new_shift"></span></div>
</div>
<div id="calendar_explaination_template">
<h4>Légende du calendrier</h4>
<a class="example-event fc-daygrid-event fc-daygrid-block-event fc-h-event fc-event fc-event-start fc-event-end fc-event-future shift_booked"><div class="fc-event-main"><div class="fc-event-main-frame"><div class="fc-event-time">06:00</div><div class="fc-event-title-container"><div class="fc-event-title fc-sticky">&nbsp;- 9/12</div></div></div></div></a>
<p>Un service colorié en noir : je suis déjà inscrit.e à ce service.</p>
<a class="example-event fc-daygrid-event fc-daygrid-block-event fc-h-event fc-event fc-event-start fc-event-end fc-event-future shift_less_alf"><div class="fc-event-main"><div class="fc-event-main-frame"><div class="fc-event-time">10:45</div><div class="fc-event-title-container"><div class="fc-event-title fc-sticky">&nbsp;- 3/12</div></div></div></div></a>
<p>Un service colorié en bleu : je peux m'inscrire à ce service.</p>
<p>3/12 <i class="arrow_explanation_numbers fas fa-arrow-right"></i> il y a déjà 3 places réservées à ce service sur 12 disponibles.
<b>Plus le chiffre de gauche est petit, plus on a besoin de coopérateurs.rices à ce service !</b></p>
</div>
<div id="cant_have_delay_msg_template">
<h3>Bonjour, tu avais 6 mois pour rattraper tes services manqués et il semblerait que tu ne l'aies pas fait.</h3>
<h3>Tu ne peux plus sélectionner de rattrapages sur ton espace membre pour le moment,
merci de contacter le bureau des membres pour résoudre ce problème en remplissant ce formulaire : </h3>
</div>
<div id="comite_template">
<h3>Vous êtes inscrit.e dans le service des comités, vous n'avez pas accès au calendrier d'échange des services car vous vous organisez directement avec le responsable du comité. Si vous avez des rattrapages à réaliser, merci de contacter le responsable du comité qui vous aidera à planifier les rattrapages ou trouver une solution</h3>
</div>
</div>
</div>
<script>
var app_env = '{{app_env}}';
var forms_link = '{{forms_link}}';
var unsuscribe_form_link = '{{unsuscribe_form_link}}';
var request_form_link = '{{request_form_link}}';
var late_service_form_link = '{{late_service_form_link}}';
var change_template_form_link = '{{change_template_form_link}}';
var associated_subscribe_form_link = '{{associated_subscribe_form_link}}';
var associated_unsubscribe_form_link = '{{associated_unsubscribe_form_link}}';
var template_unsubscribe_form_link = '{{template_unsubscribe_form_link}}';
var change_email_form_link = '{{change_email_form_link}}';
var coop_unsubscribe_form_link = '{{coop_unsubscribe_form_link}}';
var sick_leave_form_link = '{{sick_leave_form_link}}';
var underage_subscribe_form_link = '{{underage_subscribe_form_link}}';
var helper_subscribe_form_link = '{{helper_subscribe_form_link}}';
var helper_unsubscribe_form_link = '{{helper_unsubscribe_form_link}}';
var covid_form_link = '{{covid_form_link}}';
var covid_end_form_link = '{{covid_end_form_link}}';
var member_cant_have_delay_form_link = '{{member_cant_have_delay_form_link}}';
var abcd_calendar_link = "{{abcd_calendar_link}}"
var days_to_hide = "{{daysToHide}}"
var partner_data = {
"partner_id":"{{partnerData.id}}",
"name":"{{partnerData.display_name}}",
"shift_type":"{{partnerData.shift_type}}",
"date_delay_stop":"{{partnerData.date_delay_stop}}",
"cooperative_state":"{{partnerData.cooperative_state}}",
"regular_shift_name":"{{partnerData.regular_shift_name}}",
"can_have_delay" : "{{partnerData.can_have_delay}}",
"makeups_to_do" : "{{partnerData.makeups_to_do}}",
"barcode_base" : "{{partnerData.barcode_base}}",
"street" : "{{partnerData.street}}",
"street2" : "{{partnerData.street2}}",
"zip" : "{{partnerData.zip}}",
"city" : "{{partnerData.city}}",
"mobile" : "{{partnerData.mobile}}",
"phone" : "{{partnerData.phone}}",
"email" : "{{partnerData.email}}",
"is_associated_people" : "{{partnerData.is_associated_people}}",
"parent_id" : "{{partnerData.parent_id}}",
"parent_name" : "{{partnerData.parent_name}}",
"associated_partner_id" : "{{partnerData.associated_partner_id}}",
"associated_partner_name" : "{{partnerData.associated_partner_name}}",
"verif_token" : "{{partnerData.verif_token}}",
"leave_stop_date": "{{partnerData.leave_stop_date}}",
"comite": "{{partnerData.comite}}"
}
</script>
<script src="{% static "js/all_common.js" %}?v="></script>
<script src="{% static "js/members-space-home.js" %}?v="></script>
<script src="{% static "js/members-space-my-info.js" %}?v="></script>
<script src="{% static "js/members-space-my-shifts.js" %}?v="></script>
<script src="{% static "js/members-space-faq.js" %}?v="></script>
<script src="{% static "js/members-space-shifts-exchange.js" %}?v="></script>
<script src="{% static "js/members-space.js" %}?v="></script>
{% endblock %}
<div id="my_info">
<div class="page_title txtcenter">
<h1>Mes Infos</h1>
</div>
<div class="tiles_container">
<div class="tile full_width_tile" id="my_info_area">
<div class="tile_title">
<i class="fas fa-user tile_icon"></i>
<span class="member_info member_name"></span>
</div>
<div class="tile_content" id="my_info_content">
<div class="my_info_line">
<div class="my_info_line_left">
Statut
</div>
<div class="my_info_line_right">
<p class="member_info member_status"></p>
<div class="delay_date_stop_container">
( jusqu'au <span class="delay_date_stop"></span> )
</div>
<div id="member_status_action">
<a href="#" target="_blank" class="btn--warning unsuscribed_form_link">
J'accède au formulaire
</a>
<button type="button" class="btn--danger choose_makeups">
Je sélectionne mes rattrapages
</button>
</div>
</div>
</div>
<div class="my_info_line">
<div class="my_info_line_left">
Créneau
</div>
<div class="my_info_line_right member_shift_name_area">
<span class="member_shift_name member_info"></span>
</div>
</div>
<div class="my_info_line">
<div class="my_info_line_left">
Numéro de coop
</div>
<div class="my_info_line_right member_coop_number_area">
<span class="member_coop_number member_info"></span>
</div>
</div>
<div class="my_info_line member_email_line">
<div class="my_info_line_left">
Email
</div>
<div class="my_info_line_right member_email_area">
<span class="member_email member_info"></span>
</div>
</div>
<div class="my_info_line member_address_line">
<div class="my_info_line_left">
Adresse
</div>
<div class="my_info_line_right member_address_area" id="edit_address_value">
<span class="member_address member_info"></span><br>
<span id="edit_address"><i class="fas fa-edit tile_icon edit-btn" ></i></span>
</div>
<div class="my_info_line_right member_address_area1" id="edit_address_form">
<input type="text" name="street_form" id="street_form" placeholder="Rue"> <br>
<!-- <input type="text" name="street2_form" id="street2_form" placeholder="Complément"> -->
<input type="text" name="zip_form" id="zip_form" placeholder="Code postal"> <br>
<input type="text" name="city_form" id="city_form" placeholder="Ville"> <br>
<span id="cancel_edit_address"><i class="fas fa-times tile_icon edit-btn"></i></span>
<span id="save_edit_address"><i class="fas fa-check tile_icon edit-btn"></i></span>
</div>
</div>
<div class="my_info_line member_phone_line">
<div class="my_info_line_left">
Téléphone
</div>
<div class="my_info_line_right member_phone_area" id="edit_phone_value">
<span class="member_phone member_info"></span>
<span class="member_mobile member_info"></span>
<span id="edit_phone"><i class="fas fa-edit tile_icon edit-btn" ></i></span>
</div>
<div class="my_info_line_right member_phone_area1" id="edit_phone_form">
<input type="text" name="phone" id="phone_form" placeholder="Tel fixe"> <br>
<input type="text" name="mobile" id="mobile_form" placeholder="Tel mobile"><br>
<span id="cancel_edit_phone"><i class="fas fa-times tile_icon edit-btn"></i></span>
<span id="save_edit_phone"><i class="fas fa-check tile_icon edit-btn"></i></span>
</div>
</div>
</div>
</div>
<div class="tile full_width_tile" id="attached_info_area">
<div class="tile_title">
Mon Binôme
</div>
<div class="tile_content" id="attached_info">
<div class="my_info_line attached_partner_name_line">
<div class="my_info_line_left">
Je suis en binôme avec :
</div>
<div class="my_info_line_right attached_partner_name_area">
<span class="attached_partner_name member_info"></span>
</div>
</div>
</div>
</div>
<div class="tile full_width_tile">
<div class="tile_title">
Comprendre mon statut
</div>
<div class="my_info_line_middle">
Il existe différents statuts à La Cagette donnant ou non le droit de faire ses courses. Voici un schéma explicatif expliquant le passage d'un statut à un autre. Pour toute question relative aux statuts, rendez&#x2011;vous dans la rubrique <a href='faq'>Problèmes&nbsp;&&nbsp;Demandes</a>.
</div>
<a href="/static/img/diagramme_etat_statut_cooperateurs.png" target=”_blank”>
<img class="status_info_image" src="/static/img/diagramme_etat_statut_cooperateurs.png" alt="diagramme_etat_statut_cooperateurs"/>
</a>
</div>
</div>
</div>
<div id="my_shifts">
<div class="page_title txtcenter">
<h1>Mes Services</h1>
</div>
<div class="tiles_container">
<div class="tile full_width_tile" id="incoming_shifts_area">
<div class="tile_title">
À venir
</div>
<div class="loading-incoming-shifts">
<i class="fas fa-spinner fa-spin fa-lg"></i>
</div>
<div class="tile_content" id="incoming_shifts"></div>
</div>
<div class="tile full_width_tile" id="history_area">
<div class="tile_title">
Historique de mes services
</div>
<div class="loading-history">
<i class="fas fa-spinner fa-spin fa-lg"></i>
</div>
<div class="tile_content" id="history">
<div class="history_table_area">
<table id="history_table" class="display" cellspacing="0" width="100%"></table>
</div>
<div class="more_history">
<div class="loading-more-history">
<i class="fas fa-spinner fa-spin fa-lg"></i>
</div>
<button
type="button"
class="btn btn--primary more_history_button"
title="Charger plus d'éléments..."
>
<i class="fas fa-plus more_history_icon"></i>
</button>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="txtcenter message_error">
<h1 class="no_content_title">Oh zut, cette page ne fonctionne pas&nbsp;!</h1>
<p>
Cette erreur est probablement due aux raisons suivantes :<br> URL mal tapée, erreur de copier-coller, lien brisé, contenu déplacé ou contenu supprimé.
</p>
<p>
Vous pouvez retrouver votre chemin depuis votre <a href='home'>Espace&nbsp;Membre</a>.
</p>
</div>
<div id="shifts_exchange">
<div id="unsuscribed_content" class="shifts_exchange_page_content">
<h3>Je suis désinscrit.e, je dois remplir un formulaire pour qu'on me réinscrive à un créneau.</h3>
<a href="#" target="_blank" class="btn--warning unsuscribed_form_link">
J'accède au formulaire
</a>
</div>
<div id="suspended_cant_have_delay_content" class="shifts_exchange_page_content">
<div class="suspended_cant_have_delay_msg"></div>
<a href="#" target="_blank" class="btn--warning cant_have_delay_form_link">
J'accède au formulaire
</a>
</div>
<div id="comite_content" class="shifts_exchange_page_content">
<div class="comite_content_msg"></div>
</div>
<div id="suspended_content" class="shifts_exchange_page_content">
<h3>
J'ai <span class="makeups_nb"></span> rattrapage(s) à effectuer, je dois le(s) sélectionner pour pouvoir refaire mes courses.
J'ai 6 mois de délai pour le(s) rattraper.
</h3>
<h3>
Si besoin, je peux contacter le Bureau des membres via la rubrique "J'ai une demande" pour expliquer ma situation.
</h3>
<button type="button" class="btn--danger select_makeups">
Je sélectionne mes rattrapages
</button>
</div>
<div id="shifts_exchange_content" class="shifts_exchange_page_content">
<div id="need_to_select_makeups_message">
<span class="select_makeups_message_block">
<i class="fas fa-exclamation-triangle makeups_warning"></i>
J'ai <span class="makeups_nb"></span> rattrapage(s) à faire. </span>
<span class="select_makeups_message_block">Je dois les sélectionner dans le calendrier. </span>
<span class="select_makeups_message_block">Je ne peux pas échanger de service tant que je n'ai pas choisi mes rattrapages. </span>
</div>
<div id="calendar_top_info">
<div id="partner_shifts_list">
<h4>Liste de mes services :</h4>
<div class="loading-incoming-shifts">
<i class="fas fa-spinner fa-spin fa-lg"></i>
</div>
<div id="shifts_list"></div>
</div>
<div id="calendar_explaination_area"></div>
<button id="calendar_explaination_button" class="btn--success">Légende du calendrier</button>
</div>
<div class="loading-calendar">
<i class="fas fa-spinner fa-spin fa-2x"></i>
</div>
<div id="calendar"></div>
</div>
</div>
......@@ -3,6 +3,11 @@
{% block additionnal_css %}
<link rel="stylesheet" href="{% static 'css/module_config.css' %}">
<link rel="stylesheet" href="{% static 'quill/quill.snow.css' %}">
{% endblock %}
{% block additionnal_scripts %}
<script type="text/javascript" src="{% static 'quill/quill.min.js' %}"></script>
{% endblock %}
......@@ -20,11 +25,13 @@
<div id="param">
<div class="param">
<label for="iname"></label>
<input type="text" name="iname" value="" />
<textarea name="iname" value="" cols="255" rows="10"></textarea>
<div class="input-container">
<input type="text" name="iname" value="" />
<textarea name="iname" value="" cols="255" rows="10"></textarea>
</div>
</div>
</div>
<div id="submit_button">
<div class="submit_button">
<div>
<button type="button" class="btn--primary">Enregistrer</button>
</div>
......@@ -36,4 +43,4 @@
<script src='{% static "js/all_common.js" %}?v='></script>
<script src='{% static "js/module_config.js" %}?v='></script>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -16,7 +16,7 @@
dataPartner = {
"partner_id":"{{partnerData.id}}",
"name":"{{partnerData.display_name}}",
"in_ftop_team":"{{partnerData.in_ftop_team}}",
"shift_type":"{{partnerData.shift_type}}",
"final_standard_point":"{{partnerData.final_standard_point}}",
"final_ftop_point":"{{partnerData.final_ftop_point}}",
"dateProlonge":"{{partnerData.date_delay_stop}}",
......
......@@ -35,4 +35,19 @@
}
</script>
</div>
<script>
// For the members space, reset url to home when accessing connect page
const is_member_space = '{{is_member_space}}';
if (is_member_space === "True") {
var app_env = '{{app_env}}';
var base_location = (app_env === 'dev') ? '/members_space/' : '/';
if (window.location.pathname === base_location) {
history.pushState({}, '', 'home');
} else {
history.replaceState({}, '', 'home');
}
}
</script>
{% endblock %}
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