2021-01-06 10:30:08 +00:00
|
|
|
import App from '../../../base'
|
|
|
|
import { react2angular } from 'react2angular'
|
|
|
|
import CloneProjectModal from '../components/clone-project-modal'
|
2021-09-14 08:54:21 +00:00
|
|
|
import { rootContext } from '../../../shared/context/root-context'
|
2021-01-06 10:30:08 +00:00
|
|
|
|
2021-04-14 13:17:21 +00:00
|
|
|
export default App.controller(
|
|
|
|
'LeftMenuCloneProjectModalController',
|
2021-09-14 08:54:21 +00:00
|
|
|
function ($scope) {
|
2021-04-14 13:17:21 +00:00
|
|
|
$scope.show = false
|
|
|
|
|
|
|
|
$scope.handleHide = () => {
|
|
|
|
$scope.$applyAsync(() => {
|
|
|
|
$scope.show = false
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.openCloneProjectModal = () => {
|
|
|
|
$scope.$applyAsync(() => {
|
2021-09-14 08:54:21 +00:00
|
|
|
$scope.show = true
|
2021-04-14 13:17:21 +00:00
|
|
|
})
|
|
|
|
}
|
2021-09-14 08:54:21 +00:00
|
|
|
|
|
|
|
$scope.openProject = projectId => {
|
|
|
|
window.location.assign(`/project/${projectId}`)
|
|
|
|
}
|
2021-01-06 10:30:08 +00:00
|
|
|
}
|
2021-04-14 13:17:21 +00:00
|
|
|
)
|
2021-09-14 08:54:21 +00:00
|
|
|
|
|
|
|
App.component(
|
|
|
|
'cloneProjectModal',
|
|
|
|
react2angular(
|
|
|
|
rootContext.use(CloneProjectModal),
|
|
|
|
Object.keys(CloneProjectModal.propTypes)
|
|
|
|
)
|
|
|
|
)
|