main
parent
e6824e7913
commit
83308b3b3d
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,20 @@
|
||||
# Generated by Django 4.2.5 on 2024-01-05 18:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('osinacore', '0042_remove_customerprofile_email_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='BusinessType',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=50)),
|
||||
],
|
||||
),
|
||||
]
|
@ -0,0 +1,17 @@
|
||||
# Generated by Django 4.2.5 on 2024-01-05 18:48
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('osinacore', '0043_businesstype'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='business',
|
||||
name='business_type',
|
||||
),
|
||||
]
|
@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.5 on 2024-01-05 18:49
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('osinacore', '0044_remove_business_business_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='business',
|
||||
name='type',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='osinacore.businesstype'),
|
||||
),
|
||||
]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,44 @@
|
||||
{% extends "main.html" %}
|
||||
{%load static%}
|
||||
{% block content %}
|
||||
|
||||
<div class="w-full px-10 mb-4">
|
||||
<div class="w-full h-full shadow-md rounded-md mt-5 py-5 px-3 bg-white">
|
||||
<h1 class="text-3xl text-slate-800 text-center font-semibold">
|
||||
Edit Business Type
|
||||
</h1>
|
||||
|
||||
<form id="hiddenContent" method="POST" action="{% url 'editbusinesstype' businesstype.id %}">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="w-full flex justify-center items-center">
|
||||
<input name="name" type="text" placeholder="Business Type Name"
|
||||
value="{{businesstype.name}}"
|
||||
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex justify-center items-center mt-4">
|
||||
<button type="submit"
|
||||
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- POPUP MODAL -->
|
||||
<div class="w-full h-full bg-black bg-opacity-40 z-20 fixed justify-center items-center hidden" id="popUpModal">
|
||||
<div class="w-[95%] md:w-fit h-fit bg-white rounded-md p-9 relative">
|
||||
<button class="absolute top-3 right-5 text-slate-800 text-xl cursor-pointer outline-none border-none"
|
||||
id="closeModalButton">
|
||||
<i class="fa fa-close"></i>
|
||||
</button>
|
||||
<iframe id="popupModalFrame" frameborder="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
@ -0,0 +1,147 @@
|
||||
{% extends "main.html" %}
|
||||
{%load static%}
|
||||
{% block content %}
|
||||
<!-- NOTES SECTION -->
|
||||
<div class="w-full h-fit flex justify-between items-center px-10 pb-5">
|
||||
<div class="relative w-full h-fit bg-white shadow-md rounded-md p-5">
|
||||
<div class="w-full flex justify-between items-center">
|
||||
<div>
|
||||
<p class="text-base text-gray-500">Recent Note:</p>
|
||||
<div class="flex justify-start items-center gap-2">
|
||||
<div class="w-[13px] h-[13px] bg-red-200 rounded-full"
|
||||
style="background-color: {{ last_note_color }};">
|
||||
|
||||
</div>
|
||||
<p class="text-slate-700">{{recent_note.text}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end items-center gap-4">
|
||||
<button
|
||||
class="w-fit rounded-md py-1 px-3 bg-slate-800 border border-slate-800 text-white hover:bg-white hover:text-slate-800"
|
||||
id="showNotesButton">Show
|
||||
Notes</button>
|
||||
<button
|
||||
class="w-[35px] h-[35px] rounded-full p-2 bg-gray-300 text-white text-[20px] outline-none border-none cursor-pointer flex justify-center items-center shadow-md addNoteButton"
|
||||
data-modal-url="{% url 'addnote' %}">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ALL NOTES CONTAINER (it appears when clicking on the "Show notes" button) -->
|
||||
<div class="w-full h-fit relative hidden justify-start gap-3 items-center mt-5 overflow-hidden overflow-x-auto"
|
||||
id="notesContainer">
|
||||
|
||||
{% for note in notes %}
|
||||
<div class="w-[16.33%] h-[150px] shadow-sm p-5" style="background-color: {{note.color}}">
|
||||
<p class="text-base text-slate-800">{{note.text}}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PROJECT TYPES LISTING AND USERS ACTIVITY SECTION -->
|
||||
<div class="w-full flex justify-between gap-[2.5%] px-10 pb-5">
|
||||
<!-- LEFT SIDE / BUSINESS TYPES SECTION -->
|
||||
<div class="w-[74.5%]">
|
||||
<div class="w-full h-fit bg-white rounded-md shadow-md p-5">
|
||||
<h1 class="text-slate-800 text-[30px] font-semibold">Businness Types</h1>
|
||||
|
||||
<!-- FILTERING -->
|
||||
<div class="w-full py-4 px-3 bg-gray-200 rounded-md shadow-md mt-4 flex justify-between items-center">
|
||||
<div class="flex justify-start items-center gap-5">
|
||||
<div class="relative h-fit w-fit flex items-center">
|
||||
<input type="text" placeholder="Enter Business Type"
|
||||
class="py-2 px-3 border border-gray-300 rounded-md outline-none w-[300px] h-[40px] relative">
|
||||
<button class="text-gray-500 text-xl outline-none border-none cursor-pointer absolute right-2 bg-white">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button
|
||||
class="w-fit text-base px-3 py-2 bg-blue-500 text-white outline-none border border-blue-500 rounded-md cursor-pointer hover:bg-white hover:text-blue-500 addBusinessTypeButton" data-modal-url="{% url 'addbusinesstype' %}">Add
|
||||
Business Type</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="overflow-x-auto border border-gray-300 rounded-md mt-5" id="customersContainer">
|
||||
<table class="min-w-full divide-y">
|
||||
<!-- TABLE HEADER -->
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th scope="col"
|
||||
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
|
||||
Business Type
|
||||
</th>
|
||||
<th scope="col"
|
||||
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase whitespace-nowrap">
|
||||
Actions
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- TABLE BODY -->
|
||||
<tbody class="bg-white divide-y divide-gray-200">
|
||||
<!-- 1st row -->
|
||||
{% for type in businesstypes %}
|
||||
<tr>
|
||||
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
||||
<p class="text-slate-800">{{type.name}}</p>
|
||||
</td>
|
||||
|
||||
<td class="px-6 py-4 text-center text-sm">
|
||||
<div class="flex justify-center items-center gap-3">
|
||||
<a href="{% url 'editbusinesstype' type.id %}">
|
||||
<div class="text-[15px] text-blue-500 cursor-pointer">
|
||||
<i class="fa fa-edit"></i>
|
||||
</div>
|
||||
</a>
|
||||
<div class="text-[15px] text-red-500 cursor-pointer">
|
||||
<i class="fa fa-trash"></i>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RIGHT SIDE / USERS ACTIVITY -->
|
||||
<div class="w-[23%] bg-white h-fit rounded-md shadow-md p-5">
|
||||
<h1 class="text-2xl text-slate-700 text-center font-semibold">USERS ACTIVITY</h1>
|
||||
<div class="w-full h-fit mt-2" id="activitiesContainer">
|
||||
|
||||
{% include 'recent-activities.html' %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- POPUP MODAL -->
|
||||
<div class="w-full h-full bg-black bg-opacity-40 z-20 fixed justify-center items-center hidden" id="popUpModal">
|
||||
<div class="w-[95%] md:w-fit h-fit bg-white rounded-md p-9 relative">
|
||||
<button class="absolute top-3 right-5 text-slate-800 text-xl cursor-pointer outline-none border-none"
|
||||
id="closeModalButton">
|
||||
<i class="fa fa-close"></i>
|
||||
</button>
|
||||
<iframe id="popupModalFrame" frameborder="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src='{% static "js/pop-modals.js" %}'></script>
|
||||
</div>
|
||||
|
||||
<!---------------------- JS SCRIPTS -------------------->
|
||||
|
||||
<!-- TO SHOW ALL THE ADDED NOTES BY THE USER WHEN CLICKING ON THE SHOW NOTES BUTTON -->
|
||||
<script type="text/javascript" src='{% static "js/show-notes.js" %}'></script>
|
||||
|
||||
{% endblock content %}
|
@ -0,0 +1,32 @@
|
||||
{% load static %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Osina</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href='{% static "dist/output.css" %}'>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form id="hiddenContent" method="POST" action="{% url 'save_businesstype' %}">
|
||||
{% csrf_token %}
|
||||
<h1 class="text-slate-800 text-2xl font-semibold text-center">Add Business Type</h1>
|
||||
|
||||
<div class="w-full flex justify-center items-center">
|
||||
<input name="name" type="text" placeholder="Business Type Name"
|
||||
class="w-full p-3 border border-gray-300 rounded-md bg-transparent outline-none mt-4"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex justify-center items-center mt-4">
|
||||
<button type="submit"
|
||||
class="w-fit bg-blue-500 border border-blue-500 rounded-md text-white text-xl px-3 py-2 hover:bg-white hover:text-blue-500">Add</button>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue