File tree Expand file tree Collapse file tree
app/viewModelBuilders/azul/anvil-cmg/common
site-config/anvil-cmg/dev/detail/dataset Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1282,6 +1282,32 @@ export const renderExportEntityWarning = (
12821282 } ;
12831283} ;
12841284
1285+ /**
1286+ * Renders entity related download manifest when the given datasests response is accessible.
1287+ * @param datasetsResponse - Response model return from datasets API.
1288+ * @returns model to be used as props for the ConditionalComponent component.
1289+ */
1290+ export const renderManifestDownloadEntity = (
1291+ datasetsResponse : DatasetsResponse
1292+ ) : React . ComponentProps < typeof C . ConditionalComponent > => {
1293+ return {
1294+ isIn : isDatasetAccessible ( datasetsResponse ) ,
1295+ } ;
1296+ } ;
1297+
1298+ /**
1299+ * Renders entity related download manifest warning when the given datasests response is not accessible.
1300+ * @param datasetsResponse - Response model return from datasets API.
1301+ * @returns model to be used as props for the ConditionalComponent component.
1302+ */
1303+ export const renderManifestDownloadEntityWarning = (
1304+ datasetsResponse : DatasetsResponse
1305+ ) : React . ComponentProps < typeof C . ConditionalComponent > => {
1306+ return {
1307+ isIn : ! isDatasetAccessible ( datasetsResponse ) ,
1308+ } ;
1309+ } ;
1310+
12851311/**
12861312 * Returns value from a string array matching the given index.
12871313 * @param arr - String array.
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export const mainColumn: ComponentConfig[] = [
1919 } as ComponentConfig < typeof C . BackPageContentSingleColumn > ,
2020 ] ,
2121 component : C . ConditionalComponent ,
22- viewBuilder : V . renderExportEntityWarning ,
22+ viewBuilder : V . renderManifestDownloadEntityWarning ,
2323 } as ComponentConfig < typeof C . ConditionalComponent , DatasetsResponse > ,
2424 {
2525 /* Dataset is accessible; render export entity */
@@ -41,6 +41,6 @@ export const mainColumn: ComponentConfig[] = [
4141 ...sideColumn ,
4242 ] ,
4343 component : C . ConditionalComponent ,
44- viewBuilder : V . renderExportEntity ,
44+ viewBuilder : V . renderManifestDownloadEntity ,
4545 } as ComponentConfig < typeof C . ConditionalComponent , DatasetsResponse > ,
4646] ;
You can’t perform that action at this time.
0 commit comments