Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored markup and styling(#245fw5p) #24

Merged
merged 3 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions changelogs/unreleased/-245fw5p.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Refactored markup and styling
ticket_id: "#245fw5p"
merge_request: 24
author: Azkya Khan
type: changed
14 changes: 14 additions & 0 deletions src/theme/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,18 @@ body {

ion-thumbnail > img {
object-fit: contain;
}

@media (prefers-color-scheme: dark) {
ion-chip > ion-icon {
color: var(--ion-color-dark);
}

.chip-outline {
border-color: var(--ion-color-dark);
}

ion-item {
--border-color: var(--ion-color-medium)
}
}
13 changes: 9 additions & 4 deletions src/views/OrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@

<div v-else v-for="id in getGroupList(ordersList.items)" :key="id" >
<div class="list-item list-header">
<ion-label>{{ getParentInformation(id, ordersList.items).parentProductName }}</ion-label>
<ion-item color="light" lines="none">
<ion-label>{{ getParentInformation(id, ordersList.items).parentProductName }}</ion-label>
</ion-item>

<div class="tablet" />

Expand All @@ -103,7 +105,7 @@
</div>
<div v-for="(item, index) in getGroupItems(id, ordersList.items)" :key="index">
<div class="list-item">
<ion-item lines="none">
<ion-item lines="none">
<ion-thumbnail slot="start">
<Image :src="item.imageUrl" />
</ion-thumbnail>
Expand Down Expand Up @@ -406,9 +408,12 @@ export default defineComponent({
--columns-desktop: 6;
}

.list-item :first-child ion-label {
word-break: break-all;
}

.list-header {
background-color: #F4F5F8;
padding-left: var(--spacer-sm);
background-color: var(--ion-color-light);
}

@media (min-width: 991px) {
Expand Down
6 changes: 4 additions & 2 deletions src/views/PurchaseOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<ion-page>
<ion-header :translucent="true">
<ion-toolbar>
<ion-menu-button slot="start" />
<ion-title>{{ $t("Purchase orders") }}</ion-title>
</ion-toolbar>
</ion-header>
Expand Down Expand Up @@ -61,7 +62,7 @@
</ion-page>
</template>
<script>
import { IonPage, IonHeader, IonToolbar, IonTitle, IonContent, IonItem, IonLabel, IonList, IonListHeader, IonNote, IonButton, IonSelect, IonSelectOption, IonIcon } from "@ionic/vue";
import { IonPage, IonHeader, IonToolbar, IonTitle, IonContent, IonItem, IonLabel, IonList, IonListHeader, IonNote, IonMenuButton, IonButton, IonSelect, IonSelectOption, IonIcon } from "@ionic/vue";
import { defineComponent } from "vue";
import { useRouter } from 'vue-router';
import { useStore } from "vuex";
Expand All @@ -80,6 +81,7 @@ export default defineComponent({
IonItem,
IonLabel,
IonButton,
IonMenuButton,
IonSelect,
IonSelectOption,
IonIcon,
Expand Down Expand Up @@ -159,7 +161,7 @@ main {
}

ion-button{
margin-top: var(--spacer-sm);
margin: var(--spacer-base) var(--spacer-sm);
}

label {
Expand Down
4 changes: 3 additions & 1 deletion src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<ion-page>
<ion-header :translucent="true">
<ion-toolbar>
<ion-menu-button slot="start" />
<ion-title>{{ $t("Settings") }}</ion-title>
</ion-toolbar>
</ion-header>
Expand Down Expand Up @@ -29,7 +30,7 @@
</template>

<script lang="ts">
import { IonButton, IonContent, IonHeader,IonIcon, IonItem, IonLabel, IonPage, IonTitle, IonToolbar, modalController } from '@ionic/vue';
import { IonButton, IonContent, IonHeader,IonIcon, IonItem, IonLabel, IonMenuButton, IonPage, IonTitle, IonToolbar, modalController } from '@ionic/vue';
import { defineComponent } from 'vue';
import { codeWorkingOutline, ellipsisVertical, personCircleOutline } from 'ionicons/icons'
import { mapGetters, useStore } from 'vuex';
Expand All @@ -45,6 +46,7 @@ export default defineComponent({
IonIcon,
IonItem,
IonLabel,
IonMenuButton,
IonPage,
IonTitle,
IonToolbar
Expand Down