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