comment out app installation/configuration button
This commit is contained in:
parent
bb1adc8d76
commit
fef455074a
1 changed files with 36 additions and 31 deletions
|
@ -75,37 +75,42 @@ export const Apps: React.FC = () => {
|
|||
},
|
||||
width: 'auto',
|
||||
},
|
||||
{
|
||||
Header: ' ',
|
||||
Cell: (e: any) => {
|
||||
const navigate = useNavigate();
|
||||
const appStatus = e.cell.row.original.status as AppStatusEnum;
|
||||
if (appStatus === AppStatusEnum.Installing) {
|
||||
return null;
|
||||
}
|
||||
const { slug } = e.cell.row.original;
|
||||
let buttonFuntion = () => navigate(`/apps/${slug}`);
|
||||
if (appStatus === AppStatusEnum.NotInstalled) {
|
||||
buttonFuntion = () => {
|
||||
setAppSlug(slug);
|
||||
setInstallModalOpen(true);
|
||||
};
|
||||
}
|
||||
return (
|
||||
<div className="text-right opacity-0 group-hover:opacity-100 transition-opacity">
|
||||
<button
|
||||
onClick={buttonFuntion}
|
||||
type="button"
|
||||
className="inline-flex items-center px-4 py-2 border border-gray-200 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500"
|
||||
>
|
||||
{getConstForStatus(appStatus, 'buttonIcon')}
|
||||
{getConstForStatus(appStatus, 'buttonTitle')}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
width: 'auto',
|
||||
},
|
||||
// Uncomment this to have an "Install" or "Configure" button for
|
||||
// applications.
|
||||
//
|
||||
// We need to implement installation and configuration in the back-end to be
|
||||
// able to use those buttons.
|
||||
// {
|
||||
// Header: ' ',
|
||||
// Cell: (e: any) => {
|
||||
// const navigate = useNavigate();
|
||||
// const appStatus = e.cell.row.original.status as AppStatusEnum;
|
||||
// if (appStatus === AppStatusEnum.Installing) {
|
||||
// return null;
|
||||
// }
|
||||
// const { slug } = e.cell.row.original;
|
||||
// let buttonFuntion = () => navigate(`/apps/${slug}`);
|
||||
// if (appStatus === AppStatusEnum.NotInstalled) {
|
||||
// buttonFuntion = () => {
|
||||
// setAppSlug(slug);
|
||||
// setInstallModalOpen(true);
|
||||
// };
|
||||
// }
|
||||
// return (
|
||||
// <div className="text-right opacity-0 group-hover:opacity-100 transition-opacity">
|
||||
// <button
|
||||
// onClick={buttonFuntion}
|
||||
// type="button"
|
||||
// className="inline-flex items-center px-4 py-2 border border-gray-200 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500"
|
||||
// >
|
||||
// {getConstForStatus(appStatus, 'buttonIcon')}
|
||||
// {getConstForStatus(appStatus, 'buttonTitle')}
|
||||
// </button>
|
||||
// </div>
|
||||
// );
|
||||
// },
|
||||
// width: 'auto',
|
||||
// },
|
||||
];
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue