forked from santropolroulant/sous-chef
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue santropolroulant#52 Specify upcoming dates where the client has…
… chosen not to receive any meal
- Loading branch information
1 parent
e7232d2
commit d463c8c
Showing
9 changed files
with
153 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
$(function() { | ||
|
||
// Javascript of the meal cancellation. | ||
// ************************************** | ||
|
||
var config = { | ||
dateFormat: "yy-mm-dd", | ||
separator: "|" | ||
}; | ||
|
||
$('#id_cancel_meal_dates').hide(); | ||
$('#cancel_meal_dates').multiDatesPicker(config); | ||
if($('#id_cancel_meal_dates').val()){ | ||
$('#cancel_meal_dates').multiDatesPicker('addDates', JSON.parse($('#id_cancel_meal_dates').val())); | ||
|
||
} | ||
$('#cancel_meal_dates').bind('DOMSubtreeModified', function(){ | ||
var dates = $('#cancel_meal_dates').multiDatesPicker('getDates'); | ||
$('#id_cancel_meal_dates').val(JSON.stringify(dates)); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
souschef/member/migrations/0035_client_cancel_meal_date.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.29 on 2021-01-30 18:08 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('member', '0034_auto_20170816_0850'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Client_cancel_meal_date', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('cancel_date', models.DateField(default=django.utils.timezone.now)), | ||
('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cancel_meal_dates', to='member.Client', verbose_name='client')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters