Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,29 @@

import {ItemDetailMixin} from "/shopfloor_mobile_base/static/wms/src/components/detail/detail_mixin.js";

Vue.component("detail-product-image", {
props: ["record"],
template: `
<div v-if="record.image" class="detail-product-image-wrapper my-3 d-flex justify-center">
<v-img
:src="record.image"
max-width="256"
contain
class="rounded elevation-1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why rounded?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A purely aesthetic choice

>
<template #placeholder>
<div class="d-flex align-center justify-center fill-height">
<v-progress-circular
color="grey-lighten-4"
indeterminate
/>
</div>
</template>
</v-img>
</div>
`,
});

// TODO: refactor according to new data from backend and maybe merge w/ `detail-lot`
Vue.component("detail-product", {
mixins: [ItemDetailMixin],
Expand All @@ -18,7 +41,11 @@ Vue.component("detail-product", {
},
full_detail_fields() {
return [
// Image TODO
{
path: "image",
display_no_value: false,
render_component: "detail-product-image",
},
{path: "lot.name", label: "Lot"},
{path: "expiration_date", label: "Expiry date"},
{path: "default_code", label: "Internal ref"},
Expand Down
Loading