Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
261
Issues
261
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul
third-party
Commits
c7ae8642
Commit
c7ae8642
authored
Jun 10, 2021
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync with couchdb to keep data
parent
bb3b8ebf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
150 additions
and
75 deletions
+150
-75
oders_helper_style.css
orders/static/css/oders_helper_style.css
+67
-22
orders_helper.js
orders/static/js/orders_helper.js
+0
-0
views.py
orders/views.py
+2
-0
settings_secret_example.py
outils/settings_secret_example.py
+2
-1
helper.html
templates/orders/helper.html
+79
-52
No files found.
orders/static/css/oders_helper_style.css
View file @
c7ae8642
...
...
@@ -2,16 +2,56 @@
position
:
relative
;
}
#form_container
{
margin-top
:
30px
;
.page_content
{
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
}
#products_table_filter
{
text-align
:
right
!important
;
/* - Common */
/* - Order selection screen */
#new_order_form
{
margin-top
:
20px
;
margin-bottom
:
30px
;
}
#products_table_filter
input
{
height
:
40px
;
#existing_orders
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-wrap
:
wrap
;
width
:
80%
;
margin
:
0
auto
;
padding-top
:
20px
;
}
.order_pill
{
border-radius
:
30px
;
min-width
:
200px
;
min-height
:
40px
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
padding
:
8px
;
margin
:
0
10px
5px
0
;
}
/* - Main screen */
/* -- Top right action button(s) */
#actions_buttons_area
{
position
:
absolute
;
top
:
0
;
right
:
0
;
}
/* -- Supplier form */
#supplier_form_container
{
margin-top
:
30px
;
}
#supplier_input
{
...
...
@@ -20,17 +60,13 @@
border-radius
:
5px
;
}
.product_qty_input
{
width
:
100px
;
}
.product_not_from_supplier
{
background-color
:
#e7e9ed
;
cursor
:
pointer
;
/* -- Table */
#products_table_filter
{
text-align
:
right
!important
;
}
.product_name
,
.supplier_name
{
font-weight
:
bold
;
#products_table_filter
input
{
height
:
40px
;
}
#table_header_select_all
{
...
...
@@ -44,10 +80,24 @@
margin-left
:
5px
;
}
.product_qty_input
{
width
:
100px
;
}
.product_not_from_supplier
{
background-color
:
#e7e9ed
;
cursor
:
pointer
;
}
.product_name
,
.supplier_name
{
font-weight
:
bold
;
}
.select_product_cb
{
cursor
:
pointer
;
}
/* -- Suppliers list */
#suppliers_container
{
display
:
flex
;
justify-content
:
center
;
...
...
@@ -73,10 +123,4 @@
color
:
red
;
margin-left
:
5px
;
cursor
:
pointer
;
}
#actions_buttons_area
{
position
:
absolute
;
top
:
0
;
right
:
0
;
}
}
\ No newline at end of file
orders/static/js/orders_helper.js
View file @
c7ae8642
This diff is collapsed.
Click to expand it.
orders/views.py
View file @
c7ae8642
...
...
@@ -16,6 +16,8 @@ def index(request):
def
helper
(
request
):
context
=
{
'title'
:
'Aide à la commande'
,
'couchdb_server'
:
settings
.
COUCHDB
[
'url'
],
'db'
:
settings
.
COUCHDB
[
'dbs'
][
'orders'
]
}
template
=
loader
.
get_template
(
'orders/helper.html'
)
...
...
outils/settings_secret_example.py
View file @
c7ae8642
...
...
@@ -13,7 +13,8 @@ COUCHDB = {
'member'
:
'coops'
,
'inventory'
:
'inventory'
,
'envelops'
:
'envelop'
,
'shop'
:
'shopping_carts'
'shop'
:
'shopping_carts'
,
'orders'
:
'orders_test'
}
}
...
...
templates/orders/helper.html
View file @
c7ae8642
...
...
@@ -15,70 +15,97 @@
{% block content %}
<div
class=
"page_body"
>
<div
id=
"actions_buttons_area"
>
<button
type=
"button"
class=
'btn--primary'
id=
"do_inventory"
>
Faire un inventaire
</button>
</div>
<div
class=
"header txtcenter"
>
<h1>
Aide à la commande
</h1>
</div>
<div
class=
"txtcenter"
id=
"form_container"
>
<form
action=
"javascript:;"
id=
"supplier_form"
>
<input
type=
"text"
name=
"supplier"
id=
"supplier_input"
placeholder=
"Rechercher un fournisseur par son nom"
>
<button
type=
"submit"
class=
'btn--primary'
>
Ajouter le fournisseur
</button>
<div
id=
"select_order_content"
class=
"page_content txtcenter"
>
<h2>
Créer une nouvelle commande
</h2>
<form
id=
"new_order_form"
>
<input
type=
"text"
id=
"new_order_name"
placeholder=
"Nom de la commande..."
>
<button
type=
"submit"
class=
"btn btn--primary"
>
Valider
</button>
</form>
<h2>
Ou, continuer une commande existante
</h2>
<div
id=
"existing_orders"
></div>
</div>
<div
class=
"txtcenter"
id=
"suppliers_container"
></div>
<div
class=
"main"
style=
"display:none;"
>
<div
class=
"table_area"
>
<table
id=
"products_table"
class=
"display"
cellspacing=
"0"
width=
"100%"
></table>
<div
id=
"main_content"
class=
"page_content"
style=
"display:none;"
>
<div
id=
"back_to_order_selection"
>
<button
type=
"button"
class=
"btn--danger"
><i
class=
"fas fa-arrow-left"
></i>
Retour
</button>
</div>
</div>
</div>
<div
id=
"templates"
style=
"display:none;"
>
<div
id=
"supplier_pill"
>
<div
class=
"supplier_pill"
>
<div
class=
"supplier_name_container"
>
<span
class=
"pill_supplier_name"
></span>
<i
class=
"fas fa-times remove_supplier_icon"
></i>
<div
id=
"actions_buttons_area"
>
<button
type=
"button"
class=
'btn--primary'
id=
"do_inventory"
>
Faire un inventaire
</button>
</div>
<div
class=
"header txtcenter"
>
<h1>
Aide à la commande
</h1>
</div>
<div
class=
"txtcenter"
id=
"supplier_form_container"
>
<form
action=
"javascript:;"
id=
"supplier_form"
>
<input
type=
"text"
name=
"supplier"
id=
"supplier_input"
placeholder=
"Rechercher un fournisseur par son nom"
>
<button
type=
"submit"
class=
'btn--primary'
>
Ajouter le fournisseur
</button>
</form>
</div>
<div
class=
"txtcenter"
id=
"suppliers_container"
></div>
<div
class=
"main"
style=
"display:none;"
>
<div
class=
"table_area"
>
<table
id=
"products_table"
class=
"display"
cellspacing=
"0"
width=
"100%"
></table>
</div>
</div>
</div>
<div
id=
"modal_remove_supplier"
>
<h3>
Attention !
</h3>
<p>
Vous vous apprêtez à supprimer le fournisseur
<span
class=
"supplier_name"
></span>
de la sélection.
<br/>
Les produits associés uniquement à ce fournisseur seront supprimés du tableau.
<br/>
Les données renseignées dans la colonne de ce fournisseur seront perdues.
</p>
<p>
Êtez-vous sûr ?
</p>
<hr/>
</div>
<div
id=
"modal_attach_product_to_supplier"
>
<h3>
Attention !
</h3>
<p>
Vous vous apprêtez à associer le produit
<span
class=
"product_name"
></span>
au fournisseur
<span
class=
"supplier_name"
></span>
.
<br/>
L'association sera sauvegardée dès que vous aurez cliqué sur "Valider".
<br/>
</p>
<p>
Êtez-vous sûr ?
</p>
<hr/>
</div>
<div
id=
"templates"
style=
"display:none;"
>
<div
id=
"supplier_pill_template"
>
<div
class=
"supplier_pill"
>
<div
class=
"supplier_name_container"
>
<span
class=
"pill_supplier_name"
></span>
<i
class=
"fas fa-times remove_supplier_icon"
></i>
</div>
</div>
</div>
<div
id=
"modal_create_inventory"
>
<p>
Vous vous apprêtez à créer un inventaire de
<span
class=
"inventory_products_count"
></span>
produits.
</p>
<p>
Êtez-vous sûr ?
</p>
<hr/>
<div
id=
"order_pill_template"
>
<div
class=
"pill order_pill btn btn--primary"
>
<span
class=
"pill_order_name"
></span>
</div>
</div>
<div
id=
"modal_remove_supplier"
>
<h3>
Attention !
</h3>
<p>
Vous vous apprêtez à supprimer le fournisseur
<span
class=
"supplier_name"
></span>
de la sélection.
<br/>
Les produits associés uniquement à ce fournisseur seront supprimés du tableau.
<br/>
Les données renseignées dans la colonne de ce fournisseur seront perdues.
</p>
<p>
Êtez-vous sûr ?
</p>
<hr/>
</div>
<div
id=
"modal_attach_product_to_supplier"
>
<h3>
Attention !
</h3>
<p>
Vous vous apprêtez à associer le produit
<span
class=
"product_name"
></span>
au fournisseur
<span
class=
"supplier_name"
></span>
.
<br/>
L'association sera sauvegardée dès que vous aurez cliqué sur "Valider".
<br/>
</p>
<p>
Êtez-vous sûr ?
</p>
<hr/>
</div>
<div
id=
"modal_create_inventory"
>
<p>
Vous vous apprêtez à créer un inventaire de
<span
class=
"inventory_products_count"
></span>
produits.
</p>
<p>
Êtez-vous sûr ?
</p>
<hr/>
</div>
</div>
</div>
<script
src=
"{% static "
js
/
pouchdb
.
min
.
js
"
%}"
></script>
<script
type=
"text/javascript"
>
var
couchdb_dbname
=
'{{db}}'
;
var
couchdb_server
=
'{{couchdb_server}}'
+
couchdb_dbname
;
</script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
"></script>
<script type="
text
/
javascript
"
src=
"{% static 'js/orders_helper.js' %}?v="
></script>
{% endblock %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment