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

Beta 1 dev #1262

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Next Next commit
Initial bellem setup
  • Loading branch information
lemagnifick committed Jul 15, 2020
commit b30bd01d25d7fb3d695ef993ae5978260077d771
4 changes: 2 additions & 2 deletions packages/admin-web-angular/scripts/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export const env: Env = cleanEnv(

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

DEFAULT_LATITUDE: num({ default: 42.6459136 }),
DEFAULT_LONGITUDE: num({ default: 23.3332736 }),
DEFAULT_LATITUDE: num({ default: 4.0850277 }),
DEFAULT_LONGITUDE: num({ default: 9.7535913 }),

NO_INTERNET_LOGO: str({ default: 'assets/images/ever-logo.svg' }),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class FileUploaderComponent {
fileItem: any,
form: FormData
): any => {
form.append('upload_preset', 'everbie-products-images');
form.append('upload_preset', 'upload_preset');

let tags = 'myphotoalbum';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,14 @@ export class BasicInfoFormComponent implements OnInit, AfterViewInit {
get usedLanguage() {
const usedLanguage = this._langTranslateService.currentLang;
switch (usedLanguage) {
case 'fr-Fr':
return 'fr-FR';

case 'en-US':
return 'en-US';

case 'bg-BG':
return 'bg-BG';

case 'he-IL':
return 'he-IL';

case 'ru-RU':
return 'ru-RU';

case 'es-ES':
return 'es-ES';

default:
return 'en-US';
return 'fr-FR';
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class IsAvailableCheckBox implements ViewCell, OnInit {
this.isChecked = this.rowData.isProductAvailable;
this.wareHouseId = this.rowData.storeId;
this.productId = this.rowData.product.id;
console.warn(this.rowData);
}

async clickHandler() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ export class WarehouseManageTabsComponent {
}

get validForm() {
return this.form.valid && this.paymentsSettingsForm.isPaymentValid;
return (
this.form.valid &&
this.contactInfoForm.validForm &&
this.paymentsSettingsForm.isPaymentValid &&
this.paymentsSettingsForm.isCashPaymentEnabled
);
}

get deliveryAreas() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,11 @@
>. {{ 'FOOTER_VIEW.ALL_RIGHTS_RESERVED' | translate }}.</span
>
<div class="socials">
<a
href="{{ companyGithubLink }}"
target="_blank"
class="ion ion-logo-github"
></a>
<a
href="{{ companyFacebookLink }}"
target="_blank"
class="ion ion-logo-facebook"
></a>
<a
href="{{ companyTwitterLink }}"
target="_blank"
class="ion ion-logo-twitter"
></a>
<a
href="{{ companyLinkedinLink }}"
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ <h6>LANGUAGE</h6>
{{ lang.name }}</option
>
</select>
</div>
<!-- </div>

<div class="switcher">
<ngx-layout-direction-switcher
[vertical]="true"
></ngx-layout-direction-switcher>
</div> -->
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,12 @@ export class ThemeSettingsComponent {

languages = [
{
value: 'en-US',
name: 'English',
},
{
value: 'bg-BG',
name: 'Bulgarian',
},
{
value: 'he-IL',
name: 'Hebrew',
},
{
value: 'ru-RU',
name: 'Russian',
value: 'fr-FR',
name: 'Francais',
},
{
value: 'es-ES',
name: 'Spanish',
value: 'en-US',
name: 'English',
},
];

Expand Down Expand Up @@ -64,7 +52,7 @@ export class ThemeSettingsComponent {
];

currentTheme = 'everlight';
defaultLanguage = '';
defaultLanguage = 'fr-FR';

constructor(
protected stateService: StateService,
Expand All @@ -73,17 +61,15 @@ export class ThemeSettingsComponent {
) {
this.defaultLanguage = environment['DEFAULT_LANGUAGE'];

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

const browserLang = translate.getBrowserLang();
if (this.defaultLanguage) {
translate.use(this.defaultLanguage);
} else {
translate.use(
browserLang.match(/en-US|bg-BG|he-IL|ru-RU|es-ES/)
? browserLang
: 'en-US'
browserLang.match(/fr-FR|en-US/) ? browserLang : 'fr-FR'
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 class="value">
: ''
"
>
${{
XAF{{
totalInfo.revenue | myNumberWithCommas
}}
</span>
Expand Down Expand Up @@ -216,7 +216,7 @@ <h2 class="value">
: ''
"
>
${{
XAF{{
todayInfo.revenue | myNumberWithCommas
}}
</span>
Expand Down Expand Up @@ -259,15 +259,17 @@ <h2 class="value">
<ea-ecommerce-charts
[orders]="chartPanelOrders"
[isOrdersLoad]="isChartPanelOrdersLoad"
></ea-ecommerce-charts>
>
</ea-ecommerce-charts>
</div>
</div>
</div>

<div class="col-3">
<ea-dashboard-select-store
[stores]="stores"
(selectedStoreEmitter)="onSelectStore($event)"
></ea-dashboard-select-store>
(selectedStoreEmitter)="onSelectStore(XAFevent)"
>
</ea-dashboard-select-store>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h4>

<h4 class="text-danger" *ngIf="order?.isCancelled">
{{
'ORDER_VIEW.ORDER_PRODUCT_INFO.THE_ORDER_IS_CANCELED'
'ORDER_VIEW.ORDER_PRODUCT_INFO.THE_ORDER_IS_CANCEL'
| translate
}}
</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,10 @@ export class ProductComponent implements OnInit, OnDestroy {

getLanguageFullName(langAbbreviation: string) {
switch (langAbbreviation) {
case 'fr-FR':
return 'Francais';
case 'en-US':
return 'English';
case 'bg-BG':
return 'Български';
case 'he-IL':
return 'עברית';
case 'ru-RU':
return 'Русский';
case 'es-ES':
return 'Spanish';
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ServerDownPage implements OnDestroy {
private serverConnectionService: ServerConnectionService
) {
const browserLang = translate.getBrowserLang();
translate.use(browserLang.match(/en|bg|he|ru/) ? browserLang : 'en-US');
translate.use(browserLang.match(/en|fr/) ? browserLang : 'fr-FR');

this.noInternetLogo = environment['NO_INTERNET_LOGO'];
this.testConnection();
Expand Down
6 changes: 6 additions & 0 deletions packages/admin-web-angular/src/app/pages/pages.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export class PagesComponent {
link: '/dashboard',
pathMatch: 'prefix',
},
{
title: this.getTranslation('MENU_VIEW.ORDERS'),
icon: 'shopping-bag-outline',
link: '/orders',
pathMatch: 'prefix',
},
{
title: this.getTranslation('MENU_VIEW.STORES'),
icon: 'home-outline',
Expand Down
8 changes: 5 additions & 3 deletions packages/admin-web-angular/src/assets/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ADD_PRODUCTS": "Add products",
"REMOVE_PRODUCTS": "Remove Products",
"CANCEL_ORDER": "Cancel Order",
"THE_ORDER_IS_CANCELED": "The order is canceled",
"THE_ORDER_IS_CANCEL": "The order is cancel",
"THE_ORDER_IS_GIVEN_TO_CARRIER": "The order is given to carrier.",
"THE_ORDER_IS_DELIVERED": "The order is delivered.",
"ADD_PRODUCTS_MODAL": "Add Products",
Expand Down Expand Up @@ -118,12 +118,12 @@
},
"HEADER_VIEW": {
"ADMIN": "Admin",
"EVER": "Ever",
"EVER": "Bellem",
"PROFILE": "Profile",
"LOG_OUT": "Log out"
},
"FOOTER_VIEW": {
"COPY_RIGHT": "Copyright © 2016-present",
"COPY_RIGHT": "Copyright © 2020",
"ALL_RIGHTS_RESERVED": "All rights reserved"
},
"PROFILE_VIEW": {
Expand Down Expand Up @@ -1001,6 +1001,7 @@
},
"MENU_VIEW": {
"DASHBOARD": "Dashboard",
"ORDERS": "Orders",
"STORES": "Stores",
"PRODUCTS": {
"PRODUCTS": "Products",
Expand Down Expand Up @@ -1126,6 +1127,7 @@
"LANGUAGE": "Language",
"BROWSE": "Browse",
"ENGLISH": "English",
"FRENCH": "French",
"HEBREW": "Hebrew",
"RUSSIAN": "Russian",
"BULGARIAN": "Bulgarian",
Expand Down
3 changes: 2 additions & 1 deletion packages/admin-web-angular/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ADD_PRODUCTS": "Add products",
"REMOVE_PRODUCTS": "Remove Products",
"CANCEL_ORDER": "Cancel Order",
"THE_ORDER_IS_CANCELED": "The order is canceled",
"THE_ORDER_IS_CANCEL": "The order is cancel",
"THE_ORDER_IS_GIVEN_TO_CARRIER": "The order is given to carrier.",
"THE_ORDER_IS_DELIVERED": "The order is delivered.",
"ADD_PRODUCTS_MODAL": "Add Products",
Expand Down Expand Up @@ -1126,6 +1126,7 @@
"LANGUAGE": "Language",
"BROWSE": "Browse",
"ENGLISH": "English",
"FRENCH": "French",
"HEBREW": "Hebrew",
"RUSSIAN": "Russian",
"BULGARIAN": "Bulgarian",
Expand Down
Loading