Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
05d212d
Issue #ED-2733 feat: Migrating to android API leve 33
Ajoymaity Aug 24, 2023
6900e40
Issue #ED-2733 merge: Merge pull request #3479 from Ajoymaity/releas…
swayangjit Aug 25, 2023
0991d53
Issue #ED-2733 feat: Update splash screen plugin and remove splash style
Ajoymaity Aug 25, 2023
19cc577
Issue #ED-2733 fix: Update splashscreen plugin for android 33
Ajoymaity Aug 25, 2023
52991fd
Issue #ED-2733 fix: Update splashscreen plugin for android 33
Ajoymaity Aug 25, 2023
bbadfaa
Issue #ED-2733 merge: Merge pull request #3481 from Ajoymaity/releas…
swayangjit Aug 25, 2023
410a65f
Issue #ED-2733 fix: Updated codepush plugin.
swayangjit Aug 28, 2023
8ce34fb
Issue #ED-2733 fix: Updated file-transfer plugin.
swayangjit Aug 28, 2023
cdb199a
Issue #ED-2733 merge: Merge pull request #3484 from swayangjit/relea…
swayangjit Aug 29, 2023
8607195
ISSUE #ED-2767 fix : Camera plugin change
Vinod-V3 Sep 8, 2023
a593edb
Merge pull request #436 from Vinod-V3/release-6.0.0_v13_SL
vishwanath1004 Sep 8, 2023
fd1db9b
Issue #ED-2867 fix: Fixed Home screen UI is not changing as per the r…
Ajoymaity Sep 12, 2023
1fc6212
Issue #ED-2867 merge: Merge pull request #3490 from Ajoymaity/releas…
swayangjit Sep 13, 2023
7ebefbf
ISSUE #ED-2767 fix : Files uploading issue fix
Vinod-V3 Sep 14, 2023
188c51c
Merge pull request #437 from Vinod-V3/release-6.0.0_v13_SL
vishwanath1004 Sep 14, 2023
6844bdd
Merge pull request #3489 from shikshalokam/release-6.0.0_v13_SL_1
swayangjit Sep 14, 2023
e2ec167
Issue #ED-2873 fix: Fixed navigation issue for update profile type
Ajoymaity Sep 15, 2023
b20f8ce
Issue #ED-2873 merge: Merge pull request #3493 from Ajoymaity/releas…
swayangjit Sep 15, 2023
d8f3675
ISSUE #ED-2767 fix : Attachment issue fix done for android sdk-33 upg…
Vinod-V3 Sep 21, 2023
1f418ae
ISSUE #ED-2767 merge : Merge pull request #3494 from Vinod-V3/releas…
swayangjit Sep 21, 2023
057cf0b
ISSUE #000 fix: [ML] Observation tile is NOT opening in Teacher role
Sep 28, 2023
634f60a
ISSUE #000 fix: App crash issue fix
Oct 5, 2023
9698f8d
Issue ED-2733 fix: SDK 33 migration issue fixes.
swayangjit Oct 5, 2023
5c140bc
ISSUE #000 fix: reverting the app crashing issue changes
Oct 5, 2023
f24b4aa
ISSUE #000 fix : 5.1 API 33 level issue fix
Oct 11, 2023
102b153
ISSUE #000 fix : 5.1 API 33 level issue fix
Oct 11, 2023
0ad1903
Merge pull request #438 from shikshalokam/5.1.0.10_33
vishwanath1004 Oct 11, 2023
3c2859e
ISSUE #000 fix : 5.1 API 33 level issue fix
Oct 12, 2023
0cb034e
Merge pull request #439 from shikshalokam/5.1.0.10_33
vishwanath1004 Oct 12, 2023
56fbd71
Issue #SB-000 merge: Merge pull request #3501 from shikshalokam/relea…
swayangjit Oct 13, 2023
9152d21
Issue #ED-0000 fix: Fixed apply filter button is not working issue
Ajoymaity Oct 19, 2023
f3fab92
Issue #ED-0000 fix: Fixed apply filter button is not working issue
Ajoymaity Oct 19, 2023
2de04dd
Issue #ED-0000 merge: Merge pull request #3503 from Ajoymaity/releas…
swayangjit Oct 19, 2023
6ff6bb8
Issue #SB-000 merge: Merge branch 'release-5.1.0.10' of https://githu…
swayangjit Jan 23, 2024
416f051
Issue #SB-000 merge: Merge branch 'release-5.1.0.10' into release-6.0…
swayangjit Jan 23, 2024
fdb925f
Issue #SB-000 merge: Merge branch 'release-6.0.0_v13' into release-7.0.0
swayangjit Jan 23, 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
8 changes: 4 additions & 4 deletions build_config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cordova-plugin=cordova-plugin-x-socialsharing
cordova-plugin=cordova-plugin-androidx-adapter
cordova-plugin=cordova-plugin-device
cordova-plugin=cordova-plugin-file
cordova-plugin=https://github.com/vishwanath1004/cordova-plugin-file-transfer
cordova-plugin=https://github.com/shikshalokam/cordova-plugin-file-transfer.git
cordova-plugin=cordova-plugin-inappbrowser
cordova-plugin=cordova-plugin-network-information
cordova-plugin=cordova-plugin-statusbar
Expand All @@ -20,20 +20,20 @@ cordova-plugin=cordova-plugin-android-permissions
cordova-plugin=cordova.plugins.diagnostic
cordova-plugin=com.telerik.plugins.nativepagetransitions
cordova-plugin=cordova-plugin-secure-storage-echo
cordova-plugin=cordova-plugin-chooser
cordova-plugin=https://github.com/shikshalokam/cordova-plugin-chooser.git
cordova-plugin=cordova-plugin-appavailability
cordova-plugin=cordova-plugin-filepicker
cordova-plugin=cordova-plugin-document-viewer
cordova-plugin=com-sarriaroman-photoviewer
cordova-plugin=cordova-plugin-filepath
cordova-plugin=https://github.com/shikshalokam/cordova-plugin-filepath.git
cordova-plugin=https://github.com/greybax/cordova-plugin-proguard.git
cordova-plugin=https://github.com/Sunbird-Ed/sb-cordova-plugin-utility.git#release-4.1.0
cordova-plugin=https://github.com/Sunbird-Ed/sb-cordova-plugin-downloadmanager.git
cordova-plugin=https://github.com/Sunbird-Ed/sb-cordova-plugin-db.git#release-4.6.0
cordova-plugin=https://github.com/Sunbird-Ed/sb-cordova-plugin-customtabs#release-5.0.2 --variable URL_SCHEME=@string/custom_scheme_url --variable URL_HOST=mobile
cordova-plugin=cordova-sqlite-storage
cordova plugin=cordova-plugin-googleplus
cordova-pligin=cordova-plugin-camera
cordova-plugin=https://github.com/shikshalokam/cordova-plugin-camera.git
[email protected]
cordova-plugin=cordova-plugin-filechooser
cordova-plugin=cordova-plugin-media
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,19 @@
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-badge": "^0.8.8",
"cordova-plugin-camera": "^6.0.0",
"cordova-plugin-chooser": "^1.3.2",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-document-viewer": "^0.9.13",
"cordova-plugin-file": "^7.0.0",
"cordova-plugin-file": "^8.0.0",
"cordova-plugin-file-opener2": "^2.2.1",
"cordova-plugin-filechooser": "^1.2.0",
"cordova-plugin-filepath": "^1.5.8",
"cordova-plugin-filepicker": "^1.1.6",
"cordova-plugin-googleplus": "^8.5.2",
"cordova-plugin-inappbrowser": "^5.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.2.1",
"cordova-plugin-media": "^6.1.0",
"cordova-plugin-media": "^7.0.0",
"cordova-plugin-network-information": "^2.0.2",
"cordova-plugin-printer": "^0.8.0",
"cordova-plugin-secure-storage-echo": "^5.1.1",
Expand Down Expand Up @@ -199,11 +197,13 @@
"cordova-plugin-app-version": "^0.1.14",
"cordova-plugin-awesome-shared-preferences": "git+https://github.com/adriano-di-giovanni/cordova-plugin-shared-preferences.git",
"cordova-plugin-badge-fix": "^0.8.10",
"cordova-plugin-camera": "git+https://github.com/vishwanath1004/cordova-plugin-camera.git",
"cordova-plugin-code-push": "git+https://github.com/swayangjit/cordova-plugin-code-push.git",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-fcm-with-dependecy-updated": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-fcm.git#release-5.1.2",
"cordova-plugin-file": "^7.0.0",
"cordova-plugin-file-transfer": "git+https://github.com/vishwanath1004/cordova-plugin-file-transfer.git",
"cordova-plugin-file-transfer": "git+https://github.com/shikshalokam/cordova-plugin-file-transfer.git",
"cordova-plugin-filepath": "git+https://github.com/shikshalokam/cordova-plugin-filepath.git",
"cordova-plugin-inappupdatemanager": "git+https://github.com/subranil/cordova-plugin-inappupdatemanager.git#release-3.7.0",
"cordova-plugin-local-notification": "git+https://github.com/fquirin/cordova-plugin-local-notifications.git",
"cordova-plugin-openrap": "git+https://github.com/project-sunbird/cordova-plugin-openrap.git",
Expand Down
5 changes: 3 additions & 2 deletions src/app/components/dashboard/dashboard.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ describe('DashboardComponent', () => {
const mockCommonUtilService: Partial<CommonUtilService> = {
showToast: jest.fn(),
translateMessage: jest.fn(),
showSettingsPageToast: jest.fn()
showSettingsPageToast: jest.fn(),
isAndroidVer13: jest.fn()
};
const mockStoragePermissionHandlerService: Partial<StoragePermissionHandlerService> = {};
const mockAppVersion: Partial<AppVersion> = {
Expand Down Expand Up @@ -85,7 +86,7 @@ describe('DashboardComponent', () => {
dashboardComponent.exportCsv()
// assert
setTimeout(() => {
expect(mockStoragePermissionHandlerService.checkForPermissions).toHaveBeenCalled();
// expect(mockStoragePermissionHandlerService.checkForPermissions).toHaveBeenCalled();
done()
});
})
Expand Down
57 changes: 33 additions & 24 deletions src/app/components/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,41 @@ export class DashboardComponent implements OnInit {
ID.DOWNLOAD_CLICKED
);
const appName = await this.appVersion.getAppName();
await this.storagePermissionHandlerService.checkForPermissions(PageId.ACTIVITY_DASHBOARD).then(async (result) => {
if (result) {
const expTime = new Date().getTime();
const filename = this.collectionName.trim() + '_' + expTime + '.csv';
const downloadDirectory = this.platform.is('ios') ? `${cordova.file.documentsDirectory}Download/` : cordova.file.externalDataDirectory
if(this.commonUtilService.isAndroidVer13()) {
this.handleExportCsv();
} else {
await this.storagePermissionHandlerService.checkForPermissions(PageId.ACTIVITY_DASHBOARD).then(async (result) => {
if (result) {
this.handleExportCsv();
} else {
await this.commonUtilService.showSettingsPageToast('FILE_MANAGER_PERMISSION_DESCRIPTION', appName, PageId.ACTIVITY_DASHBOARD, true);
}
}).catch((err) => {
console.log('checkForPermissions err', err);
});
}
}

this.lib.instance.exportCsv({ 'strict': true }).then((csvData) => {
console.log('exportCSVdata', csvData);
this.file.writeFile(downloadDirectory, filename, csvData, { replace: true })
.then((res) => {
console.log('rs write file', res);
this.openCsv(res.nativeURL);
this.commonUtilService.showToast(
this.commonUtilService.translateMessage('DOWNLOAD_COMPLETED', filename), false, 'custom-toast');
})
.catch((err) => {
this.writeFile(downloadDirectory, csvData);
console.log('writeFile err', err);
});
}).catch((err) => {
console.log('checkForPermissions err', err);
});
handleExportCsv() {
const expTime = new Date().getTime();
const filename = this.collectionName.trim() + '_' + expTime + '.csv';
const downloadDirectory = this.platform.is('ios') ? `${cordova.file.documentsDirectory}Download/` : cordova.file.externalDataDirectory

} else {
await this.commonUtilService.showSettingsPageToast('FILE_MANAGER_PERMISSION_DESCRIPTION', appName, PageId.ACTIVITY_DASHBOARD, true);
}
this.lib.instance.exportCsv({ 'strict': true }).then((csvData) => {
console.log('exportCSVdata', csvData);
this.file.writeFile(downloadDirectory, filename, csvData, { replace: true })
.then((res) => {
console.log('rs write file', res);
this.openCsv(res.nativeURL);
this.commonUtilService.showToast(
this.commonUtilService.translateMessage('DOWNLOAD_COMPLETED', filename), false, 'custom-toast');
})
.catch((err) => {
this.writeFile(downloadDirectory, csvData);
console.log('writeFile err', err);
});
}).catch((err) => {
console.log('export csv err', err);
});
}

Expand Down
Loading