summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/static/css/main.css6
-rw-r--r--core/static/css/output.css45
-rw-r--r--core/templates/core/base.html2
-rw-r--r--core/templates/core/profile.html19
-rw-r--r--core/views.py4
5 files changed, 65 insertions, 11 deletions
diff --git a/core/static/css/main.css b/core/static/css/main.css
index 5be59b4..b5c61c9 100644
--- a/core/static/css/main.css
+++ b/core/static/css/main.css
@@ -1,3 +1,3 @@
-@import 'tailwindcss/base';
-@import 'tailwindcss/components';
-@import 'tailwindcss/utilities'; \ No newline at end of file
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
diff --git a/core/static/css/output.css b/core/static/css/output.css
index 4382d7f..3a5b9a1 100644
--- a/core/static/css/output.css
+++ b/core/static/css/output.css
@@ -612,6 +612,10 @@ video {
z-index: 10;
}
+.m-2 {
+ margin: 0.5rem;
+}
+
.mx-auto {
margin-left: auto;
margin-right: auto;
@@ -849,11 +853,40 @@ video {
border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
}
+.divide-y-2 > :not([hidden]) ~ :not([hidden]) {
+ --tw-divide-y-reverse: 0;
+ border-top-width: calc(2px * calc(1 - var(--tw-divide-y-reverse)));
+ border-bottom-width: calc(2px * var(--tw-divide-y-reverse));
+}
+
+.divide-y-4 > :not([hidden]) ~ :not([hidden]) {
+ --tw-divide-y-reverse: 0;
+ border-top-width: calc(4px * calc(1 - var(--tw-divide-y-reverse)));
+ border-bottom-width: calc(4px * var(--tw-divide-y-reverse));
+}
+
+.divide-solid > :not([hidden]) ~ :not([hidden]) {
+ border-style: solid;
+}
+
+.divide-dashed > :not([hidden]) ~ :not([hidden]) {
+ border-style: dashed;
+}
+
+.divide-double > :not([hidden]) ~ :not([hidden]) {
+ border-style: double;
+}
+
.divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
--tw-divide-opacity: 1;
border-color: rgb(229 231 235 / var(--tw-divide-opacity));
}
+.divide-gray-300 > :not([hidden]) ~ :not([hidden]) {
+ --tw-divide-opacity: 1;
+ border-color: rgb(209 213 219 / var(--tw-divide-opacity));
+}
+
.overflow-hidden {
overflow: hidden;
}
@@ -894,6 +927,11 @@ video {
border-width: 2px;
}
+.border-y-0 {
+ border-top-width: 0px;
+ border-bottom-width: 0px;
+}
+
.border-b {
border-bottom-width: 1px;
}
@@ -1293,6 +1331,11 @@ video {
color: rgb(161 161 170 / var(--tw-text-opacity));
}
+.text-purple {
+ --tw-text-opacity: 1;
+ color: rgb(63 60 187 / var(--tw-text-opacity));
+}
+
.underline {
text-decoration-line: underline;
}
@@ -1545,4 +1588,4 @@ video {
padding-left: 2rem;
padding-right: 2rem;
}
-} \ No newline at end of file
+}
diff --git a/core/templates/core/base.html b/core/templates/core/base.html
index e69eaeb..4c31294 100644
--- a/core/templates/core/base.html
+++ b/core/templates/core/base.html
@@ -29,7 +29,7 @@
</div>
<div class="flex items-center space-x-4">
{% if request.user.is_authenticated %}
- <span class="text-white">{{ user }}</span>
+ <a href="{% url 'profile' %}"><span class="text-white">{{ user }}</span></a>
<a href="{% url 'logout' %}" class="text-white hover:text-blue-200">Log Out</a>
{% else %}
<a href="{% url 'login' %}" class="text-white hover:text-blue-200">Log In</a>
diff --git a/core/templates/core/profile.html b/core/templates/core/profile.html
index 66184f6..7f512e4 100644
--- a/core/templates/core/profile.html
+++ b/core/templates/core/profile.html
@@ -5,16 +5,16 @@
{% block content %}
<div class="container my-4 bg-white">
- <div class="py-3 rounded border border-2">
+ <div class="py-3 rounded border border-2 divide-y-2 divide-gray-300 divide-solid">
<div class="p-4">
<h1 class="font-bold text-lg">{{ user.first_name }} {{ user.last_name }} <span class="text-zinc-400 text-md font-normal"> &#9900; {{ user.designation }} {{ user.team.name }} </span></h1>
+ <a href="mailto:{{ user.email }}" class="text-blue-500 hover:underline">{{ user.email }}</a>
</div>
<div>
- <p class="pl-4 pb-2">{{ user.dapsy }}</p>
+ <p class="pl-4 pb-2 my-4 text-purple">Is DAP-Sy: {{ user.dapsy }}</p>
</div>
- <hr>
<div class="py-2 px-4">
- <p>Lead inspector for :</p>
+ <p class="font-semibold">Lead inspector for:</p>
<ul class="list-disc px-2 mt-4">
{% for org in user.lead_for.all%}
<li class="ml-4">
@@ -23,6 +23,17 @@
{% endfor %}
</ul>
</div>
+ <div class="py-2 px-4">
+ <p class="font-semibold">Recent and upcoming engagements:</p>
+ <ul class="list-disc px-2 mt-4">
+ {% for eng in user.get_all_engagements.all|dictsortreversed:"proposed_start_date" %}
+ <li class="ml-4">
+ {{ eng.proposed_start_date|date:'d M y' }} - <a href="{% url 'engagements:engagement_detail' eng.id %}" class="text-blue-600 hover:underline">{{ eng.alt_str }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+
</div>
</div>
diff --git a/core/views.py b/core/views.py
index 4e7cd41..60f8837 100644
--- a/core/views.py
+++ b/core/views.py
@@ -20,5 +20,5 @@ def dashboard(request):
@login_required
def profile(request):
- args = {"user": request.user}
- return render(request, "core/profile.html", args)
+ context = {"user": request.user}
+ return render(request, "core/profile.html", context)