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
32 changes: 16 additions & 16 deletions packages/admin-web-angular/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@

# Don't forget to update scripts/*.ts and src/environments/*.ts on changes!

HTTPS_SERVICES_ENDPOINT=https://localhost:5501
SERVICES_ENDPOINT=http://localhost:5500
GQL_ENDPOINT=http://localhost:5555/graphql
GQL_SUBSCRIPTIONS_ENDPOINT=ws://localhost:5050/subscriptions
HTTPS_SERVICES_ENDPOINT=https://bellem.cm:5501
SERVICES_ENDPOINT=http://bellem.cm:5500
GQL_ENDPOINT=http://bellem.cm:5555/graphql
GQL_SUBSCRIPTIONS_ENDPOINT=ws://bellem.cm:5050/subscriptions

# Insert below Google Maps API Key and make sure you restrict access to it
GOOGLE_MAPS_API_KEY=
GOOGLE_MAPS_API_KEY=AIzaSyDudKVRLfNoQFm9JFvGQkGfdxZAbgqXLDE

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

NO_INTERNET_LOGO=assets/images/ever-logo.svg

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
API_FILE_UPLOAD_URL=https://api.cloudinary.com/v1_1/evereq/upload
API_FILE_UPLOAD_URL=https://api.cloudinary.com/v1_1/bellem/image/upload

COMPANY_NAME=Ever Co. LTD
COMPANY_SITE_LINK=https://ever.co/
COMPANY_GITHUB_LINK=https://github.com/ever-co
COMPANY_FACEBOOK_LINK=https://www.facebook.com/evercoapp
COMPANY_TWITTER_LINK=https://twitter.com/evercoapp
COMPANY_LINKEDIN_LINK=https://www.linkedin.com/company/ever-co.
COMPANY_NAME=Bellem
COMPANY_SITE_LINK=https://bellem.cm/
COMPANY_GITHUB_LINK=https://github.com/bellem
COMPANY_FACEBOOK_LINK=https://www.facebook.com/bellemapp
COMPANY_TWITTER_LINK=https://twitter.com/bellemapp
COMPANY_LINKEDIN_LINK=https://www.linkedin.com/company/bellem.

GENERATE_PASSWORD_CHARSET=abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$_

CURRENCY_SYMBOL=$
CURRENCY_SYMBOL=XAF

DEFAULT_LANGUAGE=en-US
DEFAULT_LANGUAGE=fr-FR

# For maintenance micro service. Ever maintanance API URL: https://maintenance.ever.co/status
SETTINGS_APP_TYPE=admin
Expand Down
48 changes: 24 additions & 24 deletions packages/admin-web-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@
"IE 11"
],
"scripts": {
"config": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn ts-node -P tsconfig.commonjs.json ./scripts/configure.ts",
"ng:dev": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn ng",
"ng:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 yarn ng",
"conventional-changelog": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 conventional-changelog",
"config:dev": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config -- --environment=dev",
"config:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 yarn run config -- --environment=prod",
"start": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && ng serve",
"start:server:prod": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run build:prod && node --harmony ./dist/out-tsc/app.js",
"start:server:pm2": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 yarn run build:prod && node --harmony ./dist/out-tsc/packages/admin-web-angular/src/pm2bootstrap.js",
"build": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && yarn ng:dev build && yarn tsc",
"build:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=4096 yarn run config:prod && yarn ng:prod build -- --prod --aot=false --build-optimizer=false && yarn tsc",
"test": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && ng:dev test",
"test:coverage": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && rimraf coverage && yarn run test -- --code-coverage",
"lint": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && ng:dev lint",
"lint:fix": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && ng:dev lint ever-admin --fix",
"lint:styles": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && stylelint ./src/**/*.scss",
"lint:ci": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && yarn run lint && yarn run lint:styles",
"pree2e": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && webdriver-manager update --standalone false --gecko false",
"e2e": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && ng e2e",
"docs": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && compodoc -p src/tsconfig.app.json -d docs",
"docs:serve": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && compodoc -p src/tsconfig.app.json -d docs -s",
"release:changelog": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && yarn run conventional-changelog -- -p angular -i CHANGELOG.md -s",
"storybook": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && start-storybook -p 9001 -c .storybook",
"build-storybook": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 yarn run config:dev && build-storybook -c .storybook"
"config": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn ts-node -P tsconfig.commonjs.json ./scripts/configure.ts",
"ng:dev": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn ng",
"ng:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=8192 yarn ng",
"conventional-changelog": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 conventional-changelog",
"config:dev": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config -- --environment=dev",
"config:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=8192 yarn run config -- --environment=prod",
"start": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && ng serve",
"start:server:prod": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run build:prod && node --harmony ./dist/out-tsc/app.js",
"start:server:pm2": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=8192 yarn run build:prod && node --harmony ./dist/out-tsc/packages/admin-web-angular/src/pm2bootstrap.js",
"build": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && yarn ng:dev build && yarn tsc",
"build:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max_old_space_size=8192 yarn run config:prod && yarn ng:prod build -- --prod --aot=false --build-optimizer=false && yarn tsc",
"test": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && ng:dev test",
"test:coverage": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && rimraf coverage && yarn run test -- --code-coverage",
"lint": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && ng:dev lint",
"lint:fix": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && ng:dev lint ever-admin --fix",
"lint:styles": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && stylelint ./src/**/*.scss",
"lint:ci": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && yarn run lint && yarn run lint:styles",
"pree2e": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && webdriver-manager update --standalone false --gecko false",
"e2e": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && ng e2e",
"docs": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && compodoc -p src/tsconfig.app.json -d docs",
"docs:serve": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && compodoc -p src/tsconfig.app.json -d docs -s",
"release:changelog": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && yarn run conventional-changelog -- -p angular -i CHANGELOG.md -s",
"storybook": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && start-storybook -p 9001 -c .storybook",
"build-storybook": "cross-env NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 yarn run config:dev && build-storybook -c .storybook"
},
"dependencies": {
"@agm/core": "^1.1.0",
Expand Down
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 @@ -53,7 +53,7 @@ export class BasicInfoFormComponent implements OnInit, AfterViewInit {
constructor(
private readonly fb: FormBuilder,
private readonly _langTranslateService: TranslateService
) {}
) { }

get image() {
return this.form.get('image');
Expand All @@ -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 All @@ -113,9 +104,9 @@ export class BasicInfoFormComponent implements OnInit, AfterViewInit {
({ locale, value }) => {
return locale === usedLanguage
? {
locale: usedLanguage,
value: this.name.value,
}
locale: usedLanguage,
value: this.name.value,
}
: { locale, value };
}
);
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 @@ -19,20 +19,8 @@ export class ThemeSettingsComponent {
name: 'English',
},
{
value: 'bg-BG',
name: 'Bulgarian',
},
{
value: 'he-IL',
name: 'Hebrew',
},
{
value: 'ru-RU',
name: 'Russian',
},
{
value: 'es-ES',
name: 'Spanish',
value: 'fr-FR',
name: 'Francais',
},
];

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
Loading