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

Mobile app update #3

Merged
merged 2 commits into from
Jul 22, 2020
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
1 change: 1 addition & 0 deletions packages/common/src/interfaces/ILanguage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// TODO: add other locales

type ILanguage = 'fr-FR' | 'en-US';

export default ILanguage;
Expand Down
30 changes: 15 additions & 15 deletions packages/shop-mobile-ionic/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@
VERSION=1.0.0

# 'slides' | 'list'
PRODUCTS_VIEW_TYPE=slides
PRODUCTS_VIEW_TYPE=list

# 'popup' or 'page'
ORDER_INFO_TYPE=page

API_FILE_UPLOAD_URL=https://api.cloudinary.com/v1_1/evereq/upload

INVITE_BY_CODE_LOGO=assets/imgs/ever-logo.svg
NO_INTERNET_LOGO=assets/imgs/logo.png
NO_INTERNET_LOGO=assets/imgs/bellem_logo.png

COMPANY_NAME=Ever Co. LTD
COMPANY_NAME=BellEM Co. LTD

GOOGLE_MAPS_API_KEY=
GOOGLE_MAPS_API_KEY=AIzaSyAvUNNXFK3xlzKE21uNkSVM1wROVAjd_Ak

GOOGLE_ANALYTICS_API_KEY=
GOOGLE_ANALYTICS_API_KEY=AIzaSyAvUNNXFK3xlzKE21uNkSVM1wROVAjd_Ak
FAKE_UUID=

# Not secret MixPanel Token
MIXPANEL_API_KEY=

DEFAULT_LANGUAGE=en-US
DEFAULT_LOCALE=en-US
DEFAULT_LANGUAGE=fr-FR
DEFAULT_LOCALE=fr-FR

DELIVERY_TIME_MIN=30
DELIVERY_TIME_MAX=60

SUPPORT_NUMBER=0888888888
SUPPORT_NUMBER=690419637

STRIPE_PUBLISHABLE_KEY=

Expand All @@ -44,14 +44,14 @@ MAP_MERCHANT_ICON_LINK=http://maps.google.com/mapfiles/kml/pal3/icon21.png
MAP_USER_ICON_LINK=http://maps.google.com/mapfiles/kml/pal3/icon48.png
MAP_CARRIER_ICON_LINK=http://maps.google.com/mapfiles/kml/pal4/icon54.png

DEFAULT_LATITUDE=42.6459136
DEFAULT_LONGITUDE=23.3332736
DEFAULT_LATITUDE=4.094836
DEFAULT_LONGITUDE=9.743204

# Graphql endpoints for apollo services
GQL_ENDPOINT=http://localhost:5555/graphql
GQL_SUBSCRIPTIONS_ENDPOINT=ws://localhost:5050/subscriptions
SERVICES_ENDPOINT=http://localhost:5500
HTTPS_SERVICES_ENDPOINT=https://localhost:5501
GQL_ENDPOINT=http://bellem.cm:5555/graphql
GQL_SUBSCRIPTIONS_ENDPOINT=ws://bellem.cm:5050/subscriptions
SERVICES_ENDPOINT=http://bellem.cm:5500
HTTPS_SERVICES_ENDPOINT=https://bellem.cm:5501

FAKE_INVITE_ID=1ae9d04f9010d834f8906881
FAKE_INVITE_CITY=Ashdod
Expand All @@ -73,4 +73,4 @@ MERCHANT_IDS=[]

PORT=4201
WEB_MEMORY=4096
WEB_CONCURRENCY=1
WEB_CONCURRENCY=1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/shop-mobile-ionic/resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/shop-mobile-ionic/resources/ios/icon/icon-1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/shop-mobile-ionic/resources/ios/icon/icon-40.png
Binary file modified packages/shop-mobile-ionic/resources/ios/icon/icon-50.png
Binary file modified packages/shop-mobile-ionic/resources/ios/icon/icon-60.png
Binary file modified packages/shop-mobile-ionic/resources/ios/icon/icon-72.png
Binary file modified packages/shop-mobile-ionic/resources/ios/icon/icon-76.png
Binary file modified packages/shop-mobile-ionic/resources/ios/icon/icon.png
Binary file modified packages/shop-mobile-ionic/resources/ios/splash/Default-736h.png
Binary file modified packages/shop-mobile-ionic/resources/splash.png
32 changes: 16 additions & 16 deletions packages/shop-mobile-ionic/scripts/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,36 +89,36 @@ export const env: any = cleanEnv(
VERSION: str({ default: '1.0.0' }),

// 'slides' | 'list'
PRODUCTS_VIEW_TYPE: str({ default: 'slides' }),
PRODUCTS_VIEW_TYPE: str({ default: 'list' }),

// 'popup' or 'page'
ORDER_INFO_TYPE: str({ default: 'page' }),

API_FILE_UPLOAD_URL: str({
default: 'https://api.cloudinary.com/v1_1/evereq/upload',
default: 'https://api.cloudinary.com/v1_1/bellem/upload',
}),

INVITE_BY_CODE_LOGO: str({ default: 'assets/imgs/ever-logo.svg' }),
NO_INTERNET_LOGO: str({ default: 'assets/imgs/logo.png' }),
NO_INTERNET_LOGO: str({ default: 'assets/imgs/bellem_logo.png' }),

COMPANY_NAME: str({ default: 'Ever Co. LTD' }),
COMPANY_NAME: str({ default: 'BellEm. LTD' }),

GOOGLE_MAPS_API_KEY: str({ default: '' }),
GOOGLE_MAPS_API_KEY: str({ default: 'AIzaSyAvUNNXFK3xlzKE21uNkSVM1wROVAjd_Ak' }),

GOOGLE_ANALYTICS_API_KEY: str({ default: '' }),
GOOGLE_ANALYTICS_API_KEY: str({ default: 'AIzaSyAvUNNXFK3xlzKE21uNkSVM1wROVAjd_Ak' }),
FAKE_UUID: str({ default: uuid() }),

// Not secret MixPanel Token
MIXPANEL_API_KEY: str({ default: '' }),

DEFAULT_LANGUAGE: str({ default: 'en-US' }),
DEFAULT_LANGUAGE: str({ default: 'fr-FR' }),

DEFAULT_LOCALE: str({ default: 'en-US' }),
DEFAULT_LOCALE: str({ default: 'fr-FR' }),

DELIVERY_TIME_MIN: num({ default: 30 }),
DELIVERY_TIME_MAX: num({ default: 60 }),

SUPPORT_NUMBER: str({ default: '0888888888' }),
SUPPORT_NUMBER: str({ default: '690419637' }),

STRIPE_PUBLISHABLE_KEY: str({ default: '' }),

Expand All @@ -138,27 +138,27 @@ export const env: any = cleanEnv(
default: 'http://maps.google.com/mapfiles/kml/pal4/icon54.png',
}),

DEFAULT_LATITUDE: num({ default: 42.6459136 }),
DEFAULT_LONGITUDE: num({ default: 23.3332736 }),
DEFAULT_LATITUDE: num({ default: 4.094836 }),
DEFAULT_LONGITUDE: num({ default: 9.743204 }),

// Graphql endpoints for apollo services
GQL_ENDPOINT: str({ default: 'http://localhost:5555/graphql' }),
GQL_ENDPOINT: str({ default: 'http://bellem.cm:5555/graphql' }),
GQL_SUBSCRIPTIONS_ENDPOINT: str({
default: 'ws://localhost:5050/subscriptions',
}),
SERVICES_ENDPOINT: str({ default: 'http://localhost:5500' }),
HTTPS_SERVICES_ENDPOINT: str({ default: 'https://localhost:5501' }),
SERVICES_ENDPOINT: str({ default: 'http://bellem.cm:5500' }),
HTTPS_SERVICES_ENDPOINT: str({ default: 'https://bellem.cm:5501' }),

FAKE_INVITE_ID: str({ default: '1ae9d04f9010d834f8906881' }),
FAKE_INVITE_CITY: str({ default: 'Sofia' }),
FAKE_INVITE_CITY: str({ default: 'Douala' }),
FAKE_INVITE_POSTCODE: str({ default: '1700' }),
FAKE_INVITE_ADDRESS: str({ default: 'Simeonovsko shose' }),
FAKE_INVITE_HOUSE: str({ default: '104' }),
FAKE_INVITE_CREATED_AT: str({ default: '2018-05-02T14:50:55.658Z' }),
FAKE_INVITE_UPDATED_AT: str({ default: '2018-05-02T14:50:55.658Z' }),
FAKE_INVITE_APARTMENT: str({ default: '3' }),
FAKE_INVITE_CODE: num({ default: 8321 }),
FAKE_INVITE_COUNTRY_ID: num({ default: 21 }),
FAKE_INVITE_COUNTRY_ID: num({ default: 46 }),

// For maintenance micro service. Ever maintanance API URL: https://maintenance.ever.co/status
SETTINGS_APP_TYPE: str({ default: 'shop-mobile' }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
color: white;
padding: 20px;

background: $brand;
background: #ffffff;

display: flex;
align-items: center;
Expand Down
11 changes: 4 additions & 7 deletions packages/shop-mobile-ionic/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,20 @@ export class AppComponent {

_translateService.addLangs([
'en-US',
'bg-BG',
'he-IL',
'ru-RU',
'es-ES',
'fr-FR'
]);

_translateService.setDefaultLang('en-US');
_translateService.setDefaultLang('fr-FR');

const browserLang = _translateService.getBrowserLang();

if (this.defaultLanguage) {
_translateService.use(this.defaultLanguage);
} else {
_translateService.use(
browserLang.match(/en-US|bg-BG|he-HE|ru-RU|es-ES/)
browserLang.match(/en-US|fr-FR/)
? browserLang
: 'en-US'
: 'fr-FR'
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
<ion-list>
<ion-item-group>
<ion-menu-toggle [autoHide]="true">

<ion-item
routerLink="/categories"
routerDirection="root"
routerLinkActive="activated"
>
<ion-icon ios="ios-apps" md="md-apps"></ion-icon>
<ion-label>{{
'SIDE_MENU.GROUPS.NO_TITLE.ITEMS.CATEGORIES'
| translate
}}</ion-label>
</ion-item>
<!--
<ion-item
routerLink="/products"
routerDirection="root"
Expand All @@ -20,6 +33,7 @@
| translate
}}</ion-label>
</ion-item>
-->
<ion-item
routerLink="/orders-history"
routerDirection="root"
Expand Down Expand Up @@ -83,6 +97,18 @@
| translate
}}</ion-label>
</ion-item>

<ion-item
routerLink="/profile"
routerDirection="root"
routerLinkActive="activated"
>
<ion-icon ios="ios-person" md="md-person"></ion-icon>
<ion-label>{{
'SIDE_MENU.GROUPS.SETTINGS.ITEMS.PROFILE'
| translate
}}</ion-label>
</ion-item>
</ion-menu-toggle>
</ion-item-group>
<ion-item-group>
Expand All @@ -93,6 +119,7 @@
</ion-item-divider>

<ion-menu-toggle [autoHide]="true">
<!--
<ion-item
routerLink="/info/help"
routerDirection="root"
Expand All @@ -103,13 +130,15 @@
'SIDE_MENU.GROUPS.INFO.ITEMS.FAQ' | translate
}}</ion-label>
</ion-item>
-->
<ion-item (click)="callUs()">
<ion-icon name="call"></ion-icon>
<ion-label>{{
'SIDE_MENU.GROUPS.NO_TITLE.ITEMS.CALL_US'
| translate
}}</ion-label>
</ion-item>
<!--
<ion-item
routerLink="/info/about"
routerDirection="root"
Expand All @@ -120,6 +149,7 @@
'SIDE_MENU.GROUPS.INFO.ITEMS.ABOUT_US' | translate
}}</ion-label>
</ion-item>
-->
</ion-menu-toggle>
</ion-item-group>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class ProductComponent {
(product) => product.locale === this.store.language
) ||
this.orderProduct.product.images.find(
(product) => product.locale === 'en-US'
(product) => product.locale === 'fr-FR'
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

<h1 class="connection-error-title">
{{ 'CONNECTION_ERROR_VIEW.TITLE' | translate }}
<br />
{{descriptionGQL}}
</h1>

<h1 class="connection-error-description">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import { environment } from 'environments/environment';
export class ConnectionLostPage implements OnInit {
noInternetLogo: string;
companyName: string;
descriptionGQL: string;
constructor() {
this.noInternetLogo = environment.NO_INTERNET_LOGO;
this.companyName = environment.COMPANY_NAME;
this.descriptionGQL = environment.GQL_ENDPOINT;
}

ngOnInit() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class ByLocationPage implements OnInit, OnDestroy {
public house: number;
public streetAddress: string;
public city: string;
public country: number = Country.IL;
public country: number = Country.CM;
public detectingLocation: boolean = true;
public showTextarea: boolean = false;
public notes: string;
Expand Down Expand Up @@ -212,7 +212,8 @@ export class ByLocationPage implements OnInit, OnDestroy {
this.store.backToDetails = null;
return;
}
this.router.navigate(['/products'], { skipLocationChange: true });
//this.router.navigate(['/products'], { skipLocationChange: true });
this.router.navigate(['/categories'], { skipLocationChange: true });
}

async goToDetailsPage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export class InviteModuleGuard implements CanLoad {
this.store.userId != null ||
this.store.registrationSystem === RegistrationSystem.Disabled
) {
this.router.navigate(['products']);
//this.router.navigate(['products']);
this.router.navigate(['categories']);
return false;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"TITLE": "Select Language"
}
},
"he-IL": {
"fr-FR": {
"LANGUAGE_PAGE": {
"TITLE": "בחירת שפה"
"TITLE": "Slectionner une Langue"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,12 @@
<ion-radio value="en-US"></ion-radio>
</ion-item>
<ion-item>
<ion-label>{{ 'BULGARIAN' | translate }}</ion-label>
<ion-radio value="bg-BG"></ion-radio>
</ion-item>
<ion-item>
<ion-label>{{ 'HEBREW' | translate }}</ion-label>
<ion-radio value="he-IL"></ion-radio>
</ion-item>
<ion-item>
<ion-label>{{ 'RUSSIAN' | translate }}</ion-label>
<ion-radio value="ru-RU"></ion-radio>
</ion-item>
<ion-item>
<ion-label>{{ 'SPANISH' | translate }}</ion-label>
<ion-radio value="es-ES"></ion-radio>
</ion-item>
<ion-label>{{ 'FRENCH' | translate }}</ion-label>
<ion-radio
value="fr-FR"
(ionSelect)="switchLanguage('fr-FR')"
></ion-radio>
</ion-item>
</ion-radio-group>
</ion-list>
</ion-content>
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export class MerchantsPage implements OnDestroy {

private async loadCloseMerchants() {
const location = await this.getLocation();
const category = this.store.category;

this.merchants = await this.geoLocationsMerchantsService
.getCoseMerchants({ loc: location })
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<e-cu-order-info-header (back)="undo()"></e-cu-order-info-header>
<e-cu-order-info-header (back)="goToCategoriesPage()"></e-cu-order-info-header>

<ion-content
class="info-container brand-dark"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export class OrderInfoPage implements OnInit, OnDestroy {
this.router.navigateByUrl('/products');
}

goToCategoriesPage() {
this.router.navigateByUrl('/categories');
}

public get isCustomerActive() {
return this.currentStatus >= DeliveryStatus.Customer;
}
Expand Down
Loading