-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
New feature : Csv Export #2273
New feature : Csv Export #2273
Conversation
package.json
Outdated
@@ -31,6 +31,7 @@ | |||
"fetch-libraries": "bash fetch-libraries.sh" | |||
}, | |||
"dependencies": { | |||
"@json2csv/plainjs": "^7.0.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lock the version here (remove ^
and run yarn
again)
package.json
Outdated
@@ -156,6 +157,7 @@ | |||
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6", | |||
"@babel/plugin-proposal-optional-chaining": "7.21.0", | |||
"@babel/plugin-transform-arrow-functions": "7.22.5", | |||
"@babel/plugin-transform-export-namespace-from": "^7.24.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
We might have to change the file name from |
views/Activity/JsonToCsv.tsx
Outdated
onChangeText={setCustomFileName} | ||
/> | ||
<View> | ||
<Button title="Download CSV" onPress={downloadCsv} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be localized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ajeett01 look through locale files and add your used strings here
|
Yup we can, or maybe |
views/Activity/Activity.tsx
Outdated
type="feather" | ||
color={themeColor('text')} | ||
underlayColor="transparent" | ||
size={30} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjust the download icon size here as compared to filter and cross icons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'react-native-reanimated/plugin', | ||
['@babel/plugin-transform-export-namespace-from'] | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have we added that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious about this too
views/Activity/JsonToCsv.tsx
Outdated
if (!csv) return; | ||
|
||
try { | ||
if (Platform.OS === 'android') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are not yet handling the downloading for iOS right ?
views/Activity/JsonToCsv.tsx
Outdated
'cltv_expiry', | ||
'creation_date', | ||
'expiry' | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaloudis would these keys be good to download in our csv data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these look ok, definitely need to flesh them out though
views/Activity/ActivityToCsv.tsx
Outdated
message: 'This app needs access to your storage to save CSV files', | ||
buttonNeutral: 'Ask Me Later', | ||
buttonNegative: 'Cancel', | ||
buttonPositive: 'OK' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should localize these strings
@Ajeett01 We need to fix failing check on the latest commit |
a03c80a
to
1ea2ac2
Compare
) | ||
.join('\n'); | ||
|
||
return `Transaction Section\n${header}\n${rows}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be localized
'', | ||
'', | ||
'Expiry' | ||
].join(','); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should be localized
].join(','); | ||
|
||
const invoiceSection = [ | ||
'Invoice Section', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs localization
].join('\n'); | ||
|
||
const paymentSection = [ | ||
'Payment Section', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs localization
const { filteredActivity } = ActivityStore; | ||
|
||
if (!startDate || !endDate) { | ||
Alert.alert('Error', 'Please select Start and End date.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs localization
'react-native-reanimated/plugin', | ||
['@babel/plugin-transform-export-namespace-from'] | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious about this too
closing in favor of #2436 |
Description
Relates to issue: ZEUS-#1467