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

Saif expapptest #53750

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
37980b8
fixed tax rate
saifelance Apr 20, 2024
46a6828
initial branch
saifelance Dec 3, 2024
3ee804b
patch updating
saifelance Dec 3, 2024
14e0b91
Fixed: Tweak camera flash control to make it more obvious #53422
saifelance Dec 3, 2024
11abc8c
Updated fall parentReportID and parentReportActionID
saifelance Dec 9, 2024
461a411
fixed conflict
saifelance Dec 9, 2024
f6df00c
fixed conflict
saifelance Dec 9, 2024
5373112
Merge branch 'saifExpapptest' of https://github.com/saifelance/App in…
saifelance Dec 9, 2024
4fcb597
Update Resolve Conflicts
saifelance Dec 9, 2024
d34bc23
Resolved conflict in Email-Notifications.md
saifelance Dec 9, 2024
2331c45
Merge branch 'main' into saifExpapptest
saifelance Dec 9, 2024
ef89f97
Added CLA
saifelance Dec 9, 2024
6d7d3eb
Update workflow files to specify Ubuntu version
saifelance Dec 9, 2024
5bfed61
updated github/workflows/cla.yml
saifelance Dec 9, 2024
8ea9b8a
Added signatories
saifelance Dec 9, 2024
94f722c
document CLA
saifelance Dec 9, 2024
dd7bc76
cla date
saifelance Dec 9, 2024
a17374a
updated version
saifelance Dec 9, 2024
25d982b
updated worflow
saifelance Dec 9, 2024
a429fb4
Updated workflow cla
saifelance Dec 9, 2024
d4662dd
Updated /authorChecklist workflow
saifelance Dec 9, 2024
00543a0
revert version workflow
saifelance Dec 9, 2024
01aa11c
restore my localbacup
saifelance Dec 9, 2024
69890bd
config file settings
saifelance Dec 9, 2024
56c430f
Updated files
saifelance Dec 9, 2024
1fc8834
updated lib IOU action
saifelance Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Expensify Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Expensify Inc or its affiliates (“Expensify”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Expensify in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected].

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your rights, title and interest in and to your Contributions.

**Copyright License.** You hereby grant, and agree to grant, to Expensify a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-free, transferable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute your Contributions and such derivative works, with the right to sublicense the foregoing rights through multiple tiers of sublicensees.

**Patent License.** You hereby grant, and agree to grant, to Expensify a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-free, transferable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer your Contributions, where such license applies only to those patent claims licensable by you that are necessarily infringed by your Contributions alone or by combination of your Contributions with the Project to which such Contributions were submitted, with the right to sublicense the foregoing rights through multiple tiers of sublicensees.

**Moral Rights.** To the fullest extent permitted under applicable law, you hereby waive, and agree not to assert, all of your “moral rights” in or relating to your Contributions for the benefit of Expensify, its assigns, and their respective direct and indirect sublicensees.

**Third Party Content/Rights.** If your Contribution includes or is based on any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that were not authored by you (“Third Party Content”) or if you are aware of any third party intellectual property or proprietary rights associated with your Contribution (“Third Party Rights”), then you agree to include with the submission of your Contribution full details respecting such Third Party Content and Third Party Rights, including, without limitation, identification of which aspects of your Contribution contain Third Party Content or are associated with Third Party Rights, the owner/author of the Third Party Content and Third Party Rights, where you obtained the Third Party Content, and any applicable third party license terms or restrictions respecting the Third Party Content and Third Party Rights. For greater certainty, the foregoing obligations respecting the identification of Third Party Content and Third Party Rights do not apply to any portion of a Project that is incorporated into your Contribution to that same Project.

**Representations.** You represent that, other than the Third Party Content and Third Party Rights identified by you in accordance with this Agreement, you are the sole author of your Contributions and are legally entitled to grant the foregoing licenses and waivers in respect of your Contributions. If your Contributions were created in the course of your employment with your past or present employer(s), you represent that such employer(s) has authorized you to make your Contributions on behalf of such employer(s) or such employer(s) has waived all of their right, title or interest in or to your Contributions.

**No Obligation.** You acknowledge that Expensify is under no obligation to use or incorporate your Contributions into any of the Projects. The decision to use or incorporate your Contributions into any of the Projects will be made at the sole discretion of Expensify or its authorized delegates.

**Assignment.** You agree that Expensify may assign this Agreement, and all of its rights, obligations and licenses hereunder.

4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009007201
versionName "9.0.72-1"
versionCode 1009007300
versionName "9.0.73-0"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
20 changes: 20 additions & 0 deletions blob/main/CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Expensify Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Expensify Inc or its affiliates (“Expensify”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Expensify in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected].

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your rights, title and interest in and to your Contributions.

**Copyright License.** You hereby grant, and agree to grant, to Expensify a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-free, transferable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute your Contributions and such derivative works, with the right to sublicense the foregoing rights through multiple tiers of sublicensees.

**Patent License.** You hereby grant, and agree to grant, to Expensify a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-free, transferable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer your Contributions, where such license applies only to those patent claims licensable by you that are necessarily infringed by your Contributions alone or by combination of your Contributions with the Project to which such Contributions were submitted, with the right to sublicense the foregoing rights through multiple tiers of sublicensees.

**Moral Rights.** To the fullest extent permitted under applicable law, you hereby waive, and agree not to assert, all of your “moral rights” in or relating to your Contributions for the benefit of Expensify, its assigns, and their respective direct and indirect sublicensees.

**Third Party Content/Rights.** If your Contribution includes or is based on any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that were not authored by you (“Third Party Content”) or if you are aware of any third party intellectual property or proprietary rights associated with your Contribution (“Third Party Rights”), then you agree to include with the submission of your Contribution full details respecting such Third Party Content and Third Party Rights, including, without limitation, identification of which aspects of your Contribution contain Third Party Content or are associated with Third Party Rights, the owner/author of the Third Party Content and Third Party Rights, where you obtained the Third Party Content, and any applicable third party license terms or restrictions respecting the Third Party Content and Third Party Rights. For greater certainty, the foregoing obligations respecting the identification of Third Party Content and Third Party Rights do not apply to any portion of a Project that is incorporated into your Contribution to that same Project.

**Representations.** You represent that, other than the Third Party Content and Third Party Rights identified by you in accordance with this Agreement, you are the sole author of your Contributions and are legally entitled to grant the foregoing licenses and waivers in respect of your Contributions. If your Contributions were created in the course of your employment with your past or present employer(s), you represent that such employer(s) has authorized you to make your Contributions on behalf of such employer(s) or such employer(s) has waived all of their right, title or interest in or to your Contributions.

**No Obligation.** You acknowledge that Expensify is under no obligation to use or incorporate your Contributions into any of the Projects. The decision to use or incorporate your Contributions into any of the Projects will be made at the sole discretion of Expensify or its authorized delegates.

**Assignment.** You agree that Expensify may assign this Agreement, and all of its rights, obligations and licenses hereunder.

17 changes: 17 additions & 0 deletions cla.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"signatories": [
{
"name": "Saif Ur Rehman",
"github_username": "saifelance",
"email": "[email protected]",
"signed_at": "2024-12-08"
},
{
"name": "Saif Ur Rehman",
"github_username": "saifelance",
"email": "[email protected]",
"signed_at": "2024-12-09"
}
]
}

4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>9.0.72</string>
<string>9.0.73</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.72.1</string>
<string>9.0.73.0</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>9.0.72</string>
<string>9.0.73</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.72.1</string>
<string>9.0.73.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>9.0.72</string>
<string>9.0.73</string>
<key>CFBundleVersion</key>
<string>9.0.72.1</string>
<string>9.0.73.0</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
21 changes: 21 additions & 0 deletions lib/react-compiler-runtime/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// lib/react-compiler-runtime.js
const $empty = Symbol.for("react.memo_cache_sentinel");
const React = require('react');
/**
* DANGER: this hook is NEVER meant to be called directly!
*
* Note that this is a temporary userspace implementation of this function
* from React 19. It is not as efficient and may invalidate more frequently
* than the official API. Better to upgrade to React 19 as soon as we can.
**/
export function c(size) {
return React.useState(() => {
const $ = new Array(size);
for (let ii = 0; ii < size; ii++) {
$[ii] = $empty;
}
// @ts-ignore
$[$empty] = true;
return $;
})[0];
}
10 changes: 10 additions & 0 deletions lib/react-compiler-runtime/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "react-compiler-runtime",
"version": "0.0.1",
"description": "Runtime for React Compiler",
"license": "MIT",
"main": "index.js",
"dependencies": {
"react": "^18.2.0"
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "9.0.72-1",
"version": "9.0.73-0",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
3 changes: 3 additions & 0 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
const isDraft = ReportUtils.isOpenExpenseReport(moneyRequestReport);
const connectedIntegration = PolicyUtils.getConnectedIntegration(policy);
const navigateBackToAfterDelete = useRef<Route>();
const hasHeldExpenses = ReportUtils.hasHeldExpenses(moneyRequestReport?.reportID);
const hasScanningReceipt = ReportUtils.getTransactionsWithReceipts(moneyRequestReport?.reportID).some((t) => TransactionUtils.isReceiptBeingScanned(t));
const hasOnlyPendingTransactions = allTransactions.length > 0 && allTransactions.every((t) => TransactionUtils.isExpensifyCardTransaction(t) && TransactionUtils.isPending(t));
const transactionIDs = allTransactions.map((t) => t.transactionID);
Expand Down Expand Up @@ -361,6 +362,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
{shouldShowSettlementButton && !shouldUseNarrowLayout && (
<View style={styles.pv2}>
<SettlementButton
shouldUseSuccessStyle={!hasHeldExpenses}
onlyShowPayElsewhere={onlyShowPayElsewhere}
currency={moneyRequestReport?.currency}
confirmApproval={confirmApproval}
Expand Down Expand Up @@ -426,6 +428,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
)}
{shouldShowSettlementButton && shouldUseNarrowLayout && (
<SettlementButton
shouldUseSuccessStyle={!hasHeldExpenses}
wrapperStyle={[styles.flex1]}
onlyShowPayElsewhere={onlyShowPayElsewhere}
currency={moneyRequestReport?.currency}
Expand Down
3 changes: 2 additions & 1 deletion src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ function ReportPreview({
const [isPaidAnimationRunning, setIsPaidAnimationRunning] = useState(false);
const [isHoldMenuVisible, setIsHoldMenuVisible] = useState(false);
const [requestType, setRequestType] = useState<ActionHandledType>();

const [paymentType, setPaymentType] = useState<PaymentMethodType>();

const getCanIOUBePaid = useCallback(
Expand All @@ -140,6 +139,7 @@ function ReportPreview({

const {nonHeldAmount, fullAmount, hasValidNonHeldAmount} = ReportUtils.getNonHeldAndFullAmount(iouReport, shouldShowPayButton);
const hasOnlyHeldExpenses = ReportUtils.hasOnlyHeldExpenses(iouReport?.reportID ?? '');
const hasHeldExpenses = ReportUtils.hasHeldExpenses(iouReport?.reportID ?? '');

const managerID = iouReport?.managerID ?? action.childManagerAccountID ?? 0;
const {totalDisplaySpend, reimbursableSpend} = ReportUtils.getMoneyRequestSpendBreakdown(iouReport);
Expand Down Expand Up @@ -534,6 +534,7 @@ function ReportPreview({
</View>
{shouldShowSettlementButton && (
<AnimatedSettlementButton
shouldUseSuccessStyle={!hasHeldExpenses}
onlyShowPayElsewhere={onlyShowPayElsewhere}
isPaidAnimationRunning={isPaidAnimationRunning}
onAnimationFinish={stopAnimation}
Expand Down
4 changes: 3 additions & 1 deletion src/components/SelectionList/Search/ActionCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const actionTranslationsMap: Record<SearchTransactionAction, TranslationPaths> =

type ActionCellProps = {
action?: SearchTransactionAction;
shouldUseSuccessStyle?: boolean;
isLargeScreenWidth?: boolean;
isSelected?: boolean;
goToItem: () => void;
Expand All @@ -35,6 +36,7 @@ type ActionCellProps = {

function ActionCell({
action = CONST.SEARCH.ACTION_TYPES.VIEW,
shouldUseSuccessStyle = true,
isLargeScreenWidth = true,
isSelected = false,
goToItem,
Expand Down Expand Up @@ -99,7 +101,7 @@ function ActionCell({
style={[styles.w100]}
innerStyles={buttonInnerStyles}
isLoading={isLoading}
success
success={shouldUseSuccessStyle}
isDisabled={isOffline}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type ExpenseItemHeaderNarrowProps = {
containerStyle?: StyleProp<ViewStyle>;
onButtonPress: () => void;
canSelectMultiple?: boolean;
shouldUseSuccessStyle?: boolean;
isSelected?: boolean;
isDisabled?: boolean | null;
isDisabledCheckbox?: boolean;
Expand All @@ -41,6 +42,7 @@ function ExpenseItemHeaderNarrow({
canSelectMultiple,
containerStyle,
isDisabledCheckbox,
shouldUseSuccessStyle = true,
isSelected,
isDisabled,
handleCheckboxPress,
Expand Down Expand Up @@ -101,6 +103,7 @@ function ExpenseItemHeaderNarrow({
<View style={[StyleUtils.getWidthStyle(variables.w80)]}>
<ActionCell
action={action}
shouldUseSuccessStyle={shouldUseSuccessStyle}
goToItem={onButtonPress}
isLargeScreenWidth={false}
isSelected={isSelected}
Expand Down
4 changes: 4 additions & 0 deletions src/components/SelectionList/Search/ReportListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
import {handleActionButtonPress} from '@libs/actions/Search';
import * as CurrencyUtils from '@libs/CurrencyUtils';
import Navigation from '@libs/Navigation/Navigation';
import * as ReportUtils from '@libs/ReportUtils';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
Expand Down Expand Up @@ -109,6 +110,8 @@ function ReportListItem<TItem extends ListItem>({
return null;
}

const hasHeldExpenses = ReportUtils.hasHeldExpenses('', reportItem.transactions);

const participantFrom = reportItem.from;
const participantTo = reportItem.to;

Expand Down Expand Up @@ -202,6 +205,7 @@ function ReportListItem<TItem extends ListItem>({
<View style={StyleUtils.getSearchTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.ACTION)}>
<ActionCell
action={reportItem.action}
shouldUseSuccessStyle={!hasHeldExpenses}
goToItem={handleOnButtonPress}
isSelected={item.isSelected}
isLoading={reportItem.isActionLoading}
Expand Down
Loading
Loading