@acorex/connectivity 19.4.2 → 19.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1961,6 +1961,7 @@ const rootFolder = {
|
|
1961
1961
|
folders: [],
|
1962
1962
|
documents: [],
|
1963
1963
|
documentTypes: [allTypes[1]],
|
1964
|
+
inherit: true,
|
1964
1965
|
};
|
1965
1966
|
// Section: Tenant Folders
|
1966
1967
|
const rootTenantsFolder = {
|
@@ -1979,6 +1980,7 @@ const rootTenantsFolder = {
|
|
1979
1980
|
updatedBy: 'system',
|
1980
1981
|
folders: [],
|
1981
1982
|
documents: [],
|
1983
|
+
inherit: false,
|
1982
1984
|
};
|
1983
1985
|
allFolders.push(rootTenantsFolder);
|
1984
1986
|
rootFolder.folders?.push(rootTenantsFolder);
|
@@ -2000,6 +2002,7 @@ const mainTenantFolder = {
|
|
2000
2002
|
folders: [],
|
2001
2003
|
documents: [],
|
2002
2004
|
documentTypes: [allTypes[1]],
|
2005
|
+
inherit: true,
|
2003
2006
|
};
|
2004
2007
|
// Section: Sample File Types
|
2005
2008
|
const sampleFileTypes = [
|
@@ -2107,6 +2110,7 @@ const rootUsersFolder = {
|
|
2107
2110
|
tenantId: tenantId,
|
2108
2111
|
folders: [],
|
2109
2112
|
documents: [],
|
2113
|
+
inherit: false,
|
2110
2114
|
};
|
2111
2115
|
// Section: User Specific Folders and Files
|
2112
2116
|
mockUsers.forEach((user) => {
|
@@ -2129,6 +2133,7 @@ mockUsers.forEach((user) => {
|
|
2129
2133
|
folders: [],
|
2130
2134
|
documents: [],
|
2131
2135
|
documentTypes: [allTypes[1]],
|
2136
|
+
inherit: Math.random() > 0.5,
|
2132
2137
|
};
|
2133
2138
|
commonFilesForUser.forEach((fileName) => {
|
2134
2139
|
const [name, extension] = fileName.split('.');
|
@@ -2177,6 +2182,7 @@ sites.forEach((site) => {
|
|
2177
2182
|
folders: [],
|
2178
2183
|
documents: [],
|
2179
2184
|
documentTypes: [allTypes[1]],
|
2185
|
+
inherit: Math.random() > 0.5,
|
2180
2186
|
};
|
2181
2187
|
const safetyRoles = ['Safety Officer', 'Site Supervisor', 'WHS Representative'];
|
2182
2188
|
safetyRoles.forEach((role) => {
|
@@ -2200,6 +2206,7 @@ sites.forEach((site) => {
|
|
2200
2206
|
folders: [],
|
2201
2207
|
documents: [],
|
2202
2208
|
documentTypes: [allTypes[1]],
|
2209
|
+
inherit: Math.random() > 0.5,
|
2203
2210
|
};
|
2204
2211
|
sampleFileTypes.forEach((fileType) => {
|
2205
2212
|
fileType.titles.forEach((title) => {
|
@@ -2248,6 +2255,7 @@ sites.forEach((site) => {
|
|
2248
2255
|
folders: [],
|
2249
2256
|
documents: [],
|
2250
2257
|
documentTypes: [allTypes[0]],
|
2258
|
+
inherit: Math.random() > 0.5,
|
2251
2259
|
};
|
2252
2260
|
dept.commonFiles.forEach((fileName) => {
|
2253
2261
|
const [name, extension] = fileName.split('.');
|
@@ -2289,6 +2297,7 @@ sites.forEach((site) => {
|
|
2289
2297
|
folders: [],
|
2290
2298
|
documents: [],
|
2291
2299
|
documentTypes: [allTypes[1]],
|
2300
|
+
inherit: Math.random() > 0.5,
|
2292
2301
|
};
|
2293
2302
|
sampleFileTypes.forEach((fileType) => {
|
2294
2303
|
fileType.titles.forEach((title) => {
|
@@ -4649,7 +4658,7 @@ class AXCFileStorageService {
|
|
4649
4658
|
}
|
4650
4659
|
const { binary, ...fileInfo } = record;
|
4651
4660
|
const url = await this.fileService.blobToBase64(binary);
|
4652
|
-
return { ...
|
4661
|
+
return { ...record, url };
|
4653
4662
|
}
|
4654
4663
|
async save(request) {
|
4655
4664
|
const fileId = crypto.randomUUID();
|
@@ -4665,6 +4674,7 @@ class AXCFileStorageService {
|
|
4665
4674
|
isPrimary: request.isPrimary || false,
|
4666
4675
|
status: request.status ?? AXPFileStorageStatus.Temporary, // Use enum
|
4667
4676
|
name: request.name,
|
4677
|
+
binary: request.file,
|
4668
4678
|
};
|
4669
4679
|
// Save the binary content along with metadata in Dexie
|
4670
4680
|
await db.files.add({ ...fileInfo, binary: request.file });
|