Skip to content

Commit

Permalink
Merge pull request #45526 from rushatgabhane/helpdot
Browse files Browse the repository at this point in the history
[HelpDot] Restructure Integrations Category on Exfy Classic
  • Loading branch information
techievivek authored Jul 18, 2024
2 parents 28b4915 + ba1050f commit f392cd3
Show file tree
Hide file tree
Showing 56 changed files with 170 additions and 55 deletions.
13 changes: 11 additions & 2 deletions .github/scripts/createDocsRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {ValueOf} from 'type-fest';
type Article = {
href: string;
title: string;
order?: number;
};

type Section = {
Expand Down Expand Up @@ -60,11 +61,12 @@ function toTitleCase(str: string): string {
/**
* @param filename - The name of the file
*/
function getArticleObj(filename: string): Article {
function getArticleObj(filename: string, order?: number): Article {
const href = filename.replace('.md', '');
return {
href,
title: toTitleCase(href.replaceAll('-', ' ')),
order,
};
}

Expand All @@ -90,6 +92,12 @@ function pushOrCreateEntry<TKey extends HubEntriesKey>(hubs: Hub[], hub: string,
}
}

function getOrderFromArticleFrontMatter(path: string): number | undefined {
const frontmatter = fs.readFileSync(path, 'utf8').split('---')[1];
const frontmatterObject = yaml.load(frontmatter) as Record<string, unknown>;
return frontmatterObject.order as number | undefined;
}

/**
* Add articles and sections to hubs
* @param hubs - The hubs inside docs/articles/ for a platform
Expand All @@ -113,7 +121,8 @@ function createHubsWithArticles(hubs: string[], platformName: ValueOf<typeof pla

// Each subfolder will be a section containing articles
fs.readdirSync(`${docsDir}/articles/${platformName}/${hub}/${section}`).forEach((subArticle) => {
articles.push(getArticleObj(subArticle));
const order = getOrderFromArticleFrontMatter(`${docsDir}/articles/${platformName}/${hub}/${section}/${subArticle}`);
articles.push(getArticleObj(subArticle, order));
});

pushOrCreateEntry(routeHubs, hub, 'sections', {
Expand Down
4 changes: 2 additions & 2 deletions docs/_data/_routes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ platforms:
icon: /assets/images/handshake.svg
description: Discover the benefits of becoming an Expensify Partner.

- href: integrations
title: Integrations
- href: connections
title: Connections
icon: /assets/images/simple-illustration__monitor-remotesync.svg
description: Integrate with accounting or HR software to streamline expense approvals.

Expand Down
14 changes: 9 additions & 5 deletions docs/_includes/hub.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ <h1 class="title">
{{ hub.description }}
</p>

{% assign sortedSectionsAndArticles = hub.sections | concat: hub.articles | sort: 'title' %}

<section>
<div class="cards-group">
{% for section in hub.sections %}
{% include section-card.html platform=activePlatform hub=hub.href section=section.href title=section.title %}
{% endfor %}
{% for article in hub.articles %}
{% include article-card.html hub=hub.href href=article.href title=article.title platform=activePlatform %}
{% for item in sortedSectionsAndArticles %}
<!-- The item is a section if it has articles inside it -->
{% if item.articles %}
{% include section-card.html platform=activePlatform hub=hub.href section=item.href title=item.title %}
{% else %}
{% include article-card.html hub=hub.href href=item.href title=item.title platform=activePlatform %}
{% endif %}
{% endfor %}
</div>
</section>
50 changes: 25 additions & 25 deletions docs/_includes/lhn-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,31 @@
<span>{{ hub.title }}</span>
</div>
<ul class="nested-treeview">
{% for section in hub.sections %}
<li>
{% if section.href == activeSection %}
<div class="icon-with-link selected">
<a href="/{{ activePlatform }}/hubs/{{ hub.href }}"><img src="/assets/images/down.svg" class="base-icon"></img></a>
<span>{{ section.title }}</span>
</div>
<ul>
{% for article in section.articles %}
{% assign article_href = section.href | append: '/' | append: article.href %}
{% include lhn-article-link.html platform=activePlatform hub=hub.href href=article_href title=article.title %}
{% endfor %}
</ul>
{% else %}
<a href="{{ section.href }}" class="icon-with-link link">
<img src="/assets/images/arrow-right.svg" class="base-icon"></img>
{{ section.title }}
</a>
{% endif %}

</li>
{% endfor %}

{% for article in hub.articles %}
{% include lhn-article-link.html platform=activePlatform hub=hub.href href=article.href title=article.title %}
{% assign sortedSectionsAndArticles = hub.sections | concat: hub.articles | sort: 'title' %}
{% for item in sortedSectionsAndArticles %}
{% if item.articles %}
<li>
{% if item.href == activeSection %}
<div class="icon-with-link selected">
<a href="/{{ activePlatform }}/hubs/{{ hub.href }}"><img src="/assets/images/down.svg" class="base-icon"></img></a>
<span>{{ item.title }}</span>
</div>
<ul>
{% for article in item.articles %}
{% assign article_href = item.href | append: '/' | append: article.href %}
{% include lhn-article-link.html platform=activePlatform hub=hub.href href=article_href title=article.title %}
{% endfor %}
</ul>
{% else %}
<a href="{{ item.href }}" class="icon-with-link link">
<img src="/assets/images/arrow-right.svg" class="base-icon"></img>
{{ item.title }}
</a>
{% endif %}
</li>
{% else %}
{% include lhn-article-link.html platform=activePlatform hub=hub.href href=item.href title=item.title %}
{% endif %}
{% endfor %}
</ul>
{% else %}
Expand Down
3 changes: 2 additions & 1 deletion docs/_includes/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ <h1 class="title">

<section>
<div class="cards-group">
{% for article in section.articles %}
{% assign sortedArticles = section.articles | sort: 'order', 'last' | default: 999 %}
{% for article in sortedArticles %}
{% assign article_href = section.href | append: '/' | append: article.href %}
{% include article-card.html hub=hub.href href=article_href title=article.title platform=activePlatform %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Accelo Troubleshooting
description: Accelo Troubleshooting
order: 3
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Configure Accelo
description: Configure Accelo
order: 2
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Accelo
description: Help doc for Accelo integration
order: 1
---
<!-- The lines above are required by Jekyll to process the .md file -->

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Certinia Troubleshooting
description: Certinia Troubleshooting
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Configure Certinia
description: Configure Certinia
order: 2
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Certinia
description: Guide to connecting Expensify and Certinia FFA and PSA/SRP (formerly known as FinancialForce)
order: 1
---
# Overview
[Cetinia](https://use.expensify.com/financialforce) (formerly known as FinancialForce) is a cloud-based software solution that provides a range of financial management and accounting applications built on the Salesforce platform. There are two versions: PSA/SRP and FFA and we support both.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Configure Netsuite
description: Configure Netsuite
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: NetSuite
description: Connect and configure NetSuite directly to Expensify.
order: 1
---
# Overview
Expensify's seamless integration with NetSuite enables you to streamline your expense reporting process. This integration allows you to automate the export of reports, tailor your coding preferences, and tap into NetSuite's array of advanced features. By correctly configuring your NetSuite settings in Expensify, you can leverage the connection's settings to automate most of the tasks, making your workflow more efficient.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Netsuite Troubleshooting
description: Netsuite Troubleshooting
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Configure Quickbooks Desktop
description: Configure Quickbooks Desktop
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: QuickBooks Desktop
description: How to connect Expensify to QuickBooks Desktop and troubleshoot issues.
order: 1
---
# Overview
QuickBooks Desktop is an accounting package developed by Intuit. It is designed for small and medium-sized businesses to help them manage their financial and accounting tasks. You can connect Expensify to QuickBooks Desktop to make expense management seamless.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Quickbooks Desktop Troubleshooting
description: Quickbooks Desktop Troubleshooting
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Configure Quickbooks Online
description: Configure Quickbooks Online
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: QuickBooks Online
description: Everything you need to know about using Expensify's direct integration with QuickBooks Online.
order: 1
---
# Overview

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Quickbooks Online Troubleshooting
description: Quickbooks Online Troubleshooting
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Configure Sage Intacct
description: Configure Sage Intacct
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Sage Intacct
description: Connect your Expensify workspace with Sage Intacct
order: 1
---
# Overview
Expensify’s seamless integration with Sage Intacct allows you to connect using either Role-based permissions or User-based permissions.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Sage Intacct Troubleshooting
description: Sage Intacct Troubleshooting
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Configure Xero
description: Configure Xero
---

# Coming soon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: The Xero Integration
description: Everything you need to know about Expensify's direct integration with Xero
order: 1
---

# About
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Xero Troubleshooting
description: Xero Troubleshooting
---

# Coming soon

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions docs/expensify-classic/hubs/workspaces/reports.html

This file was deleted.

27 changes: 27 additions & 0 deletions docs/redirects.csv
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,33 @@ https://help.expensify.com/articles/new-expensify/expenses/Set-up-your-wallet,ht
https://help.expensify.com/articles/new-expensify/expenses/Split-an-expense,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Split-an-expense
https://help.expensify.com/articles/new-expensify/expenses/Track-expenses,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Track-expenses
https://help.expensify.com/articles/new-expensify/expenses/Unlock-a-Business-Bank-Account,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Unlock-a-Business-Bank-Account
https://help.expensify.com/expensify-classic/hubs/integrations/HR-integrations,https://help.expensify.com/expensify-classic/hubs/connections
https://help.expensify.com/expensify-classic/hubs/integrations/accounting-integrations,https://help.expensify.com/expensify-classic/hubs/connections
https://help.expensify.com/expensify-classic/hubs/integrations/other-integrations,https://help.expensify.com/expensify-classic/hubs/connections
https://help.expensify.com/expensify-classic/hubs/integrations/travel-integrations,https://help.expensify.com/expensify-classic/hubs/connections
https://help.expensify.com/articles/expensify-classic/integrations/HR-integrations/ADP,https://help.expensify.com/articles/expensify-classic/connections/ADP
https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Accelo,https://help.expensify.com/expensify-classic/hubs/connections/accelo
https://help.expensify.com/articles/expensify-classic/integrations/travel-integrations/Additional-Travel-Integrations,https://help.expensify.com/articles/expensify-classic/connections/Additional-Travel-Integrations
https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Certinia,https://help.expensify.com/expensify-classic/hubs/connections/certinia
https://help.expensify.com/articles/expensify-classic/integrations/travel-integrations/Egencia,https://help.expensify.com/articles/expensify-classic/connections/Egencia
https://help.expensify.com/articles/expensify-classic/integrations/travel-integrations/Global-VaTax,https://help.expensify.com/articles/expensify-classic/connections/Global-VaTax
https://help.expensify.com/articles/expensify-classic/integrations/other-integrations/Google-Apps-SSO,https://help.expensify.com/articles/expensify-classic/connections/Google-Apps-SSO
https://help.expensify.com/articles/expensify-classic/integrations/HR-integrations/Greenhouse,https://help.expensify.com/articles/expensify-classic/connections/Greenhouse
https://help.expensify.com/articles/expensify-classic/integrations/HR-integrations/Gusto,https://help.expensify.com/articles/expensify-classic/connections/Gusto
https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Indirect-Accounting-Integrations,https://help.expensify.com/articles/expensify-classic/connections/Indirect-Accounting-Integrations
https://help.expensify.com/articles/expensify-classic/integrations/travel-integrations/Lyft,https://help.expensify.com/articles/expensify-classic/connections/Lyft
https://help.expensify.com/articles/expensify-classic/integrations/travel-integrations/Navan,https://help.expensify.com/articles/expensify-classic/connections/Navan
https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/NetSuite,https://help.expensify.com/expensify-classic/hubs/connections/netsuite
https://help.expensify.com/articles/expensify-classic/integrations/HR-integrations/QuickBooks-Time,https://help.expensify.com/articles/expensify-classic/connections/QuickBooks-Time
https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/QuickBooks-Desktop,https://help.expensify.com/expensify-classic/hubs/connections/quickbooks-desktop
https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/QuickBooks-Online,https://help.expensify.com/expensify-classic/hubs/connections/quickbooks-online
https://help.expensify.com/articles/expensify-classic/integrations/HR-integrations/Rippling,https://help.expensify.com/articles/expensify-classic/connections/Rippling
https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Sage-Intacct,https://help.expensify.com/expensify-classic/hubs/connections/sage-intacct
https://help.expensify.com/articles/expensify-classic/integrations/travel-integrations/TravelPerk,https://help.expensify.com/articles/expensify-classic/connections/TravelPerk
https://help.expensify.com/articles/expensify-classic/integrations/travel-integrations/Uber,https://help.expensify.com/articles/expensify-classic/connections/Uber
https://help.expensify.com/articles/expensify-classic/integrations/HR-integrations/Workday,https://help.expensify.com/articles/expensify-classic/connections/Workday
https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Xero,https://help.expensify.com/expensify-classic/hubs/connections/xero
https://help.expensify.com/articles/expensify-classic/integrations/HR-integrations/Zenefits,https://help.expensify.com/articles/expensify-classic/connections/Zenefits
https://help.expensify.com/articles/expensify-classic/workspaces/tax-tracking,https://help.expensify.com/articles/expensify-classic/workspaces/Tax-Tracking
https://help.expensify.com/articles/expensify-classic/copilots-and-delegates/Approval-Workflows,https://help.expensify.com/articles/expensify-classic/reports/Assign-report-approvers-to-specific-employees
https://help.expensify.com/articles/expensify-classic/settings/Notification-Troubleshooting,https://help.expensify.com/articles/expensify-classic/settings/account-settings/Set-Notifications
Expand Down

0 comments on commit f392cd3

Please sign in to comment.