fnschool 20251016.81833.820__tar.gz → 20251111.81414.856__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/PKG-INFO +1 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/__init__.py +1 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/forms.py +3 -2
- fnschool-20251111.81414.856/src/fnschoo1/canteen/migrations/0017_ingredient_updated_at_alter_category_created_at_and_more.py +30 -0
- fnschool-20251111.81414.856/src/fnschoo1/canteen/migrations/0018_alter_ingredient_updated_at.py +23 -0
- fnschool-20251111.81414.856/src/fnschoo1/canteen/migrations/0019_category_updated_at_ingredient_created_at_and_more.py +48 -0
- fnschool-20251111.81414.856/src/fnschoo1/canteen/migrations/0020_alter_ingredient_created_at.py +20 -0
- fnschool-20251111.81414.856/src/fnschoo1/canteen/migrations/0021_alter_category_updated_at_and_more.py +41 -0
- fnschool-20251111.81414.856/src/fnschoo1/canteen/migrations/0022_alter_category_updated_at_and_more.py +41 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/models.py +39 -2
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/category/create.html +3 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/category/delete.html +3 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/category/list.html +1 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/category/update.html +3 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/consumption/create.html +57 -37
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/ingredient/create.html +6 -2
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/ingredient/create_one.html +3 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/ingredient/delete.html +3 -1
- fnschool-20251111.81414.856/src/fnschoo1/canteen/templates/canteen/ingredient/list.html +183 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/ingredient/update.html +3 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/meal_type/create.html +3 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/meal_type/delete.html +3 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/meal_type/list.html +1 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/meal_type/update.html +3 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/views.py +130 -40
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/workbook/generate.py +682 -165
- fnschool-20251111.81414.856/src/fnschoo1/fnhome/admin.py +3 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnhome/apps.py +6 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnhome/models.py +3 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnhome/templates/fnhome/home.html +7 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnhome/urls.py +13 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnhome/views.py +50 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/admin.py +27 -0
- {fnschool-20251016.81833.820/src/fnschoo1/profiles → fnschool-20251111.81414.856/src/fnschoo1/fnprofile}/apps.py +3 -3
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/forms.py +74 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/migrations/0001_initial.py +213 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/migrations/0002_auto_20251026_2235.py +55 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/migrations/0003_alter_fnuser_options_alter_fnuser_groups_and_more.py +45 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/migrations/0004_alter_fnuser_options_alter_fnuser_created_at_and_more.py +59 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/migrations/0005_alter_fnuser_options_alter_fnuser_created_at_and_more.py +62 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/models.py +91 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/signals.py +20 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/templates/fnprofile/create.html +18 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/templates/fnprofile/detail.html +16 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/templates/fnprofile/edit.html +16 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/templates/fnprofile/log_in.html +22 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/templates/fnprofile/log_out.html +12 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/tests.py +3 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/urls.py +15 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnprofile/views.py +74 -0
- fnschool-20251111.81414.856/src/fnschoo1/fnschool/settings.py +175 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/fnschool/urls.py +9 -3
- fnschool-20251111.81414.856/src/fnschoo1/fnschool/views.py +9 -0
- fnschool-20251111.81414.856/src/fnschoo1/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/manage.py +22 -8
- fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile.py +71 -0
- fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data/profiles/apps.py +17 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/forms.py +7 -0
- fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data/profiles/migrations/0006_profile_created_at_profile_updated_at.py +27 -0
- fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data/profiles/migrations/0007_alter_profile_created_at.py +20 -0
- fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data/profiles/migrations/0008_alter_profile_created_at_alter_profile_updated_at.py +27 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/models.py +17 -2
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/templates/profiles/create.html +4 -2
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/templates/profiles/detail.html +4 -2
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/templates/profiles/edit.html +7 -3
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/templates/profiles/log_in.html +4 -2
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/templates/profiles/log_out.html +1 -1
- fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data/profiles/tests.py +3 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/views.py +11 -2
- {fnschool-20251016.81833.820/src/fnschoo1/fnschool → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/settings.py +9 -5
- fnschool-20251111.81414.856/src/fnschoo1/patches/__init__.py +4 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/static/css/fnschool.css +20 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/static/js/fnschool.js +65 -2
- fnschool-20251111.81414.856/src/fnschoo1/templates/base/_content.html +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/templates/home.html +1 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/templates/includes/_footer.html +12 -4
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/templates/includes/_header.html +34 -8
- fnschool-20251111.81414.856/src/fnschoo1/templates/includes/_navigation.html +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/templates/includes/_paginator.html +3 -1
- fnschool-20251111.81414.856/src/fnschoo1/templates/registration/logged_out.html +0 -0
- fnschool-20251111.81414.856/src/fnschoo1/templates/registration/login.html +0 -0
- fnschool-20251111.81414.856/src/fnschool/locales/en_US/LC_MESSAGES/fnschool.mo +0 -0
- fnschool-20251111.81414.856/src/fnschool/locales/zh_CN/LC_MESSAGES/fnschool.mo +0 -0
- fnschool-20251111.81414.856/src/fnschool/locales/zh_HK/LC_MESSAGES/fnschool.mo +0 -0
- fnschool-20251111.81414.856/src/fnschool/locales/zh_SG/LC_MESSAGES/fnschool.mo +0 -0
- fnschool-20251111.81414.856/src/fnschool/locales/zh_TW/LC_MESSAGES/fnschool.mo +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschool.egg-info/PKG-INFO +1 -1
- fnschool-20251111.81414.856/src/fnschool.egg-info/SOURCES.txt +154 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschool.egg-info/top_level.txt +1 -0
- fnschool-20251016.81833.820/src/fnschoo1/canteen/templates/canteen/ingredient/list.html +0 -137
- fnschool-20251016.81833.820/src/fnschoo1/fnschool/views.py +0 -9
- fnschool-20251016.81833.820/src/fnschoo1/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- fnschool-20251016.81833.820/src/fnschool.egg-info/SOURCES.txt +0 -112
- fnschool-20251016.81833.820/src/fnschool.egg-info/SOURCES.txt.py +0 -104
- fnschool-20251016.81833.820/src/fnschool.egg-info/entry_points.txt.py +0 -2
- fnschool-20251016.81833.820/src/fnschool.egg-info/requires.txt.py +0 -13
- fnschool-20251016.81833.820/src/fnschool.egg-info/top_level.txt.py +0 -1
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/LICENSE +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/README.md +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/pyproject.toml +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/setup.cfg +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/__init__.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/admin.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/apps.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0001_initial.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0002_ingredient_is_disabled.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0003_consumption_is_disabled_alter_ingredient_is_disabled.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0004_alter_ingredient_name_category_and_more.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0005_alter_category_created_at_alter_category_name_and_more.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0006_category_is_disabled_alter_category_user_and_more.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0007_alter_consumption_amount_used_and_more.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0008_category_abbreviation_mealtype.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0009_alter_category_abbreviation_and_more.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0010_alter_consumption_options_alter_ingredient_options_and_more.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0011_category_pin_to_consumptions_top.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0012_alter_ingredient_storage_date.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0013_alter_consumption_options_alter_ingredient_options_and_more.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0014_category_priority.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0015_alter_category_options_alter_category_priority.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/0016_consumption_unique_ingredient_date_of_using.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/migrations/__init__.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/close.html +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/consumption/_create.html +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/templates/canteen/ingredient/close.html +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/tests.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/urls.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/canteen/workbook/__init__.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1/profiles → fnschool-20251111.81414.856/src/fnschoo1/fnhome}/__init__.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1/profiles → fnschool-20251111.81414.856/src/fnschoo1/fnhome}/migrations/__init__.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1/profiles → fnschool-20251111.81414.856/src/fnschoo1/fnhome}/tests.py +0 -0
- /fnschool-20251016.81833.820/src/fnschoo1/templates/base/_content.html → /fnschool-20251111.81414.856/src/fnschoo1/fnprofile/__init__.py +0 -0
- /fnschool-20251016.81833.820/src/fnschoo1/templates/includes/_navigation.html → /fnschool-20251111.81414.856/src/fnschoo1/fnprofile/migrations/__init__.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/fnschool/__init__.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/fnschool/asgi.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/fnschool/templatetags/__init__.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/fnschool/templatetags/fnschool_tags.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/fnschool/wsgi.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/locale/en/LC_MESSAGES/django.mo +0 -0
- /fnschool-20251016.81833.820/src/fnschool.egg-info/dependency_links.txt → /fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data/__init__.py +0 -0
- /fnschool-20251016.81833.820/src/fnschoo1/templates/registration/logged_out.html → /fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data/profiles/__init__.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/admin.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/migrations/0001_initial.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/migrations/0002_alter_profile_bio.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/migrations/0003_alter_profile_options_alter_profile_address_and_more.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/migrations/0004_profile_gender.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/migrations/0005_alter_profile_gender.py +0 -0
- /fnschool-20251016.81833.820/src/fnschoo1/templates/registration/login.html → /fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data/profiles/migrations/__init__.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/signals.py +0 -0
- {fnschool-20251016.81833.820/src/fnschoo1 → fnschool-20251111.81414.856/src/fnschoo1/patches/202511012053_copy_profiles_to_fnprofile_data}/profiles/urls.py +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/static/css/bootstrap.min.css +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/static/images/favicon.ico +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/static/js/bootstrap.bundle.min.js +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/static/js/bootstrap.min.js +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/static/js/jquery.min.js +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/static/js/jquery.slim.min.js +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/static/js/popper.min.js +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/templates/base/_css.html +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/templates/base/_js.html +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/templates/base/content.html +0 -0
- /fnschool-20251016.81833.820/src/fnschoo1/templates/base/header_content_footer.html → /fnschool-20251111.81414.856/src/fnschoo1/templates/base/document.html +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschoo1/templates/close.html +0 -0
- /fnschool-20251016.81833.820/src/fnschool.egg-info/dependency_links.txt.py → /fnschool-20251111.81414.856/src/fnschool.egg-info/dependency_links.txt +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschool.egg-info/entry_points.txt +0 -0
- {fnschool-20251016.81833.820 → fnschool-20251111.81414.856}/src/fnschool.egg-info/requires.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fnschool
|
|
3
|
-
Version:
|
|
3
|
+
Version: 20251111.81414.856
|
|
4
4
|
Summary: Just some school related scripts, without any ambition.
|
|
5
5
|
Author-email: larryw3i <larryw3i@163.com>, Larry Wei <larryw3i@126.com>, Larry W3i <larryw3i@yeah.net>
|
|
6
6
|
Maintainer-email: larryw3i <larryw3i@163.com>, Larry Wei <larryw3i@126.com>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from datetime import date, datetime
|
|
2
2
|
|
|
3
3
|
from django import forms
|
|
4
|
+
|
|
4
5
|
from fnschool import _
|
|
5
6
|
|
|
6
7
|
from .models import Category, Consumption, Ingredient, MealType
|
|
@@ -20,7 +21,7 @@ class IngredientForm(forms.ModelForm):
|
|
|
20
21
|
fields = [
|
|
21
22
|
f.name
|
|
22
23
|
for f in Ingredient._meta.fields
|
|
23
|
-
if f.name not in ["id", "user"]
|
|
24
|
+
if f.name not in ["id", "user", "updated_at", "created_at"]
|
|
24
25
|
]
|
|
25
26
|
|
|
26
27
|
current_year = date.today().year
|
|
@@ -55,7 +56,7 @@ class ConsumptionForm(forms.ModelForm):
|
|
|
55
56
|
widgets = {
|
|
56
57
|
"amount_used": forms.NumberInput(
|
|
57
58
|
attrs={
|
|
58
|
-
"style": "width:
|
|
59
|
+
"style": "width: 95px; text-align: center; font-family: Mono;"
|
|
59
60
|
}
|
|
60
61
|
),
|
|
61
62
|
"date_of_using": forms.HiddenInput(),
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Generated by Django 4.2.25 on 2025-10-19 02:03
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("canteen", "0016_consumption_unique_ingredient_date_of_using"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AddField(
|
|
14
|
+
model_name="ingredient",
|
|
15
|
+
name="updated_at",
|
|
16
|
+
field=models.DateTimeField(
|
|
17
|
+
auto_now=True, null=True, verbose_name="Time of updating"
|
|
18
|
+
),
|
|
19
|
+
),
|
|
20
|
+
migrations.AlterField(
|
|
21
|
+
model_name="category",
|
|
22
|
+
name="created_at",
|
|
23
|
+
field=models.DateTimeField(null=True, verbose_name="创建日期"),
|
|
24
|
+
),
|
|
25
|
+
migrations.AlterField(
|
|
26
|
+
model_name="mealtype",
|
|
27
|
+
name="created_at",
|
|
28
|
+
field=models.DateTimeField(null=True, verbose_name="创建日期"),
|
|
29
|
+
),
|
|
30
|
+
]
|
fnschool-20251111.81414.856/src/fnschoo1/canteen/migrations/0018_alter_ingredient_updated_at.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated by Django 4.2.25 on 2025-10-20 16:57
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
(
|
|
10
|
+
"canteen",
|
|
11
|
+
"0017_ingredient_updated_at_alter_category_created_at_and_more",
|
|
12
|
+
),
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
operations = [
|
|
16
|
+
migrations.AlterField(
|
|
17
|
+
model_name="ingredient",
|
|
18
|
+
name="updated_at",
|
|
19
|
+
field=models.DateTimeField(
|
|
20
|
+
auto_now=True, null=True, verbose_name="更新时间"
|
|
21
|
+
),
|
|
22
|
+
),
|
|
23
|
+
]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Generated by Django 4.2.25 on 2025-10-24 01:44
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("canteen", "0018_alter_ingredient_updated_at"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AddField(
|
|
14
|
+
model_name="category",
|
|
15
|
+
name="updated_at",
|
|
16
|
+
field=models.DateTimeField(
|
|
17
|
+
auto_now=True, null=True, verbose_name="更新时间"
|
|
18
|
+
),
|
|
19
|
+
),
|
|
20
|
+
migrations.AddField(
|
|
21
|
+
model_name="ingredient",
|
|
22
|
+
name="created_at",
|
|
23
|
+
field=models.DateTimeField(
|
|
24
|
+
auto_now_add=True, null=True, verbose_name="Time of creating"
|
|
25
|
+
),
|
|
26
|
+
),
|
|
27
|
+
migrations.AddField(
|
|
28
|
+
model_name="mealtype",
|
|
29
|
+
name="updated_at",
|
|
30
|
+
field=models.DateTimeField(
|
|
31
|
+
auto_now=True, null=True, verbose_name="更新时间"
|
|
32
|
+
),
|
|
33
|
+
),
|
|
34
|
+
migrations.AlterField(
|
|
35
|
+
model_name="category",
|
|
36
|
+
name="created_at",
|
|
37
|
+
field=models.DateTimeField(
|
|
38
|
+
auto_now_add=True, null=True, verbose_name="创建日期"
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
migrations.AlterField(
|
|
42
|
+
model_name="mealtype",
|
|
43
|
+
name="created_at",
|
|
44
|
+
field=models.DateTimeField(
|
|
45
|
+
auto_now_add=True, null=True, verbose_name="创建日期"
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
]
|
fnschool-20251111.81414.856/src/fnschoo1/canteen/migrations/0020_alter_ingredient_created_at.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Generated by Django 4.2.25 on 2025-10-24 15:20
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("canteen", "0019_category_updated_at_ingredient_created_at_and_more"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AlterField(
|
|
14
|
+
model_name="ingredient",
|
|
15
|
+
name="created_at",
|
|
16
|
+
field=models.DateTimeField(
|
|
17
|
+
auto_now_add=True, null=True, verbose_name="创建时间"
|
|
18
|
+
),
|
|
19
|
+
),
|
|
20
|
+
]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Generated by Django 4.2.26 on 2025-11-10 02:09
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("canteen", "0020_alter_ingredient_created_at"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AlterField(
|
|
14
|
+
model_name="category",
|
|
15
|
+
name="updated_at",
|
|
16
|
+
field=models.DateTimeField(
|
|
17
|
+
auto_now=True, null=True, verbose_name="Time of updating"
|
|
18
|
+
),
|
|
19
|
+
),
|
|
20
|
+
migrations.AlterField(
|
|
21
|
+
model_name="ingredient",
|
|
22
|
+
name="created_at",
|
|
23
|
+
field=models.DateTimeField(
|
|
24
|
+
auto_now_add=True, null=True, verbose_name="Time of creating"
|
|
25
|
+
),
|
|
26
|
+
),
|
|
27
|
+
migrations.AlterField(
|
|
28
|
+
model_name="ingredient",
|
|
29
|
+
name="updated_at",
|
|
30
|
+
field=models.DateTimeField(
|
|
31
|
+
auto_now=True, null=True, verbose_name="Time of updating"
|
|
32
|
+
),
|
|
33
|
+
),
|
|
34
|
+
migrations.AlterField(
|
|
35
|
+
model_name="mealtype",
|
|
36
|
+
name="updated_at",
|
|
37
|
+
field=models.DateTimeField(
|
|
38
|
+
auto_now=True, null=True, verbose_name="Time of updating"
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Generated by Django 4.2.26 on 2025-11-11 06:11
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("canteen", "0021_alter_category_updated_at_and_more"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AlterField(
|
|
14
|
+
model_name="category",
|
|
15
|
+
name="updated_at",
|
|
16
|
+
field=models.DateTimeField(
|
|
17
|
+
auto_now=True, null=True, verbose_name="更新时间"
|
|
18
|
+
),
|
|
19
|
+
),
|
|
20
|
+
migrations.AlterField(
|
|
21
|
+
model_name="ingredient",
|
|
22
|
+
name="created_at",
|
|
23
|
+
field=models.DateTimeField(
|
|
24
|
+
auto_now_add=True, null=True, verbose_name="创建时间"
|
|
25
|
+
),
|
|
26
|
+
),
|
|
27
|
+
migrations.AlterField(
|
|
28
|
+
model_name="ingredient",
|
|
29
|
+
name="updated_at",
|
|
30
|
+
field=models.DateTimeField(
|
|
31
|
+
auto_now=True, null=True, verbose_name="更新时间"
|
|
32
|
+
),
|
|
33
|
+
),
|
|
34
|
+
migrations.AlterField(
|
|
35
|
+
model_name="mealtype",
|
|
36
|
+
name="updated_at",
|
|
37
|
+
field=models.DateTimeField(
|
|
38
|
+
auto_now=True, null=True, verbose_name="更新时间"
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
]
|
|
@@ -7,6 +7,7 @@ from django.core.validators import MinValueValidator
|
|
|
7
7
|
# Create your models here.
|
|
8
8
|
from django.db import models
|
|
9
9
|
from django.db.models import Q
|
|
10
|
+
|
|
10
11
|
from fnschool import _
|
|
11
12
|
|
|
12
13
|
|
|
@@ -21,7 +22,16 @@ class MealType(models.Model):
|
|
|
21
22
|
abbreviation = models.CharField(
|
|
22
23
|
null=True, blank=True, max_length=100, verbose_name=_("Abbreviation")
|
|
23
24
|
)
|
|
24
|
-
created_at = models.
|
|
25
|
+
created_at = models.DateTimeField(
|
|
26
|
+
null=True,
|
|
27
|
+
blank=True,
|
|
28
|
+
auto_now_add=True,
|
|
29
|
+
verbose_name=_("Creating Date"),
|
|
30
|
+
)
|
|
31
|
+
updated_at = models.DateTimeField(
|
|
32
|
+
null=True, blank=True, auto_now=True, verbose_name=_("Time of updating")
|
|
33
|
+
)
|
|
34
|
+
|
|
25
35
|
is_disabled = models.BooleanField(
|
|
26
36
|
default=False, verbose_name=_("Is Disabled")
|
|
27
37
|
)
|
|
@@ -41,7 +51,13 @@ class Category(models.Model):
|
|
|
41
51
|
abbreviation = models.CharField(
|
|
42
52
|
null=True, blank=True, max_length=100, verbose_name=_("abbreviation")
|
|
43
53
|
)
|
|
44
|
-
created_at = models.
|
|
54
|
+
created_at = models.DateTimeField(
|
|
55
|
+
null=True, auto_now_add=True, verbose_name=_("Creating Date")
|
|
56
|
+
)
|
|
57
|
+
updated_at = models.DateTimeField(
|
|
58
|
+
null=True, blank=True, auto_now=True, verbose_name=_("Time of updating")
|
|
59
|
+
)
|
|
60
|
+
|
|
45
61
|
is_disabled = models.BooleanField(
|
|
46
62
|
default=False, verbose_name=_("Is Disabled")
|
|
47
63
|
)
|
|
@@ -74,6 +90,18 @@ class Ingredient(models.Model):
|
|
|
74
90
|
verbose_name=_("User"),
|
|
75
91
|
)
|
|
76
92
|
storage_date = models.DateField(verbose_name=_("Storage Date"))
|
|
93
|
+
|
|
94
|
+
created_at = models.DateTimeField(
|
|
95
|
+
null=True,
|
|
96
|
+
blank=True,
|
|
97
|
+
auto_now_add=True,
|
|
98
|
+
verbose_name=_("Time of creating"),
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
updated_at = models.DateTimeField(
|
|
102
|
+
null=True, blank=True, auto_now=True, verbose_name=_("Time of updating")
|
|
103
|
+
)
|
|
104
|
+
|
|
77
105
|
name = models.CharField(max_length=100, verbose_name=_("Ingredient Name"))
|
|
78
106
|
meal_type = models.ForeignKey(
|
|
79
107
|
MealType,
|
|
@@ -113,6 +141,10 @@ class Ingredient(models.Model):
|
|
|
113
141
|
default=False, verbose_name=_("Is Ingredient Disabled")
|
|
114
142
|
)
|
|
115
143
|
|
|
144
|
+
def __init__(self, *args, **kwargs):
|
|
145
|
+
super().__init__(*args, **kwargs)
|
|
146
|
+
self.quantity_used = Decimal("0")
|
|
147
|
+
|
|
116
148
|
@property
|
|
117
149
|
def unit_price(self):
|
|
118
150
|
if self.quantity > 0:
|
|
@@ -135,6 +167,9 @@ class Ingredient(models.Model):
|
|
|
135
167
|
return quantity
|
|
136
168
|
|
|
137
169
|
def get_consuming_quantity(self, date_end):
|
|
170
|
+
|
|
171
|
+
if self.storage_date < date_end:
|
|
172
|
+
return 0
|
|
138
173
|
consumptions = self.cleaned_consumptions
|
|
139
174
|
if not consumptions:
|
|
140
175
|
return 0
|
|
@@ -148,6 +183,8 @@ class Ingredient(models.Model):
|
|
|
148
183
|
return quantity
|
|
149
184
|
|
|
150
185
|
def get_remaining_quantity(self, date_end):
|
|
186
|
+
if self.storage_date < date_end:
|
|
187
|
+
return 0
|
|
151
188
|
return self.quantity - self.get_consuming_quantity(date_end)
|
|
152
189
|
|
|
153
190
|
@property
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
{{ form|crispy }}
|
|
12
12
|
<div class="py-3 fixed-bottom text-end bg-dark">
|
|
13
13
|
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
|
|
14
|
-
<button type="button" class="btn btn-danger" onclick="window.close();">
|
|
14
|
+
<button type="button" class="btn btn-danger" onclick="window.close();">
|
|
15
|
+
{% trans "Cancel" %}
|
|
16
|
+
</button>
|
|
15
17
|
</div>
|
|
16
18
|
</form>
|
|
17
19
|
{% endblock %}
|
|
@@ -55,7 +55,9 @@
|
|
|
55
55
|
style="display: inline">
|
|
56
56
|
{% csrf_token %}
|
|
57
57
|
<button type="submit" class="btn btn-danger">{% trans 'Delete' %}</button>
|
|
58
|
-
<button type="button" class="btn btn-primary" onclick="window.close();">
|
|
58
|
+
<button type="button" class="btn btn-primary" onclick="window.close();">
|
|
59
|
+
{% trans "Cancel" %}
|
|
60
|
+
</button>
|
|
59
61
|
</form>
|
|
60
62
|
</div>
|
|
61
63
|
<script>
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
{% csrf_token %} {{ form|crispy }}
|
|
18
18
|
<div class="py-3 fixed-bottom text-end bg-dark">
|
|
19
19
|
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
|
|
20
|
-
<button type="button" class="btn btn-danger" onclick="window.close();">
|
|
20
|
+
<button type="button" class="btn btn-danger" onclick="window.close();">
|
|
21
|
+
{% trans "Cancel" %}
|
|
22
|
+
</button>
|
|
21
23
|
</div>
|
|
22
24
|
</form>
|
|
23
25
|
{% endblock %}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% extends "base/
|
|
1
|
+
{% extends "base/document.html" %}
|
|
2
2
|
{% load crispy_forms_tags %}
|
|
3
3
|
{% block title %}
|
|
4
4
|
{% trans "Consume Ingredients" %}
|
|
@@ -9,15 +9,24 @@
|
|
|
9
9
|
<div class="container">
|
|
10
10
|
<div class="row justify-content-end">
|
|
11
11
|
<button class="btn btn-outline-success col-md-1 col-lg-1 col-2 mx-2"
|
|
12
|
-
onclick="list_consumptions_by_week();">
|
|
12
|
+
onclick="list_consumptions_by_week();">
|
|
13
|
+
{% trans "Consume by Week" %}
|
|
14
|
+
</button>
|
|
13
15
|
|
|
14
16
|
<button class="btn btn-outline-success col-md-1 col-lg-1 col-2"
|
|
15
|
-
onclick="list_consumptions_rapidly();">
|
|
17
|
+
onclick="list_consumptions_rapidly();">
|
|
18
|
+
{% trans "Rapid Consumption" %}
|
|
19
|
+
</button>
|
|
16
20
|
|
|
17
21
|
<a class="btn btn-success col-md-1 col-lg-1 col-2 mx-2"
|
|
18
22
|
target="canteen_list_categories"
|
|
19
23
|
href="{% url "canteen:list_categories" %}">{% trans "Ingredient Categories" %}</a>
|
|
20
24
|
|
|
25
|
+
<a class="btn btn-primary col-md-1 col-lg-1 col-2 "
|
|
26
|
+
target="canteen_list_meal_types"
|
|
27
|
+
href="{% url "canteen:list_meal_types" %}">{% trans "Ingredient Meal Types" %}</a>
|
|
28
|
+
|
|
29
|
+
|
|
21
30
|
<div class="col col-3 col-md-2 col-lg-2">
|
|
22
31
|
<input class=" form-control"
|
|
23
32
|
onkeydown="if(event.keyCode==13){list_consumptions();}"
|
|
@@ -38,7 +47,7 @@
|
|
|
38
47
|
onclick="list_consumptions();">{% trans "Refresh" %}</button>
|
|
39
48
|
</div>
|
|
40
49
|
</div>
|
|
41
|
-
<div class="table
|
|
50
|
+
<div class="table-responsive table-container">
|
|
42
51
|
<table class="table table-consumptions cotable-bordered table-striped table-hover table-condensed scroll-vertical ">
|
|
43
52
|
<thead>
|
|
44
53
|
<tr>
|
|
@@ -65,6 +74,9 @@
|
|
|
65
74
|
data-ingredient_id="{{ ingredient.id }}"
|
|
66
75
|
data-ingredient_name="{{ ingredient.name }}"
|
|
67
76
|
data-ingredient_quantity="{{ ingredient.quantity }}"
|
|
77
|
+
data-ingredient_quantity_used="{{ ingredient.quantity_used }}"
|
|
78
|
+
data-ingredient_remaining_quantity="{{ ingredient.remaining_quantity }}"
|
|
79
|
+
data-ingredient_consuming_quantity="{{ ingredient.consuming_quantity }}"
|
|
68
80
|
data-ingredient_total_price="{{ ingredient.total_price }}"
|
|
69
81
|
data-ingredient_meal_type="{{ ingredient.meal_type }}"
|
|
70
82
|
data-ingredient_quantity_unit_name="{{ ingredient.quantity_unit_name }}"
|
|
@@ -73,16 +85,15 @@
|
|
|
73
85
|
<td title="{% blocktrans with storage_date=ingredient.storage_date %}Storaged on {{ storage_date }} .{% endblocktrans %}"
|
|
74
86
|
class="">
|
|
75
87
|
<div class='ingredient-progress'
|
|
76
|
-
style="width:{% widthratio ingredient.remaining_quantity ingredient.quantity 100 %}%"
|
|
88
|
+
style="width:{% widthratio ingredient.remaining_quantity ingredient.quantity 100 %}%">
|
|
89
|
+
</div>
|
|
77
90
|
{{ ingredient.name }}
|
|
78
91
|
{% if ingredient.meal_type != meal_type_name_0 %}
|
|
79
92
|
<br />
|
|
80
93
|
({{ ingredient.meal_type }})
|
|
81
94
|
{% endif %}
|
|
82
95
|
</td>
|
|
83
|
-
<td name="remaining_{{ ingredient.id }}">
|
|
84
|
-
{{ ingredient.quantity }}-{{ ingredient.consuming_quantity }}={{ ingredient.remaining_quantity }}
|
|
85
|
-
</td>
|
|
96
|
+
<td name="remaining_{{ ingredient.id }}"></td>
|
|
86
97
|
</tr>
|
|
87
98
|
{% empty %}
|
|
88
99
|
<tr>{% trans "No ingredient found." %}</tr>
|
|
@@ -91,13 +102,22 @@
|
|
|
91
102
|
</table>
|
|
92
103
|
</div>
|
|
93
104
|
<div class="">
|
|
94
|
-
<button id="
|
|
95
|
-
onclick="
|
|
96
|
-
class="btn btn-submit-consumptions btn-success float-end"
|
|
97
|
-
|
|
98
|
-
|
|
105
|
+
<button id="generate_spreadsheet_btn"
|
|
106
|
+
onclick="generate_spreadsheet();"
|
|
107
|
+
class="btn btn-submit-consumptions btn-success float-end">
|
|
108
|
+
{% trans "Generate Spreadsheet" %}
|
|
109
|
+
</button>
|
|
99
110
|
<select class="workbook-month-select form-select float-end mx-2"
|
|
100
111
|
style="width:118px"></select>
|
|
112
|
+
<div class="form-check float-end mx-1 pt-2">
|
|
113
|
+
<label class="form-check-label" for="include_food_sheets">
|
|
114
|
+
{% trans 'Ingredient Sheets are also included.' %}
|
|
115
|
+
</label>
|
|
116
|
+
<input class="form-check-input"
|
|
117
|
+
type="checkbox"
|
|
118
|
+
value=""
|
|
119
|
+
id="include_food_sheets">
|
|
120
|
+
</div>
|
|
101
121
|
</div>
|
|
102
122
|
{{ ingredient_ids|json_script:'ingredient_ids' }}
|
|
103
123
|
{{ months|json_script:'months' }}
|
|
@@ -110,31 +130,24 @@
|
|
|
110
130
|
var months = JSON.parse($("#months").text())
|
|
111
131
|
var meal_types = JSON.parse($("#meal_types").text())
|
|
112
132
|
var date_range = JSON.parse($("#date_range").text())
|
|
113
|
-
|
|
114
133
|
var storage_date_start = $('#storage_date_start').text().replace(new RegExp('"', 'g'), "")
|
|
115
134
|
|
|
116
135
|
var dont_submit = false
|
|
117
136
|
|
|
118
137
|
$(document).ready(function() {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
$(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
138
|
+
$(ingredient_ids).each(function(index, ingredient_id) {
|
|
139
|
+
var td = $(`td[name='remaining_${ingredient_id}']`)
|
|
140
|
+
var tr = $(td.closest("tr"))
|
|
141
|
+
var ingredient_quantity = parseInt(tr.data("ingredient_quantity")) || 0
|
|
142
|
+
var ingredient_quantity_used = parseInt(tr.data("ingredient_quantity_used")) || 0
|
|
143
|
+
var ingredient_consuming_quantity = parseInt(tr.data("ingredient_consuming_quantity")) || 0
|
|
144
|
+
var ingredient_remaining_quantity = parseInt(tr.data("ingredient_remaining_quantity")) || 0
|
|
145
|
+
td.text(
|
|
146
|
+
`${ingredient_quantity-ingredient_quantity_used}-${ingredient_consuming_quantity-ingredient_quantity_used}=${ingredient_remaining_quantity}`
|
|
147
|
+
)
|
|
148
|
+
});
|
|
126
149
|
|
|
127
|
-
|
|
128
|
-
if ($('body').hasClass("m-0")) {
|
|
129
|
-
set_simple_cookie("body_mp0", "")
|
|
130
|
-
$("#body_mp0_trigger").html(">")
|
|
131
|
-
$('body').removeClass("m-0 p-0");
|
|
132
|
-
} else {
|
|
133
|
-
set_simple_cookie("body_mp0", "1")
|
|
134
|
-
$('#body_mp0_trigger').html("<")
|
|
135
|
-
$('body').addClass("m-0 p-0");
|
|
136
|
-
}
|
|
137
|
-
}
|
|
150
|
+
});
|
|
138
151
|
|
|
139
152
|
function list_consumptions_rapidly() {
|
|
140
153
|
query = {
|
|
@@ -239,8 +252,10 @@
|
|
|
239
252
|
|
|
240
253
|
function amount_used_input_blur(element) {
|
|
241
254
|
element = $(element)
|
|
242
|
-
var ingredient_quantity = element.closest('tr').data("ingredient_quantity")
|
|
243
|
-
|
|
255
|
+
var ingredient_quantity = parseInt(element.closest('tr').data("ingredient_quantity")) || 0
|
|
256
|
+
var ingredient_quantity_used = parseInt(element.closest("tr").data("ingredient_quantity_used")) || 0
|
|
257
|
+
ingredient_quantity = ingredient_quantity - ingredient_quantity_used
|
|
258
|
+
|
|
244
259
|
var $consumption_form = element.closest("form")
|
|
245
260
|
var amount_used = parseInt($consumption_form.data("amount_used")) || 0
|
|
246
261
|
var new_amount_used = parseInt($.trim(element.val())) || 0
|
|
@@ -386,16 +401,21 @@
|
|
|
386
401
|
});
|
|
387
402
|
|
|
388
403
|
function generate_spreadsheet() {
|
|
404
|
+
var include_food_sheets = $("#include_food_sheets").is(':checked')
|
|
389
405
|
var month = $(".workbook-month-select").val()
|
|
390
|
-
|
|
406
|
+
if (include_food_sheets) {
|
|
407
|
+
window.open(`/canteen/generate_spreadsheet/${month}?include_food_sheets=true`, 'generate_spreadsheet');
|
|
408
|
+
} else {
|
|
409
|
+
window.open(`/canteen/generate_spreadsheet/${month}`, 'generate_spreadsheet');
|
|
410
|
+
}
|
|
391
411
|
}
|
|
392
412
|
|
|
393
413
|
function set_consumptions_table_size() {
|
|
394
|
-
const
|
|
414
|
+
const generate_spreadsheet_btn = $("#generate_spreadsheet_btn")
|
|
395
415
|
const consumptions_table = $(".table-consumptions")
|
|
396
416
|
const header = $("header")
|
|
397
417
|
const footer = $("footer")
|
|
398
|
-
const height = Math.round((footer.offset().top -
|
|
418
|
+
const height = Math.round((footer.offset().top - generate_spreadsheet_btn.height() - consumptions_table.offset().top) * 0.95)
|
|
399
419
|
consumptions_table.parent().height(height)
|
|
400
420
|
}
|
|
401
421
|
$(window).resize(function() {
|
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
<form method="post" enctype="multipart/form-data">
|
|
13
13
|
{% csrf_token %} {{ form|crispy }}
|
|
14
14
|
<div class="py-3 fixed-bottom text-end bg-dark">
|
|
15
|
-
<button type="submit button" class="btn btn-outline-primary">
|
|
16
|
-
|
|
15
|
+
<button type="submit button" class="btn btn-outline-primary">
|
|
16
|
+
{% trans "Upload" %}
|
|
17
|
+
</button>
|
|
18
|
+
<button type="button" class="btn btn-danger" onclick="window.close();">
|
|
19
|
+
{% trans "Cancel" %}
|
|
20
|
+
</button>
|
|
17
21
|
</div>
|
|
18
22
|
</form>
|
|
19
23
|
{% endblock %}
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
{{ form|crispy }}
|
|
12
12
|
<div class="py-3 fixed-bottom text-end bg-dark">
|
|
13
13
|
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
|
|
14
|
-
<button type="button" class="btn btn-danger" onclick="window.close();">
|
|
14
|
+
<button type="button" class="btn btn-danger" onclick="window.close();">
|
|
15
|
+
{% trans "Cancel" %}
|
|
16
|
+
</button>
|
|
15
17
|
</div>
|
|
16
18
|
</form>
|
|
17
19
|
{% endblock %}
|
|
@@ -32,7 +32,9 @@
|
|
|
32
32
|
style="display: inline">
|
|
33
33
|
{% csrf_token %}
|
|
34
34
|
<button type="submit" class="btn btn-danger">{% trans 'Delete' %}</button>
|
|
35
|
-
<button type="button" class="btn btn-primary" onclick="window.close();">
|
|
35
|
+
<button type="button" class="btn btn-primary" onclick="window.close();">
|
|
36
|
+
{% trans "Cancel" %}
|
|
37
|
+
</button>
|
|
36
38
|
</form>
|
|
37
39
|
</div>
|
|
38
40
|
<script>
|