Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cicer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
meskio
cicer
Commits
802af4f8
Commit
802af4f8
authored
4 years ago
by
meskio
Browse files
Options
Downloads
Patches
Plain Diff
Improve inventary presentation
parent
7d0f5ee7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
api/db/inventary.go
+1
-0
1 addition, 0 deletions
api/db/inventary.go
src/inventary/CreateInventary.js
+0
-2
0 additions, 2 deletions
src/inventary/CreateInventary.js
src/inventary/InventaryList.js
+1
-2
1 addition, 2 deletions
src/inventary/InventaryList.js
with
2 additions
and
4 deletions
api/db/inventary.go
+
1
−
0
View file @
802af4f8
...
@@ -75,6 +75,7 @@ func (d *DB) GetInventary(id int) (inventary Inventary, err error) {
...
@@ -75,6 +75,7 @@ func (d *DB) GetInventary(id int) (inventary Inventary, err error) {
func
(
d
*
DB
)
ListInventary
()
(
inventaries
[]
Inventary
,
err
error
)
{
func
(
d
*
DB
)
ListInventary
()
(
inventaries
[]
Inventary
,
err
error
)
{
err
=
d
.
db
.
Preload
(
"Products.Product"
)
.
err
=
d
.
db
.
Preload
(
"Products.Product"
)
.
Preload
(
clause
.
Associations
)
.
Preload
(
clause
.
Associations
)
.
Order
(
"date desc"
)
.
Find
(
&
inventaries
)
.
Find
(
&
inventaries
)
.
Error
Error
return
return
...
...
This diff is collapsed.
Click to expand it.
src/inventary/CreateInventary.js
+
0
−
2
View file @
802af4f8
...
@@ -44,8 +44,6 @@ function CreateInventary() {
...
@@ -44,8 +44,6 @@ function CreateInventary() {
suppliers
.
map
((
s
)
=>
<
option
key
=
{
s
.
ID
}
>
{
s
.
name
}
<
/option>
)
suppliers
.
map
((
s
)
=>
<
option
key
=
{
s
.
ID
}
>
{
s
.
name
}
<
/option>
)
);
);
// TODO: debug it, it doesn't send correctly
// it doesnt load picks when they change...
return
(
return
(
<
Sender
url
=
"
/api/inventary
"
body
=
{
body
}
onSuccess
=
{
setRedirect
}
>
<
Sender
url
=
"
/api/inventary
"
body
=
{
body
}
onSuccess
=
{
setRedirect
}
>
<
Form
.
Group
as
=
{
Row
}
>
<
Form
.
Group
as
=
{
Row
}
>
...
...
This diff is collapsed.
Click to expand it.
src/inventary/InventaryList.js
+
1
−
2
View file @
802af4f8
...
@@ -18,6 +18,7 @@ function inventaryOverlay(entry) {
...
@@ -18,6 +18,7 @@ function inventaryOverlay(entry) {
return
(
return
(
<
div
key
=
{
"
I
"
+
entry
.
ID
+
"
-
"
+
p
.
ID
}
>
<
div
key
=
{
"
I
"
+
entry
.
ID
+
"
-
"
+
p
.
ID
}
>
{
p
.
comment
&&
<
p
>
p
.
comment
<
/p>
}
{
p
.
product
.
name
+
"
:
"
+
stock
+
"
"
+
price
}
{
p
.
product
.
name
+
"
:
"
+
stock
+
"
"
+
price
}
<
br
/>
<
br
/>
<
/div
>
<
/div
>
...
@@ -43,7 +44,6 @@ function InventaryList() {
...
@@ -43,7 +44,6 @@ function InventaryList() {
<
td
>
{
printDate
(
i
.
date
)}
<
/td
>
<
td
>
{
printDate
(
i
.
date
)}
<
/td
>
<
td
>
{
i
.
member
.
name
}
<
/td
>
<
td
>
{
i
.
member
.
name
}
<
/td
>
<
td
>
{
supplier
(
i
)}
<
/td
>
<
td
>
{
supplier
(
i
)}
<
/td
>
<
td
>
{
i
.
comment
}
<
/td
>
<
/tr
>
<
/tr
>
<
/LinkContainer
>
<
/LinkContainer
>
<
/OverlayTrigger
>
<
/OverlayTrigger
>
...
@@ -58,7 +58,6 @@ function InventaryList() {
...
@@ -58,7 +58,6 @@ function InventaryList() {
<
th
>
Fecha
<
/th
>
<
th
>
Fecha
<
/th
>
<
th
>
Por
<
/th
>
<
th
>
Por
<
/th
>
<
th
>
Proveedor
<
/th
>
<
th
>
Proveedor
<
/th
>
<
th
>
Comentario
<
/th
>
<
/tr
>
<
/tr
>
<
/thead
>
<
/thead
>
<
tbody
>
{
entries
}
<
/tbody
>
<
tbody
>
{
entries
}
<
/tbody
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment