Skip to content
This repository has been archived by the owner on Aug 27, 2020. It is now read-only.

Commit

Permalink
Rebuild assets
Browse files Browse the repository at this point in the history
  • Loading branch information
kaniak274 committed Dec 14, 2019
1 parent 97728f2 commit 5dcb100
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 14 deletions.
21 changes: 21 additions & 0 deletions ebiznes/apps/service/migrations/0022_auto_20191214_0750.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 2.2.8 on 2019-12-14 06:50

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('service', '0021_auto_20191214_0744'),
]

operations = [
migrations.AlterModelOptions(
name='order',
options={'verbose_name': 'price', 'verbose_name_plural': 'price'},
),
migrations.AlterModelOptions(
name='pricelist',
options={'verbose_name': 'price', 'verbose_name_plural': 'price'},
),
]
17 changes: 17 additions & 0 deletions ebiznes/apps/service/migrations/0023_auto_20191214_0750.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 2.2.8 on 2019-12-14 06:50

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('service', '0022_auto_20191214_0750'),
]

operations = [
migrations.AlterModelOptions(
name='order',
options={'verbose_name': 'order', 'verbose_name_plural': 'order'},
),
]
8 changes: 8 additions & 0 deletions ebiznes/apps/service/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ class PriceList(models.Model):
name = models.CharField(_("Name"), max_length=100)
price = models.DecimalField(_('Price'), max_digits=6, decimal_places=2)

class Meta:
verbose_name = _('price')
verbose_name_plural = _('price')

@classmethod
def calculate_total_price(cls, price_list):
return cls.objects.filter(pk__in=price_list).aggregate(Sum('price'))
Expand All @@ -156,3 +160,7 @@ class Order(TimeStampedModel):
user = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
order_id = models.CharField(max_length=255)
status = models.CharField(max_length=40, choices=PAYMENT_CHOICES)

class Meta:
verbose_name = _('order')
verbose_name_plural = _('order')
13 changes: 7 additions & 6 deletions ebiznes/assets/views/ServiceEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,17 @@
v-model="newName"
:placeholder="$t('service.priceListName')"/>
</b-field>

<errors property="name"/>
</div>
<div class="col-3">
<b-field>
<b-input
v-model="newPrice"
:placeholder="$t('service.priceListPrice')"/>
</b-field>

<errors property="price"/>
</div>
<div class="col-1">
<b-button
Expand All @@ -81,7 +85,7 @@
</template>
<script>
import axios from 'axios';
import { mapGetters } from 'vuex';
import { mapGetters, mapState } from 'vuex';
export default {
name: 'ServiceEdit',
Expand Down Expand Up @@ -169,12 +173,9 @@ export default {
this.newPrice = '';
this.newName = '';
}).catch(error => {
const { response: { data: { price = [], service = [], name = []} }} = error;
price.push.apply(price, service);
price.push.apply(price, name);
const { response: { data }} = error;
this.$toastr.e(price.join(' '));
this.$store.commit('setError', data);
});
},
},
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manifest-dist.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"app.css": "0.css",
"app.js": "app.40f3f8954e8be6f62a58.js",
"app.js": "app.6d028c7b6b50bb51dffc.js",
"assets/fonts/materialdesignicons-webfont.eot?v=4.5.95": "assets/fonts/materialdesignicons-webfont.eot",
"assets/fonts/materialdesignicons-webfont.ttf?v=4.5.95": "assets/fonts/materialdesignicons-webfont.ttf",
"assets/fonts/materialdesignicons-webfont.woff2?v=4.5.95": "assets/fonts/materialdesignicons-webfont.woff2",
Expand Down

0 comments on commit 5dcb100

Please sign in to comment.