Skip to content

Commit

Permalink
Merge branch 'master' into fix-dashboard-skip-expense-post-import
Browse files Browse the repository at this point in the history
  • Loading branch information
anishfyle committed Feb 12, 2025
2 parents 1ed7345 + 3d1f4c2 commit a96a2e9
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/c1-staging-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Deploy to C1 Staging

on:
push:
branches:
- master
pull_request:
types: [labeled]

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/qa-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Deploy to QA

on:
push:
branches:
- master
pull_request:
types: [labeled]

Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/staging-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,24 @@ jobs:
persist-credentials: false
token: ${{ secrets.DEPLOY_GIT_ACCESS_TOKEN }}

- name: Update Image Tag
- name: Update Image Tag - fyle staging
run: |
NEW_TAG="v$(git rev-parse --short HEAD)"
cd ${{ vars.STAGING_DEPLOY_REPO }}/${{ vars.STAGING_DEPLOY_DIR }}/staging/integrations
kustomize edit set image docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_integrations-app=docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_integrations-app:$NEW_TAG
- name: Update Image Tag - c1 qa
run: |
NEW_TAG="v$(git rev-parse --short HEAD)"
cd ${{ vars.STAGING_DEPLOY_REPO }}/${{ vars.C1_STAGING_DEPLOY_DIR }}/qa/integrations
kustomize edit set image docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_integrations-app=docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_integrations-app:$NEW_TAG
- name: Update Image Tag - c1 staging
run: |
NEW_TAG="v$(git rev-parse --short HEAD)"
cd ${{ vars.STAGING_DEPLOY_REPO }}/${{ vars.C1_STAGING_DEPLOY_DIR }}/staging/integrations
kustomize edit set image docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_integrations-app=docker.io/${{ secrets.DOCKERHUB_USERNAME }}/fyle_integrations-app:$NEW_TAG
- name: Commit and push changes
run: |
cd ${{ vars.STAGING_DEPLOY_REPO }}/
Expand Down
4 changes: 1 addition & 3 deletions src/app/core/services/integration/refiner.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ export class RefinerService {
if (this.refiner) {
this.refiner('identifyUser', {
id: this.user.org_id,
email: this.user.email,
name: this.user.full_name,
account: {
workspace_name: this.user.org_name
org_id: this.user.org_id
},
source: 'Fyle Integration Settings',
action_name: actionName,
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/integration/tracking.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('TrackingService', () => {
});

it('should track Open Landing Page event', () => {
expect(service.onOpenLandingPage('[email protected]', 1, 'Lolo Org', 'or767asdih5')).toBeUndefined();
expect(service.onOpenLandingPage('[email protected]', 'or767asdih5')).toBeUndefined();
});

it('should flatten the payload', () => {
Expand Down
8 changes: 3 additions & 5 deletions src/app/core/services/integration/tracking.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,14 @@ export class TrackingService {
}
}

onOpenLandingPage(email: string | undefined, orgId: number, orgName: string, fyleOrgId: string): void {
onOpenLandingPage(userId: string | undefined, fyleOrgId: string): void {
try {
if (this.tracking) {
this.tracking.identify(email);
this.tracking.identify(userId);
this.tracking.people.set({
orgId,
orgName,
fyleOrgId
});
this.identityEmail = email;
this.identityEmail = userId;
}
} catch (e) {
console.error('Tracking error:', e);
Expand Down
2 changes: 1 addition & 1 deletion src/app/integrations/integrations.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class IntegrationsComponent implements OnInit {
this.user = this.userService.getUserProfile();
this.getOrCreateOrg().then((org: Org | undefined) => {
if (org) {
this.trackingService.onOpenLandingPage(this.user?.email, org.id, org.name, org.fyle_org_id);
this.trackingService.onOpenLandingPage(this.user?.user_id, org.fyle_org_id);
this.org = org;
this.storageService.set('orgId', this.org.id);
this.storageService.set('org', this.org);
Expand Down

0 comments on commit a96a2e9

Please sign in to comment.