debian-mirror-gitlab/app/assets/javascripts/import_projects/utils.js

14 lines
371 B
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import { STATUSES } from './constants';
2020-11-24 15:15:51 +05:30
export function isIncompatible(project) {
return project.importSource.incompatible;
}
export function getImportStatus(project) {
return project.importedProject?.importStatus ?? STATUSES.NONE;
}
2020-10-24 23:57:45 +05:30
export function isProjectImportable(project) {
2020-11-24 15:15:51 +05:30
return !isIncompatible(project) && getImportStatus(project) === STATUSES.NONE;
2020-10-24 23:57:45 +05:30
}