Skip to content

Commit

Permalink
#420 Info Badge After Activating A Repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
criske committed Apr 14, 2021
1 parent a80562c commit 61bdbd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/resources/public/js/getProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function getProject() {
});
}

function displayProject(userLogin, project) {
function displayProject(userLogin, project, pmInvitePending) {
console.log(project);
$(".managedByLink").html(
$('<a></a>')
Expand All @@ -60,6 +60,9 @@ function displayProject(userLogin, project) {
$(".project-owner-buttons").hide();
}
$(".project-buttons").show();
if(project.provider === "github" && pmInvitePending){
$("#projectOverviewPmPending").show();
}
}

/**
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/templates/project.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ <h3><span id="owner" th:text="${owner}"/>/<span id="name" th:text="${name}"/></h
<h4 class="m-0 font-weight-bold card-title">Project managed by: <span class="managedByLink"></span></h4>
</div>
<div class="card-body">
<div id="projectOverviewPmPending" class="alert alert-warning" role="alert" style="display:none;">
You're almost there. Just give our PM a few minutes to accept the Github invitation, then you'll be all set up.
</div>
<p>
The Project Manager takes care of the following things for you:
</p>
Expand Down Expand Up @@ -903,7 +906,7 @@ <h3>This repository is not active</h3>
data: form.serialize(),
success: function (project) {
$("#loadingProject").hide();
displayProject(project.selfOwner, project);
displayProject(project.selfOwner, project, true);
$(".badge-project-url").text(
"https://self-xdsd.com/p/" + project.repoFullName
+ "?provider=" + project.provider
Expand Down

0 comments on commit 61bdbd6

Please sign in to comment.