Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Mileage/ Per Diem expenses to depend on category #2461

Merged
merged 12 commits into from
Oct 4, 2023
Merged

Conversation

arjunaj5
Copy link
Contributor

@arjunaj5 arjunaj5 commented Sep 27, 2023

workerB

DOC section: https://www.notion.so/fyleuniverse/Application-Engineering-2b25fffe7b3641c3a5d90d4417a0e360?pvs=4#bb4e8bc013f140999e0937e99149c29d

https://app.clickup.com/t/85ztzt5y6

Description

🤖 Generated by Copilot at 1b53cfa

This pull request enables the creation of mileage and per diem expenses using special categories from the platform. It modifies the dashboard.page.ts and the categories.service.ts files to fetch and use these categories.

🤖 Generated by Copilot at 1b53cfa

Sing, O Muse, of the skillful coder who devised
A clever method getMileageOrPerDiemCategories
To fetch the platform categories that are enabled
And have the system category of Mileage or Per Diem.

Walkthrough

🤖 Generated by Copilot at 1b53cfa

  • Add a new method getMileageOrPerDiemCategories to fetch the special categories for mileage and per diem expenses (link)
  • Import forkJoin operator, PlatformCategory model, and CategoriesService in dashboard.page.ts file (link, link)
  • Declare a new property specialCategories$ to store the special categories observable (link)
  • Inject CategoriesService as a dependency in the constructor of DashboardPage class (link)
  • Combine orgSettings$ and specialCategories$ observables using forkJoin and pass allowedExpenseTypes object to setupActionSheet method (link)
  • Modify setupActionSheet method to check allowedExpenseTypes object and display action sheet buttons accordingly (link)

Clickup

Please add link here

Code Coverage

Please add code coverage here

UI Preview

Please add screenshots for UI changes

@github-actions github-actions bot added the size/S Small PR label Sep 27, 2023
@github-actions
Copy link

PR description must contain a link to a clickup

1 similar comment
@github-actions
Copy link

PR description must contain a link to a clickup

@github-actions github-actions bot added size/M Medium PR and removed size/S Small PR labels Sep 28, 2023
@github-actions
Copy link

PR description must contain a link to a clickup

@arjunaj5 arjunaj5 changed the title feat: initial changes for dashboard feat: Mileage/ Per Diem expenses to depend on category Sep 28, 2023
@arjunaj5 arjunaj5 marked this pull request as ready for review September 28, 2023 07:16
getMileageOrPerDiemCategories(): Observable<PlatformCategory[]> {
const data = {
params: {
is_enabled: 'eq.' + true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_enabled: 'eq.true'

@arjunaj5 arjunaj5 requested a review from mvaishnavi September 29, 2023 05:17
@arjunaj5 arjunaj5 requested a review from Julias0 September 29, 2023 07:23
@@ -29,6 +29,7 @@ import { expectedAssignedCCCStats } from '../../core/mock-data/ccc-expense.detai
import { of } from 'rxjs';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove these unwanted changes


describe('MyExpensesPage', () => {
fdescribe('MyExpensesPage', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove this

@arjunaj5 arjunaj5 requested review from Dimple16 and removed request for Julias0 September 29, 2023 09:12
Copy link
Contributor

@Dimple16 Dimple16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment

margin-right: 12px;
width: 24px;
height: 24px;
border-radius: 5px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be 4/6?

@Dimple16
Copy link
Contributor

@arjunaj5 please check if the tests are failing because of your changes?

@github-actions github-actions bot added the size/L Large PR label Oct 3, 2023
@github-actions github-actions bot removed the size/M Medium PR label Oct 3, 2023
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Unit Test Coverage % values
Statements 91.3% ( 16369 / 17927 )
Branches 89.73% ( 8363 / 9320 )
Functions 89.79% ( 5088 / 5666 )
Lines 91.37% ( 15576 / 17047 )

@arjunaj5 arjunaj5 merged commit a63aa8f into master Oct 4, 2023
arjunaj5 added a commit that referenced this pull request Oct 4, 2023
* initial changes for dashboard

* done

* fix failing tests

* pr comment fi

* added categories service spy to tests

* minor

* remove unwanted changes

* minor

* remove fdescribe

* test: Mileage/ Per Diem expenses to depend on category (#2468)

* coverage

* test description update

* fix tests

* fix

* more tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Large PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants