Merge branch 'fashion-logica' of https://git.hlcompany.ru/git/usersite into fashion-logica

This commit is contained in:
gofnnp 2022-09-29 21:47:34 +04:00
commit 2ca121cbac
12 changed files with 134 additions and 43 deletions

44
Jenkinsfile vendored
View File

@ -1,27 +1,31 @@
env.HL_BUILD_MODE = "jenkins"
node('Rubidium'){
node('Lithium'){
stage('get new version to repo') {
dir('/opt/usersite-build'){
checkout([$class: 'GitSCM', branches: [[name: '*/fashion-logica']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'jenkins_all', url: 'https://git.hlcompany.ru/git/usersite.git']]])
checkout scm
if (lastCommitIsBumpCommit()) {
currentBuild.result = 'ABORTED'
error('Последний коммит - результат сборки jenkins')
}
}
stage('build project') {
// sh label: '', script: 'systemctl stop lkcrm4retail'
// dir('/opt/SynthVisionBox/node'){
// sh label: '', script: 'npm install --only=prod'
// sh label: '', script: 'node db_updater.js'
// }
sh "git checkout ${env.BRANCH_NAME}"
sh "git checkout -- ."
dir('/opt/usersite-build'){
// sh label: '', script: 'npm i'
// sh label: '', script: 'npm run build'
sh label: '', script: 'ng build'
}
// sh label: '', script: 'systemctl start lkcrm4retail'
sh "git pull"
//sh "git submodule update --init --recursive"
//sh "git submodule update --remote --merge"
}
stage("build and publish"){
sh label: '', script: 'npm i'
sh label: '', script: 'npm run build'
}
}
}
private boolean lastCommitIsBumpCommit() {
lastCommit = sh([script: 'git log -1', returnStdout: true])
if (lastCommit.contains("Author: jenkins")) {
return true
} else {
return false
}
}

View File

@ -1,4 +1,5 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
@ -10,6 +11,7 @@
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
@ -17,7 +19,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "/var/www/fashion-logica",
"outputPath": "/var/www/html/lk.crm4retail.ru/fashion-logica",
"baseHref": "/",
"index": "src/index.html",
"main": "src/main.ts",

View File

@ -32,6 +32,7 @@ import { QRCodeModule } from 'angularx-qrcode';
import { ShareButtonsModule } from 'ngx-sharebuttons/buttons';
import { ShareIconsModule } from 'ngx-sharebuttons/icons';
import { MessagingService } from './services/messaging.service';
import { NotFoundComponent } from './pages/not-found/not-found.component';
@NgModule({
declarations: [
@ -47,7 +48,8 @@ import { MessagingService } from './services/messaging.service';
OrderInfoComponent,
FooterButtonsComponent,
UserDataComponent,
RefSystemComponent
RefSystemComponent,
NotFoundComponent
],
imports: [
BrowserModule,
@ -56,7 +58,8 @@ import { MessagingService } from './services/messaging.service';
{
path: '**',
component: MainComponent
}
},
// { path: '**', component: NotFoundComponent }
]),
InputMaskModule,
ProgressSpinnerModule,

View File

@ -0,0 +1,8 @@
<div class="not-found-page">
<app-navbar></app-navbar>
<div class="not-found-page__container">
<h1>404</h1>
<p>Упс, что-то пошло не так!</p>
<button (click)="routeHome()">Вернуться на главную</button>
</div>
</div>

View File

@ -0,0 +1,28 @@
:host {
.not-found-page {
&__container {
text-align: center;
margin-top: 32px;
h1 {
font-size: 108px;
font-weight: 600;
color: #09467f;
}
p {
margin: 16px 0;
font-size: 14px;
}
button {
background-color: #09467f;
color: #fff;
border-radius: 8px;
display: flex;
justify-content: center;
align-items: center;
padding: 12px;
margin: 0 auto;
border: 0;
}
}
}
}

View File

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NotFoundComponent } from './not-found.component';
describe('NotFoundComponent', () => {
let component: NotFoundComponent;
let fixture: ComponentFixture<NotFoundComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ NotFoundComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(NotFoundComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-not-found',
templateUrl: './not-found.component.html',
styleUrls: ['./not-found.component.scss']
})
export class NotFoundComponent implements OnInit {
constructor(private router: Router) { }
ngOnInit(): void {
}
routeHome() {
this.router.navigate(['/']);
}
}

View File

@ -9,12 +9,13 @@ export const environment = {
systemId: 'g6zyv8tj53w28ov7cl',
defaultUrl: 'https://fashionlogica.lk.crm4retail.ru',
firebase: {
apiKey: "AIzaSyCujHg9GtN8Uxi-JcCN8zggvXlfNQRKc04",
authDomain: "push-notification-test2-56dac.firebaseapp.com",
projectId: "push-notification-test2-56dac",
storageBucket: "push-notification-test2-56dac.appspot.com",
messagingSenderId: "1004369687552",
appId: "1:1004369687552:web:a6cc20625e05520a37d4e5"
apiKey: "AIzaSyCnKvln5itnrBj62POCPHxshAN_Vmd0zds",
authDomain: "fashionlogicanotification.firebaseapp.com",
projectId: "fashionlogicanotification",
storageBucket: "fashionlogicanotification.appspot.com",
messagingSenderId: "99855572145",
appId: "1:99855572145:web:7548c189d61b3bcc92d690",
measurementId: "G-RQF97ZK7R1"
},
version: packageJson.version,
}

View File

@ -9,12 +9,13 @@ export const environment = {
systemId: 'g6zyv8tj53w28ov7cl',
defaultUrl: 'http://192.168.0.179:4200',
firebase: {
apiKey: "AIzaSyCujHg9GtN8Uxi-JcCN8zggvXlfNQRKc04",
authDomain: "push-notification-test2-56dac.firebaseapp.com",
projectId: "push-notification-test2-56dac",
storageBucket: "push-notification-test2-56dac.appspot.com",
messagingSenderId: "1004369687552",
appId: "1:1004369687552:web:a6cc20625e05520a37d4e5"
apiKey: 'AIzaSyCnKvln5itnrBj62POCPHxshAN_Vmd0zds',
authDomain: 'fashionlogicanotification.firebaseapp.com',
projectId: 'fashionlogicanotification',
storageBucket: 'fashionlogicanotification.appspot.com',
messagingSenderId: '99855572145',
appId: '1:99855572145:web:7548c189d61b3bcc92d690',
measurementId: 'G-RQF97ZK7R1',
},
version: packageJson.version,
};

View File

@ -2,12 +2,13 @@ importScripts('https://www.gstatic.com/firebasejs/7.4.1/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/7.4.1/firebase-messaging.js');
firebase.initializeApp({
apiKey: "AIzaSyCujHg9GtN8Uxi-JcCN8zggvXlfNQRKc04",
authDomain: "push-notification-test2-56dac.firebaseapp.com",
projectId: "push-notification-test2-56dac",
storageBucket: "push-notification-test2-56dac.appspot.com",
messagingSenderId: "1004369687552",
appId: "1:1004369687552:web:a6cc20625e05520a37d4e5"
apiKey: "AIzaSyCnKvln5itnrBj62POCPHxshAN_Vmd0zds",
authDomain: "fashionlogicanotification.firebaseapp.com",
projectId: "fashionlogicanotification",
storageBucket: "fashionlogicanotification.appspot.com",
messagingSenderId: "99855572145",
appId: "1:99855572145:web:7548c189d61b3bcc92d690",
measurementId: "G-RQF97ZK7R1"
});
const messaging = firebase.messaging();

View File

@ -2,7 +2,7 @@
<html lang="ru">
<head>
<meta charset="utf-8">
<title>Fashion logica</title>
<title>Fashionlogica</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="./assets/icons/apple-icon-180x180.png">

View File

@ -56,5 +56,5 @@
"purpose": "maskable any"
}
],
"gcm_sender_id": "1004369687552"
"gcm_sender_id": "99855572145"
}