Admin, manage offers
This commit is contained in:
parent
c4766774dc
commit
9146aae20f
@ -8,19 +8,6 @@
|
||||
<admin-edit-offer
|
||||
state="{{offer.state.as_str()}}"
|
||||
offer-id="{{offer.id}}"
|
||||
description="{{offer.description}}"
|
||||
picture-url="{{offer.picture_url}}"
|
||||
{% match offer.price_range %}
|
||||
{% when PriceRange::Free %}
|
||||
price-range-min="0"
|
||||
price-range-max="0"
|
||||
{% when PriceRange::Fixed with { value } %}
|
||||
price-range-min="{{value}}"
|
||||
price-range-max="0"
|
||||
{% when PriceRange::Range with { min, max } %}
|
||||
price-range-min="{{min}}"
|
||||
price-range-max="{{max}}"
|
||||
{% endmatch %}
|
||||
>
|
||||
<marketplace-offer
|
||||
offer-id="{{offer.id}}"
|
||||
|
@ -2,7 +2,7 @@ import { Component, BUTTON_STYLE } from "../../shared";
|
||||
|
||||
customElements.define('admin-edit-offer', class extends Component {
|
||||
static get observedAttributes() {
|
||||
return ['offer-id', 'state', 'description', 'picture-url', 'price-range-min', 'price-range-max'];
|
||||
return ['offer-id', 'state'];
|
||||
}
|
||||
|
||||
constructor() {
|
||||
@ -12,8 +12,10 @@ customElements.define('admin-edit-offer', class extends Component {
|
||||
display: block;
|
||||
}
|
||||
#view { display: block; }
|
||||
|
||||
#actions > input {
|
||||
#actions form {
|
||||
width: 120px;
|
||||
}
|
||||
#actions form input {
|
||||
width: 100%;
|
||||
}
|
||||
#state {
|
||||
@ -66,38 +68,6 @@ customElements.define('admin-edit-offer', class extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
get description() {
|
||||
return this.getAttribute('description');
|
||||
}
|
||||
|
||||
set description(v) {
|
||||
this.setAttribute('description', v);
|
||||
}
|
||||
|
||||
get picture_url() {
|
||||
return this.getAttribute('picture-url');
|
||||
}
|
||||
|
||||
set picture_url(v) {
|
||||
this.setAttribute('picture-url', v);
|
||||
}
|
||||
|
||||
get price_range_min() {
|
||||
this.getAttribute('price-range-min');
|
||||
}
|
||||
|
||||
set price_range_min(v) {
|
||||
this.setAttribute('price-range-min', v);
|
||||
}
|
||||
|
||||
get price_range_max() {
|
||||
this.getAttribute('price-range-max');
|
||||
}
|
||||
|
||||
set price_range_max(v) {
|
||||
this.setAttribute('price-range-max', v);
|
||||
}
|
||||
|
||||
get state() {
|
||||
return this.getAttribute('state');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user