Skip to content

Commit

Permalink
Merge branch 'branch-2.4.0' into feature/WFNEWS-2499
Browse files Browse the repository at this point in the history
  • Loading branch information
ssylver93 authored Dec 13, 2024
2 parents 739fa66 + 9b6e31e commit d409a7f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
INFOPLIST_KEY_CFBundleDisplayName = "BC Wildfire";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 2.4.0;
MARKETING_VERSION = 3.1.8;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = ca.bc.gov.WildfireInformation;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -391,7 +391,7 @@
INFOPLIST_KEY_CFBundleDisplayName = "BC Wildfire";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 2.4.0;
MARKETING_VERSION = 3.1.8;
PRODUCT_BUNDLE_IDENTIFIER = ca.bc.gov.WildfireInformation;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
import { Component, Input } from '@angular/core';
import { ProcessedPost } from '../../highlights-widget/highlights-widget.component';
import { snowPlowHelper } from '@app/utils';
import { Router } from '@angular/router';
import { AppConfigService } from '@wf1/core-ui';

@Component({
selector: 'highlights-card',
templateUrl: './highlights-card.component.html',
styleUrls: ['./highlights-card.component.scss']
})
export class HighlightsCardComponent {
@Input() post: ProcessedPost
@Input() post: ProcessedPost;
public snowPlowHelper = snowPlowHelper;

constructor(
private appConfigService: AppConfigService,
private currentRouter: Router
){

}

openLink(link: string){
const url = this.appConfigService.getConfig().application.baseUrl.toString() + this.currentRouter.url.slice(1);

this.snowPlowHelper(url, {
action: 'highlights_card_click',
text: 'Navigate to Highlight Link'
});

if (link) {
window.open(link, '_blank');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import { MatDialog } from '@angular/material/dialog';
import { Capacitor, CapacitorHttp } from '@capacitor/core';
import { map } from 'rxjs/operators';
import { Meta, Title } from '@angular/platform-browser';
import { snowPlowHelper } from '@app/utils';

const MAX_CACHE_AGE = 30 * 1000;

export interface Coordinates {
readonly accuracy: number;
readonly altitude: number | null;
Expand All @@ -37,6 +37,7 @@ export interface Position {
providedIn: 'root',
})
export class CommonUtilityService {
snowPlowHelper = snowPlowHelper;
private myLocation;
private locationTime;
private location;
Expand All @@ -53,6 +54,7 @@ export class CommonUtilityService {
private dialog: MatDialog,
private titleService: Title,
private metaService: Meta,
private currentRouter: Router,

) {
setTimeout(() => (this.rofService = injector.get(ReportOfFireService)));
Expand Down Expand Up @@ -363,6 +365,13 @@ export class CommonUtilityService {
}

shareMobile(shareTitle: string) {
const url = this.appConfigService.getConfig().application.baseUrl.toString() + this.currentRouter.url.slice(1);

this.snowPlowHelper(url, {
action: 'share_from_mobile_device',
text: shareTitle
});

const currentUrl = this.appConfigService.getConfig().application.baseUrl.toString() + this.router.url.slice(1);
// contents of the share is out of scope for wfnews-2403. Enhancment should be available in wfnews-2422
const imageUrl = this.appConfigService.getConfig().application.baseUrl.toString() + '/assets/images/share-wildfire.png';
Expand All @@ -381,6 +390,11 @@ export class CommonUtilityService {

openShareWindow(type: string, incidentName: string) {
const url = this.appConfigService.getConfig().application.baseUrl.toString() + this.router.url.slice(1);

this.snowPlowHelper(url, {
action: 'share_from_desktop',
text: `${type}, ${incidentName}`
});
this.dialog.open(ShareDialogComponent, {
panelClass: 'contact-us-dialog',
width: '500px',
Expand Down

0 comments on commit d409a7f

Please sign in to comment.