Skip to content

Commit

Permalink
Adds automations demo page
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Lanzilotto committed Jan 7, 2024
1 parent 2771c25 commit 40dff79
Show file tree
Hide file tree
Showing 9 changed files with 431 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ import { HomeNewsFeedModalComponent } from './home-components/home-news-feed/hom
import { AutomationsComponent } from './automations/automations.component';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { HomeCdsComponent } from './home-components/home-cds/home-cds.component';
import { AutomationStaticComponent } from './static-pages/automation-static/automation-static.component';



Expand Down Expand Up @@ -643,7 +644,8 @@ const appInitializerFn = (appConfig: AppConfigService, brandService: BrandServic
OnboardingWelcomeComponent,
HomeNewsFeedModalComponent,
AutomationsComponent,
HomeCdsComponent
HomeCdsComponent,
AutomationStaticComponent
],
imports: [
TooltipModule.forRoot(CutomTooltipOptions as TooltipOptions),
Expand Down
6 changes: 5 additions & 1 deletion src/app/app.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import { ActivitiesStaticComponent } from './static-pages/activities-static/acti
import { HoursStaticComponent } from './static-pages/hours-static/hours-static.component';
import { DepartmentsStaticComponent } from './static-pages/departments-static/departments-static.component';
import { ContactsStaticComponent } from './static-pages/contacts-static/contacts-static.component';
import { AutomationStaticComponent } from './static-pages/automation-static/automation-static.component';

import { AnalyticsComponent } from './analytics/analytics.component';
import { PanoramicaComponent } from './analytics/panoramica/panoramica.component';
Expand Down Expand Up @@ -150,6 +151,7 @@ import { AutomationsComponent } from './automations/automations.component';




const routes: Routes = [

// Lazy loading
Expand Down Expand Up @@ -458,7 +460,9 @@ const routes: Routes = [
{ path: 'project/:projectid/hours-demo', component: HoursStaticComponent, canActivate: [AuthGuard] },

// AUTOMATIONS
{ path: 'project/:projectid/automations', component: AutomationsComponent, canActivate: [AuthGuard]},
{ path: 'project/:projectid/automations', component: AutomationsComponent, canActivate: [AuthGuard, ProjectProfileGuard]},
{ path: 'project/:projectid/automations-demo', component: AutomationStaticComponent, canActivate: [AuthGuard]},


// KNOWLEDGE BASES
{ path: 'project/:projectid/knowledge-bases', component: KnowledgeBasesComponent, canActivate: [AuthGuard]},
Expand Down
2 changes: 1 addition & 1 deletion src/app/automations/automations.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ p {
display: flex;
flex-direction: column;
align-items: center;
padding: 80px;
padding: 80px 100px 80px 80px;

.material-icons-outlined {
font-size: 60px;
Expand Down
17 changes: 17 additions & 0 deletions src/app/core/project-profile.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ export class ProjectProfileGuard implements CanActivate {
// console.log('[PROJECT-PROFILE-GUARD] (NEW WF) -> Plan type', type, 'Plan name: ', planName, ' - userIsAuthorized: ', this.userIsAuthorized);
// console.log('[PROJECT-PROFILE-GUARD] (NEW WF) -> PAGE IS ACTIVITIES', url.indexOf('/activities') !== -1);
}

if ((planName !== PLAN_NAME.C && url.indexOf('/automations') !== -1)) {
this.userIsAuthorized = false;
// console.log('[PROJECT-PROFILE-GUARD] (NEW WF) -> Plan type', type, 'Plan name: ', planName, ' - userIsAuthorized: ', this.userIsAuthorized);
// console.log('[PROJECT-PROFILE-GUARD] (NEW WF) -> PAGE IS ACTIVITIES', url.indexOf('/activities') !== -1);
}


// console.log('[PROJECT-PROFILE-GUARD] (NEW WF) Plan type', type, ' - userIsAuthorized ', this.userIsAuthorized);
}
}
Expand Down Expand Up @@ -210,6 +218,15 @@ export class ProjectProfileGuard implements CanActivate {
} else {
// console.log('[PROJECT-PROFILE-GUARD] (NEW WF) -> PAGE IS ACTIVITIES', url.indexOf('/activities') !== -1);
}

if ((planName !== PLAN_NAME.C && url.indexOf('/automations') !== -1)) {
this.userIsAuthorized = false;
console.log('[PROJECT-PROFILE-GUARD] (NEW WF) -> Plan type', type, 'Plan name: ', planName, ' - userIsAuthorized: ', this.userIsAuthorized);
console.log('[PROJECT-PROFILE-GUARD] (NEW WF) -> PAGE IS ACTIVITIES', url.indexOf('/automations') !== -1);

} else {
// console.log('[PROJECT-PROFILE-GUARD] (NEW WF) -> PAGE IS ACTIVITIES', url.indexOf('/activities') !== -1);
}
} else if (isActiveSubscription === false) {
// console.log('[PROJECT-PROFILE-GUARD] -> (NEW WF) isActiveSubscription 2', isActiveSubscription);
this.userIsAuthorized = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

<p style="z-index: 1050;position: relative; padding-left:30px" class="navbar-brand"
[ngStyle]="{'margin-top':isChromeVerGreaterThan100 === true ? '-64px' : '6px' }">
<!-- {{ 'CannedResponses.CannedResponses' | translate }} -->
Last Automations
</p>

<div class="main-content" style="padding-top:0px">
<div class="container-fluid">

<div class="row col-container">

<div class="col-md-5 left-side-in-col-container">

<div class="left-div-padding">
<div class="row">
<div class="col-sm-12">
<h2 class="demopage-title">

<!-- {{ "AvailableWithTheProPlan" | translate }} -->
{{ "AvailableFromThePlan" | translate: tparams }}

</h2>
</div>
</div>

<div class="row">
<div class="col-sm-12">
<h3 class="demopage-subtitle">

{{ "HavingCannedResponsesCanPutYouGreatAdvantage" | translate }}
<!-- <br>
{{ "CRMRecordsCustomerContactInformation" | translate }}. -->
</h3>
</div>
</div>

<div class="row">
<div class="col-sm-12">
<div style="text-align: center;">
<!-- (click)="goToPricing()" -->
<button type="button" class="btn outline-btn-analytics btn-lg" style="padding:11px 22px"
(click)="goToPricing()">

<span> {{ 'UpgradeNow' | translate }} </span>

</button>
</div>
</div>
</div>
</div>
</div>

<div class="col-md-7 right-side-in-col-container">
<div style="max-width:780px;margin:auto">
<div class="card" style="box-shadow: 0 14px 30px 0 rgba(60,72,91,0.22); border-radius:10px;">
<div class="card-content">
<div class="row">
<div class="col-md-12">
<img src="assets/img/automations-static.jpeg">
<!-- <ng-image-slider #nav
[images]="imageObject"
[imageSize]="{width: 766, height: 410}"
[infinite]="true"
[manageImageRatio]="true"
[showArrow]="false"
[autoSlide]="1">
</ng-image-slider> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@

// @import './src/assets/css/slick/slick';
// @import './src/assets/css/slick/slick-theme';


.outline-btn-analytics {
background-color: transparent;
color: #1e88e5;
border-radius: 40px;
padding: 18px 36px;
line-height: 1.33em;
border: 2px solid #1e88e5;
font-weight: 500;
font-size: 14px;
}

.outline-btn-analytics:hover {
color: #fff;
background-color: #1e88e5;
}



.demopage-title {
margin-top:10px;
margin-bottom:5px;
font-family:'Poppins','Roboto', 'Arial', sans-serif;
text-align:center;
color: #1e88e5;
line-height: 41px;
font-weight: 400;
}

.demopage-subtitle {
margin-top: 5px !important;
font-family: 'Poppins','Roboto', 'Arial', sans-serif;
text-align:center;
}

// to 992
@media (max-width: 992px) {
.left-div-padding {
padding-top:10px;
}

}

@media (min-width:992px) {
.col-container {
display: flex;
// display: table;
}

.left-side-in-col-container {
float: none;
// display: table-cell;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-ms-flex-align: center;
-webkit-align-items: center;
-webkit-box-align: center;
align-items: center;
}

.right-side-in-col-container {
float: none;
display: table-cell;
}
}


@media (min-width:992px) and (max-width: 1340px){

.left-side-in-col-container {
width: 35% !important;
}

.right-side-in-col-container {
width: 65% !important;
}

.demopage-title {
font-size: 3rem !important;
}

.demopage-subtitle {
font-size: 1.5em !important;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { AutomationStaticComponent } from './automation-static.component';

describe('AutomationStaticComponent', () => {
let component: AutomationStaticComponent;
let fixture: ComponentFixture<AutomationStaticComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AutomationStaticComponent ]
})
.compileComponents();

fixture = TestBed.createComponent(AutomationStaticComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Loading

0 comments on commit 40dff79

Please sign in to comment.