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
0
Issues
0
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
Alexis AOUN
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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
26 deletions
+101
-26
oders_helper_style.css
orders/static/css/oders_helper_style.css
+66
-21
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
+31
-4
No files found.
orders/static/css/oders_helper_style.css
View file @
c7ae8642
...
@@ -2,16 +2,56 @@
...
@@ -2,16 +2,56 @@
position
:
relative
;
position
:
relative
;
}
}
#form_container
{
.page_content
{
margin-top
:
30px
;
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
}
}
#products_table_filter
{
/* - Common */
text-align
:
right
!important
;
/* - Order selection screen */
#new_order_form
{
margin-top
:
20px
;
margin-bottom
:
30px
;
}
}
#products_table_filter
input
{
#existing_orders
{
height
:
40px
;
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
{
#supplier_input
{
...
@@ -20,17 +60,13 @@
...
@@ -20,17 +60,13 @@
border-radius
:
5px
;
border-radius
:
5px
;
}
}
.product_qty_input
{
/* -- Table */
width
:
100px
;
#products_table_filter
{
}
text-align
:
right
!important
;
.product_not_from_supplier
{
background-color
:
#e7e9ed
;
cursor
:
pointer
;
}
}
.product_name
,
.supplier_name
{
#products_table_filter
input
{
font-weight
:
bold
;
height
:
40px
;
}
}
#table_header_select_all
{
#table_header_select_all
{
...
@@ -44,10 +80,24 @@
...
@@ -44,10 +80,24 @@
margin-left
:
5px
;
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
{
.select_product_cb
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
/* -- Suppliers list */
#suppliers_container
{
#suppliers_container
{
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -74,9 +124,3 @@
...
@@ -74,9 +124,3 @@
margin-left
:
5px
;
margin-left
:
5px
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
\ No newline at end of file
#actions_buttons_area
{
position
:
absolute
;
top
:
0
;
right
:
0
;
}
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):
...
@@ -16,6 +16,8 @@ def index(request):
def
helper
(
request
):
def
helper
(
request
):
context
=
{
context
=
{
'title'
:
'Aide à la commande'
,
'title'
:
'Aide à la commande'
,
'couchdb_server'
:
settings
.
COUCHDB
[
'url'
],
'db'
:
settings
.
COUCHDB
[
'dbs'
][
'orders'
]
}
}
template
=
loader
.
get_template
(
'orders/helper.html'
)
template
=
loader
.
get_template
(
'orders/helper.html'
)
...
...
outils/settings_secret_example.py
View file @
c7ae8642
...
@@ -13,7 +13,8 @@ COUCHDB = {
...
@@ -13,7 +13,8 @@ COUCHDB = {
'member'
:
'coops'
,
'member'
:
'coops'
,
'inventory'
:
'inventory'
,
'inventory'
:
'inventory'
,
'envelops'
:
'envelop'
,
'envelops'
:
'envelop'
,
'shop'
:
'shopping_carts'
'shop'
:
'shopping_carts'
,
'orders'
:
'orders_test'
}
}
}
}
...
...
templates/orders/helper.html
View file @
c7ae8642
...
@@ -15,6 +15,20 @@
...
@@ -15,6 +15,20 @@
{% block content %}
{% block content %}
<div
class=
"page_body"
>
<div
class=
"page_body"
>
<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
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
id=
"actions_buttons_area"
>
<div
id=
"actions_buttons_area"
>
<button
type=
"button"
class=
'btn--primary'
id=
"do_inventory"
>
Faire un inventaire
</button>
<button
type=
"button"
class=
'btn--primary'
id=
"do_inventory"
>
Faire un inventaire
</button>
</div>
</div>
...
@@ -23,7 +37,7 @@
...
@@ -23,7 +37,7 @@
<h1>
Aide à la commande
</h1>
<h1>
Aide à la commande
</h1>
</div>
</div>
<div
class=
"txtcenter"
id=
"
form_container"
>
<div
class=
"txtcenter"
id=
"supplier_
form_container"
>
<form
action=
"javascript:;"
id=
"supplier_form"
>
<form
action=
"javascript:;"
id=
"supplier_form"
>
<input
type=
"text"
name=
"supplier"
id=
"supplier_input"
placeholder=
"Rechercher un fournisseur par son nom"
>
<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>
<button
type=
"submit"
class=
'btn--primary'
>
Ajouter le fournisseur
</button>
...
@@ -37,10 +51,10 @@
...
@@ -37,10 +51,10 @@
<table
id=
"products_table"
class=
"display"
cellspacing=
"0"
width=
"100%"
></table>
<table
id=
"products_table"
class=
"display"
cellspacing=
"0"
width=
"100%"
></table>
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"templates"
style=
"display:none;"
>
<div
id=
"templates"
style=
"display:none;"
>
<div
id=
"supplier_pill
"
>
<div
id=
"supplier_pill_template
"
>
<div
class=
"supplier_pill"
>
<div
class=
"supplier_pill"
>
<div
class=
"supplier_name_container"
>
<div
class=
"supplier_name_container"
>
<span
class=
"pill_supplier_name"
></span>
<span
class=
"pill_supplier_name"
></span>
...
@@ -49,6 +63,12 @@
...
@@ -49,6 +63,12 @@
</div>
</div>
</div>
</div>
<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"
>
<div
id=
"modal_remove_supplier"
>
<h3>
Attention !
</h3>
<h3>
Attention !
</h3>
<p>
<p>
...
@@ -77,8 +97,15 @@
...
@@ -77,8 +97,15 @@
<p>
Êtez-vous sûr ?
</p>
<p>
Êtez-vous sûr ?
</p>
<hr/>
<hr/>
</div>
</div>
</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
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
"></script>
<script type="
text
/
javascript
"
src=
"{% static 'js/orders_helper.js' %}?v="
></script>
<script type="
text
/
javascript
"
src=
"{% static 'js/orders_helper.js' %}?v="
></script>
{% endblock %}
{% 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