Skip to content

Commit

Permalink
FEAT: #83 - data is live now
Browse files Browse the repository at this point in the history
  • Loading branch information
IkramKhan-DevOps committed Dec 5, 2023
1 parent f354f0f commit ada580a
Show file tree
Hide file tree
Showing 96 changed files with 497 additions and 1,881 deletions.
719 changes: 87 additions & 632 deletions src/administration/admins/templates/admins/schedule.html

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions src/administration/admins/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_query_over_request(_request):
shifts_queryset = ShiftDay.objects.filter(
Q(shift_date__month=datetime.date.today().month, shift_date__year=datetime.date.today().year)
).values(
'id', 'shift_id', 'shift__start_time', 'shift__end_time', 'shift_date',
'id', 'shift_id', 'shift_date', 'shift_end_date',
'shift__employee', 'shift__employee_id', 'shift__site__name'
)

Expand Down Expand Up @@ -102,6 +102,10 @@ def get_query_over_request(_request):
# CALL: get month, year and query over it
shifts, current_month, current_year, employees = get_query_over_request(self.request)

for x in shifts:
print(x['shift__employee'])
break

# CONTEXT: data
context['shifts'] = shifts
context['shift_form'] = ShiftForm()
Expand All @@ -111,6 +115,13 @@ def get_query_over_request(_request):
context['current_year'] = current_year
context['current_date'] = datetime.date.today()

# CONTEXT: month and days
current_month_start_date = datetime.date(int(current_year), int(current_month), 1)
total_days_in_this_month = monthrange(int(current_year), int(current_month))[1]
current_month_end_date = datetime.date(int(current_year), int(current_month), total_days_in_this_month)
context['current_month_start_date'] = current_month_start_date
context['current_month_end_date'] = current_month_end_date

return context


Expand Down Expand Up @@ -169,7 +180,7 @@ class DashboardView(TemplateView):

def get_context_data(self, **kwargs):

notify.send(self.request.user, recipient=self.request.user, verb='You have been invited to join the platform')
# notify.send(self.request.user, recipient=self.request.user, verb='You have been invited to join the platform')

from django.db.models import Count
from datetime import datetime, timedelta
Expand Down
Binary file added static/byp/css/fonts/Roboto-Bold.woff
Binary file not shown.
Binary file added static/byp/css/fonts/Roboto-Bold.woff2
Binary file not shown.
Binary file added static/byp/css/fonts/Roboto-Light.woff
Binary file not shown.
Binary file added static/byp/css/fonts/Roboto-Light.woff2
Binary file not shown.
Binary file added static/byp/css/fonts/Roboto-Medium.woff
Binary file not shown.
Binary file added static/byp/css/fonts/Roboto-Medium.woff2
Binary file not shown.
Binary file added static/byp/css/fonts/Roboto-Regular.woff
Binary file not shown.
Binary file added static/byp/css/fonts/Roboto-Regular.woff2
Binary file not shown.
Binary file added static/byp/css/fonts/fa-brands-400.ttf
Binary file not shown.
Binary file added static/byp/css/fonts/fa-brands-400.woff2
Binary file not shown.
Binary file added static/byp/css/fonts/fa-regular-400.ttf
Binary file not shown.
Binary file added static/byp/css/fonts/fa-regular-400.woff2
Binary file not shown.
Binary file added static/byp/css/fonts/fa-solid-900.ttf
Binary file not shown.
Binary file added static/byp/css/fonts/fa-solid-900.woff2
Binary file not shown.
Binary file added static/byp/css/fonts/fa-v4compatibility.ttf
Binary file not shown.
Binary file added static/byp/css/fonts/fa-v4compatibility.woff2
Binary file not shown.
14 changes: 14 additions & 0 deletions static/byp/css/scheduler.classic-dark.css

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions static/byp/css/scheduler.classic-light.css

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions static/byp/css/scheduler.classic.css

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions static/byp/css/scheduler.material.css

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions static/byp/css/scheduler.stockholm.css

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions static/byp/js/data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
columsM = [
/*
--------------------------------------------------------------------------
text: Name of Column
field: Name of Person
--------------------------------------------------------------------------
* */

{ text : 'Name', field : 'name', width : 130 },
]

resourcesM = [
/*
--------------------------------------------------------------------------
ID = person ID
Name = person Name
--------------------------------------------------------------------------
* */

{id: 1, name: 'John', cls : 'unavailable' },
{id: 2, name: 'smith'},
{id: 3, name: 'Jessica'},
{id: 4, name: 'Mark'},
{id: 5, name: 'Lisa'},
{id: 6, name: 'Peter'},
{id: 7, name: 'Mary'},
{id: 8, name: 'Linda'},
{id: 9, name: 'David'},
{id: 10, name: 'Kevin'},
]

eventsM = [
/*
--------------------------------------------------------------------------
ID = event ID
ResourceId = from the above resourcesM (id)
startDate and Date = from [2023-11-01 - 2023-11-30 (must be in future)]
Name = Some Job name
--------------------------------------------------------------------------
*/

{id: 1, resourceId: 1, name: 'Manager', startDate: '2023-11-16', endDate: '2023-11-23', eventColor : 'red'},
{id: 2, resourceId: 2, name: 'Flight Attendent', startDate: '2023-11-11', endDate: '2023-11-22'},
{id: 3, resourceId: 3, name: 'Sales', startDate: '2023-11-12', endDate: '2023-11-18'},
{id: 4, resourceId: 4, name: 'Marketing', startDate: '2023-11-14', endDate: '2023-11-20'},
{id: 5, resourceId: 5, name: 'Security', startDate: '2023-11-16', endDate: '2023-11-27'},
{id: 6, resourceId: 6, name: 'Chief', startDate: '2023-11-18', endDate: '2023-11-21'},
{id: 7, resourceId: 7, name: 'Security', startDate: '2023-11-20', endDate: '2023-11-28'},
{id: 8, resourceId: 8, name: 'Bar tender', startDate: '2023-11-22', endDate: '2023-11-27'},
{id: 9, resourceId: 9, name: 'Sales', startDate: '2023-11-01', endDate: '2023-11-12'},
{id: 10, resourceId: 10, name: 'Manager', startDate: '2023-11-02', endDate: '2023-11-08'},
{id: 11, resourceId: 1, name: 'Driver', startDate: '2023-11-28', endDate: '2023-11-30'},
{id: 12, resourceId: 2, name: 'Flight Attendent', startDate: '2023-11-23', endDate: '2023-12-26'},
{id: 13, resourceId: 3, name: 'Sales', startDate: '2023-12-02', endDate: '2023-12-09'},
{id: 14, resourceId: 4, name: 'Marketing', startDate: '2023-12-04', endDate: '2023-12-14'},
{id: 15, resourceId: 5, name: 'Security', startDate: '2023-12-06', endDate: '2023-12-10'},
{id: 16, resourceId: 6, name: 'Chief', startDate: '2023-12-08', endDate: '2023-12-19'},
]
Empty file added static/byp/js/data.json
Empty file.
15 changes: 15 additions & 0 deletions static/byp/js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "@bryntum/scheduler",
"version": "5.5.4",
"description": "Bryntum Scheduler JavaScript component",
"author": {
"name": "Bryntum",
"url": "https://bryntum.com",
"email": "info@bryntum.com"
},
"homepage": "https://bryntum.com",
"license": "Commercial",
"devDependencies": {},
"main": "scheduler.module.js",
"types": "./scheduler.d.ts"
}
63 changes: 63 additions & 0 deletions static/byp/js/scheduler.lwc.module.js

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions static/byp/js/scheduler.module.js

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions static/byp/js/scheduler.umd.js

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions static/byp/js/scheduler.wc.module.js

Large diffs are not rendered by default.

Binary file removed static/mobi/css/icons_mobiscroll.ttf
Binary file not shown.
Binary file removed static/mobi/css/icons_mobiscroll.woff
Binary file not shown.
1 change: 0 additions & 1 deletion static/mobi/css/mobiscroll.jquery.min.css

This file was deleted.

2 changes: 0 additions & 2 deletions static/mobi/js/mobiscroll.jquery.min.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions static/mobi/js/mobiscroll.jquery.min.js

This file was deleted.

Binary file removed static/mobi/license/EULA.pdf
Binary file not shown.
46 changes: 0 additions & 46 deletions static/mobi/mobiscroll-jquery-eventcalendar.html

This file was deleted.

48 changes: 0 additions & 48 deletions static/mobi/mobiscroll-jquery-mobile-eventcalendar.html

This file was deleted.

9 changes: 0 additions & 9 deletions static/mobi/readme.txt

This file was deleted.

6 changes: 0 additions & 6 deletions static/mobi/src/js/classes/button.d.ts

This file was deleted.

14 changes: 0 additions & 14 deletions static/mobi/src/js/classes/cards.d.ts

This file was deleted.

6 changes: 0 additions & 6 deletions static/mobi/src/js/classes/checkbox.d.ts

This file was deleted.

29 changes: 0 additions & 29 deletions static/mobi/src/js/classes/color.d.ts

This file was deleted.

11 changes: 0 additions & 11 deletions static/mobi/src/js/classes/form-control.d.ts

This file was deleted.

9 changes: 0 additions & 9 deletions static/mobi/src/js/classes/forms.d.ts

This file was deleted.

64 changes: 0 additions & 64 deletions static/mobi/src/js/classes/frame.d.ts

This file was deleted.

14 changes: 0 additions & 14 deletions static/mobi/src/js/classes/input.d.ts

This file was deleted.

Loading

0 comments on commit ada580a

Please sign in to comment.