new
parent
ed8e9d72fd
commit
6b0df34cdd
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
@ -0,0 +1,19 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredPackages">
|
||||||
|
<value>
|
||||||
|
<list size="5">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="requests" />
|
||||||
|
<item index="1" class="java.lang.String" itemvalue="python-dotenv" />
|
||||||
|
<item index="2" class="java.lang.String" itemvalue="gunicorn" />
|
||||||
|
<item index="3" class="java.lang.String" itemvalue="django" />
|
||||||
|
<item index="4" class="java.lang.String" itemvalue="django_ckeditor_5" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PyPep8Inspection" enabled="true" level="WARNING" enabled_by_default="true" editorAttributes="WARNING_ATTRIBUTES" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Black">
|
||||||
|
<option name="sdkName" value="Python 3.13 (osinaweb)" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13 (osinaweb)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/osinaweb.iml" filepath="$PROJECT_DIR$/.idea/osinaweb.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="django" name="Django">
|
||||||
|
<configuration>
|
||||||
|
<option name="rootFolder" value="$MODULE_DIR$" />
|
||||||
|
<option name="settingsModule" value="osinaweb/settings.py" />
|
||||||
|
<option name="manageScript" value="$MODULE_DIR$/manage.py" />
|
||||||
|
<option name="environment" value="<map/>" />
|
||||||
|
<option name="doNotUseTestRunner" value="false" />
|
||||||
|
<option name="trackFilePattern" value="migrations" />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.13 (osinaweb)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
<component name="PyDocumentationSettings">
|
||||||
|
<option name="format" value="PLAIN" />
|
||||||
|
<option name="myDocStringFormat" value="Plain" />
|
||||||
|
</component>
|
||||||
|
<component name="TemplatesService">
|
||||||
|
<option name="TEMPLATE_CONFIGURATION" value="Django" />
|
||||||
|
<option name="TEMPLATE_FOLDERS">
|
||||||
|
<list>
|
||||||
|
<option value="$MODULE_DIR$/osinacore/templates" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</module>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,110 @@
|
|||||||
|
{% extends "add-edit-main.html" %}
|
||||||
|
{%load static%}
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<div class="w-full h-full shadow-md rounded-md py-5 px-3 bg-white">
|
||||||
|
<h1 class="text-3xl text-secondosiblue text-center font-semibold">
|
||||||
|
Add Business
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<form method="POST" action="{% url 'addaddressbook' %}" enctype="multipart/form-data">
|
||||||
|
{% csrf_token %}
|
||||||
|
<div class="w-full flex flex-col gap-5">
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500">Logo:</label>
|
||||||
|
<div class="inbox-box border border-gray-300 w-full rounded-md px-3 mt-1">
|
||||||
|
<div class="flex items-center justify-between">
|
||||||
|
<input name="logo" required type="file" class="file-input" accept="image/*" hidden />
|
||||||
|
<span class="file-name text-gray-500 text-base focus:outline-none outline-none">Upload
|
||||||
|
Logo</span>
|
||||||
|
<label
|
||||||
|
class="file-label bg-transparent text-gray-500 border border-white h-14 cursor-pointer flex items-center">
|
||||||
|
<i class="fa fa-upload" style="font-size: 25px;"></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500">Customer:</label>
|
||||||
|
<select name="customer" id="business_type"
|
||||||
|
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
|
||||||
|
<option value="" selected disabled>Select Customer</option>
|
||||||
|
{% for customer in customers %}
|
||||||
|
<option value="{{ customer.id }}">{{ customer.user.first_name }} {{ customer.user.last_name }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500">Name:</label>
|
||||||
|
<input name="name" type="text"
|
||||||
|
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500">Email:</label>
|
||||||
|
<input name="email" type="email"
|
||||||
|
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500">Financial Number:</label>
|
||||||
|
<input name="financial_number" type="number"
|
||||||
|
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500">Commercial Registration:</label>
|
||||||
|
<input name="commercial_registration" type="commercial_registration"
|
||||||
|
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500">Mobile Number:</label>
|
||||||
|
<input name="phone_number" type="number"
|
||||||
|
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500">Website:</label>
|
||||||
|
<input name="website" type="url"
|
||||||
|
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md mt-1">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<label class="text-gray-500">Type:</label>
|
||||||
|
<select name="type" id="business_type"
|
||||||
|
class="w-full h-[50px] py-1 px-3 border border-gray-300 outline-none rounded-md text-gray-500 mt-1">
|
||||||
|
<option value="" selected disabled>Select Business Type</option>
|
||||||
|
{% for business_type in business_types %}
|
||||||
|
<option value="{{ business_type.id }}">{{ business_type.name }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="w-full flex justify-start items-center gap-2 mt-1">
|
||||||
|
<input name="vat" type="checkbox" >
|
||||||
|
<label class="text-slate-800">VAT</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="w-full flex justify-center items-center mt-3">
|
||||||
|
<button type="submit"
|
||||||
|
class="w-fit py-1 px-5 bg-osiblue rounded-md outline-none text-white border border-osiblue text-xl cursor-pointer hover:bg-white hover:text-osiblue duration-300">Save</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-------------- JS SCRIPTS --------------->
|
||||||
|
<script type="text/javascript" src='{% static "js/inputs/upload-input-tag.js" %}'></script>
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock content %}
|
@ -0,0 +1,118 @@
|
|||||||
|
{% extends "main.html" %}
|
||||||
|
{%load static%}
|
||||||
|
{% block title %}My Projects{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="w-full xxlg1:w-[75%]">
|
||||||
|
<div class="w-full h-fit bg-white rounded-md shadow-md p-5">
|
||||||
|
<h1 class="text-secondosiblue text-[25px]">Address Book</h1>
|
||||||
|
|
||||||
|
<!-- FILTERING -->
|
||||||
|
<div
|
||||||
|
class="w-full py-4 px-3 bg-gray-200 rounded-md shadow-md mt-4 flex flex-col s:flex-row justify-between gap-3 items-center">
|
||||||
|
<div class="w-full s:w-fit flex justify-start items-center gap-5">
|
||||||
|
<div class="relative h-fit w-full s:w-fit flex items-center">
|
||||||
|
<input type="text" placeholder="Enter Name"
|
||||||
|
class="py-2 px-3 border border-gray-300 rounded-md outline-none w-full s: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 class="w-full s:w-fit">
|
||||||
|
<a href="{% url 'addaddressbook' %}" class="text-blue-500 hover:text-blue-800 hover:underline"></a>
|
||||||
|
<button
|
||||||
|
class="w-full s:w-fit text-base px-3 py-2 bg-osiblue text-white outline-none border border-osiblue rounded-md cursor-pointer hover:bg-white hover:text-osiblue duration-300">Add
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="overflow-x-auto border border-gray-300 rounded-md mt-5 tableContainer" 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">
|
||||||
|
Name
|
||||||
|
</th>
|
||||||
|
<th scope="col"
|
||||||
|
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
|
||||||
|
Country
|
||||||
|
</th>
|
||||||
|
<th scope="col"
|
||||||
|
class="px-6 py-3 text-sm font-medium text-gray-500 uppercase border-r border-gray-300 whitespace-nowrap">
|
||||||
|
Contact
|
||||||
|
</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 address in addresses %}
|
||||||
|
<tr>
|
||||||
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
||||||
|
<div class="w-full flex flex-col justify-center items-center gap-3">
|
||||||
|
<div class="w-[50px] h-[50px] bg-slate-600 rounded-full">
|
||||||
|
<img src='{{business.logo.url}}' alt="Business Logo"
|
||||||
|
class="w-full h-full object-cover rounded-full">
|
||||||
|
</div>
|
||||||
|
<p class="text-secondosiblue">{{ address.first_name }} {{ address.middle_name }} {{ address.last_name }}</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
||||||
|
{% for c in address.contact_set.all %}
|
||||||
|
<p class="text-secondosiblue">{{c.type}}: {{c.contact}}</p>
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="px-6 py-4 text-center text-sm border-r border-gray-300">
|
||||||
|
<p class="text-secondosiblue">{{address.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 'businessdetails' business.business_id %}">
|
||||||
|
<div class="cursor-pointer">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"class="w-[18px] text-fifthosiblue hover:scale-110 duration-500 transition-transform">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a href="{% url 'editbusiness' business.business_id %}">
|
||||||
|
<div class="cursor-pointer">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-[18px] text-fifthosiblue hover:scale-110 duration-500 transition-transform">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="cursor-pointer deleteBusinessButton"
|
||||||
|
data-modal-url="{% url 'deletebusinessmodal' business.id %}">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-[18px] text-red-500 hover:scale-110 duration-500 transition-transform">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock content %}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,10 @@
|
|||||||
|
django==5.2
|
||||||
|
Pillow==11.1.0
|
||||||
|
firebase-admin==6.7.0
|
||||||
|
daphne==4.1.2
|
||||||
|
djangorestframework==3.16.0
|
||||||
|
fcm-django==2.2.1
|
||||||
|
django-colorfield==0.13.0
|
||||||
|
django-cors-headers==4.7.0
|
||||||
|
channels==4.2.2
|
||||||
|
weasyprint==65.0
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue