-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from nens/reinout-vrije-dagen
Vrije dagen overzicht
- Loading branch information
Showing
9 changed files
with
229 additions
and
41 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 |
---|---|---|
@@ -1,38 +1,75 @@ | ||
# Generated by Django 3.2.16 on 2024-12-16 18:59 | ||
|
||
from django.db import migrations, models | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('trs', '0009_auto_20220708_1535'), | ||
("trs", "0009_auto_20220708_1535"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='MPC', | ||
name="MPC", | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=255, verbose_name='naam')), | ||
('description', models.CharField(blank=True, max_length=255, verbose_name='omschrijving')), | ||
('target', models.DecimalField(decimal_places=2, default=0, max_digits=12, verbose_name='omzetdoelstelling')), | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("name", models.CharField(max_length=255, verbose_name="naam")), | ||
( | ||
"description", | ||
models.CharField( | ||
blank=True, max_length=255, verbose_name="omschrijving" | ||
), | ||
), | ||
( | ||
"target", | ||
models.DecimalField( | ||
decimal_places=2, | ||
default=0, | ||
max_digits=12, | ||
verbose_name="omzetdoelstelling", | ||
), | ||
), | ||
], | ||
options={ | ||
'verbose_name': 'Markt-product-combinatie', | ||
'verbose_name_plural': 'Markt-product-combinaties', | ||
'ordering': ['name'], | ||
"verbose_name": "Markt-product-combinatie", | ||
"verbose_name_plural": "Markt-product-combinaties", | ||
"ordering": ["name"], | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='person', | ||
name='mpc', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='persons', to='trs.mpc', verbose_name='markt-product-combinatie'), | ||
model_name="person", | ||
name="mpc", | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="persons", | ||
to="trs.mpc", | ||
verbose_name="markt-product-combinatie", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name='project', | ||
name='mpc', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='projects', to='trs.mpc', verbose_name='markt-product-combinatie'), | ||
model_name="project", | ||
name="mpc", | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="projects", | ||
to="trs.mpc", | ||
verbose_name="markt-product-combinatie", | ||
), | ||
), | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{% extends "trs/base.html" %} | ||
{% load trs_formatting %} | ||
|
||
{% block full-width %} | ||
<h1>Overzicht vrije dagen / feestdagen {{ view.person }} {{ view.year }}</h1> | ||
|
||
<p>Noot: ik filter op projecten met "feest" en "verlof" in de naam.</p> | ||
|
||
<div class="row"> | ||
<div class="col-md-10"> | ||
<p> | ||
Je kan op het weeknummer klikken om de uren van die week te bewerken. | ||
</p> | ||
|
||
<table class="table table-hover table-condensed table-fixed-header"> | ||
<thead class="header"> | ||
<tr> | ||
<th>Week</th> | ||
<th>Begindag</th> | ||
{% for project in view.free_projects %} | ||
<th class="text-right">{{ project.as_widget }}</th> | ||
{% endfor %} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for line in view.lines %} | ||
<tr> | ||
<td> | ||
<a href="{% url 'trs.booking' pk=view.person.id year=line.year_week.year week=line.year_week.week %}"> | ||
Week {{ line.year_week.week }} | ||
</a> | ||
</td> | ||
<td> | ||
<span class="year-date-hint"> | ||
{{ line.year_week.formatted_first_day }} | ||
</span> | ||
</td> | ||
{% for hour in line.hours %} | ||
<td class="text-right {% if hour %}success{% endif %}">{{ hour|hours }}</th> | ||
{% endfor %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
|
||
</div> | ||
<div class="col-md-2"> | ||
<p>Beschikbare jaren:</p> | ||
<ul> | ||
{% for year in view.available_years %} | ||
<li><a href="?year={{ year }}">{{ year }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
|
||
{% endblock %} |
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
Oops, something went wrong.