Skip to content

Commit

Permalink
Merge pull request #901 from Worktez/dev-angular
Browse files Browse the repository at this point in the history
Internal Release 7.9
  • Loading branch information
simran142002 authored Jan 29, 2023
2 parents 5304d0e + aa16d11 commit 0193ece
Show file tree
Hide file tree
Showing 118 changed files with 2,885 additions and 429 deletions.
4 changes: 3 additions & 1 deletion functions/model/milestone/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ const { db } = require("../application/lib");
* @param {any} startDate
* @param {any} endDate
* @param {any} milestoneStatus
* @param {any} colorCode
* @return {any}
*/
exports.setMilestone = function(uid, orgDomain, title, description, milestoneId, teamId, creationDate, creationTime, startDate, endDate, milestoneStatus) {
exports.setMilestone = function(uid, orgDomain, title, description, milestoneId, teamId, creationDate, creationTime, startDate, endDate, milestoneStatus, colorCode) {
const addMilestonePromise = db.collection("Organizations").doc(orgDomain).collection("Milestones").doc(milestoneId).set({
CreatorUid: uid,
TeamId: teamId,
Expand All @@ -46,6 +47,7 @@ exports.setMilestone = function(uid, orgDomain, title, description, milestoneId,
StartDate: startDate,
EndDate: endDate,
MilestoneStatus: milestoneStatus,
ColorCode: colorCode,
});
return Promise.resolve(addMilestonePromise);
};
Expand Down
4 changes: 2 additions & 2 deletions functions/model/milestone/tark/addMilestone.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ exports.addMilestone = function(request, response) {
const endDate = request.body.data.EndDate;
const teamId = request.body.data.TeamId;
const milestoneStatus = request.body.data.MilestoneStatus;

const colorCode = request.body.data.ColorCode;

const promise = getAllMilestonesData(orgDomain).then((data) => {
this.milestoneData = data;
const milestoneId = "M" + (this.milestoneData.length + 1);

setMilestone(uid, orgDomain, title, description, milestoneId, teamId, creationDate, creationTime, startDate, endDate, milestoneStatus).catch(
setMilestone(uid, orgDomain, title, description, milestoneId, teamId, creationDate, creationTime, startDate, endDate, milestoneStatus, colorCode).catch(
(error) => {
result = { data: error };
status = 500;
Expand Down
2 changes: 2 additions & 0 deletions functions/model/milestone/tark/editMilestone.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ exports.editMilestone = function(request, response) {
const description = request.body.data.Description;
const startDate = request.body.data.StartDate;
const endDate = request.body.data.EndDate;
const colorCode = request.body.data.ColorCode;

let result;
let status = 200;
Expand All @@ -39,6 +40,7 @@ exports.editMilestone = function(request, response) {
MilestoneStatus: milestoneStatus,
StartDate: startDate,
EndDate: endDate,
ColorCode: colorCode,
};
updateMilestone(inputJson, orgDomain, milestoneId);
}
Expand Down
12 changes: 10 additions & 2 deletions functions/model/organization/tark/removeOrgMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* See the MIT License for more details.
***********************************************************/

// const { updateApplication, getApplicationData} = require("../../application/lib");
const { currentDate } = require("../../application/lib");
const { updateMember, updateOrgRawData, getOrgRawData } = require("../../organization/lib");
const { getAllTeams, updateTeamDetails } = require("../../teams/lib");
const { getUserUseEmail, updateUser } = require("../../users/lib");
const { getUserUseEmail, updateUser, updateMyOrgCollection } = require("../../users/lib");
exports.removeOrgMember = function(request, response) {
const orgDomain = request.body.data.OrganizationDomain;
const orgMembers = request.body.data.OrgMembers;
Expand All @@ -36,6 +36,7 @@ exports.removeOrgMember = function(request, response) {
orgMembers.splice(index, 1);
const updateJson = {
Active: false,
DateOfExit: currentDate,
};
const p1 = updateMember(updateJson, orgDomain, remove);
if (!flag) {
Expand Down Expand Up @@ -77,6 +78,13 @@ exports.removeOrgMember = function(request, response) {
SelectedOrgAppKey: "",
SelectedTeamId: "",
};

const updateUserOrgjson ={
DefaultTeam: "",
OrgAppKey: "",
Status: "Inactive",
};
updateMyOrgCollection(updateUserOrgjson, uid, orgDomain);
updateUser(updateUserJson, uid);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ exports.updatedUserPerformanceChartData =function(orgDomain, assignee, sprintRan
responseData.push(["S" + i, storyPoint]);
inputJson["S"+i]=storyPoint;
}
const promise = getOrganizationsChartDetails(orgDomain, teamName, "UserPerformanceChart").then((data) => {
const promise = getOrganizationsChartDetails(orgDomain, teamName, assignee).then((data) => {
if (data != undefined) {
updateChart(orgDomain, teamName, "UserPerformanceChart", inputJson);
updateChart(orgDomain, teamName, assignee, inputJson);
} else {
setOrganizationsChart(orgDomain, teamName, "UserPerformanceChart", inputJson);
setOrganizationsChart(orgDomain, teamName, assignee, inputJson);
}
return null;
}).catch((err) => {
Expand Down
3 changes: 2 additions & 1 deletion functions/model/scheduledFunctions/scheduledFn.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const { startSchedular } = require("./tark/startSchedular");
*/
// exports.scheduledFn = functions.https.onRequest((req, res) => {
// cors(req, res, () => {
exports.scheduledFn = functions.pubsub.schedule("1 21 * * *").onRun((context) => {
exports.scheduledFn = functions.pubsub.schedule("1 23 * * *").onRun((context) => {
startSchedular();
});
// });
Expand Down Expand Up @@ -59,6 +59,7 @@ exports.scheduledFn = functions.pubsub.schedule("1 21 * * *").onRun((context) =>
* @returns {any}
*/
fastify.post("/startSchedular", (req, res) => {
console.log("Running Schedular for charts");
startSchedular();
return res.status(200).send("Success");
});
Expand Down
54 changes: 26 additions & 28 deletions functions/model/scheduledFunctions/tark/startSchedular.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,43 +29,41 @@ exports.startSchedular = function() {
sched.forEach((schDoc) => {
// const orgId = schDoc.data().OrgId;
const orgAppKey = schDoc.data().OrgAppKey;

getOrgUseAppKey(orgAppKey).then((data) => {
const teamIds = data.TeamsId;
const orgDomain = data.OrganizationDomain;
teamIds.forEach((teamId) => {
getTeamUseTeamId(orgDomain, teamId).then((team) => {
if (team.SchedularJob == undefined) {
const teamName = team.TeamName;
setSchedularJob(orgDomain, teamName);
} else {
if (data!=undefined) {
const teamIds = data.TeamsId;
const orgDomain = data.OrganizationDomain;
teamIds.forEach((teamId) => {
getTeamUseTeamId(orgDomain, teamId).then((team) => {
if (team.SchedularJob == undefined) {
const teamName = team.TeamName;
setSchedularJob(orgDomain, teamName);
} else {
// const sprintEvalChart = team.SchedularJob.SprintEvaluationChart;
const performanceChart = team.SchedularJob.PerformanceChart;
// const userPerformanceChart = team.SchedularJob.UserPerformanceChart;
const performanceChart = team.SchedularJob.PerformanceChart;
// const userPerformanceChart = team.SchedularJob.UserPerformanceChart;

const currentSprintID = team.CurrentSprintId;
const sprintRange = {
SprintRange1: currentSprintID - 4,
SprintRange2: currentSprintID,
};
// if (sprintEvalChart) {
const currentSprintID = team.CurrentSprintId;
const sprintRange = {
SprintRange1: currentSprintID - 4,
SprintRange2: currentSprintID,
};
// if (sprintEvalChart) {
// updateSprintEvaluationGraphData(orgDomain, teamId, sprintRange);
// } else if (type == "UserPerformanceChart") {
// updatedUserPerformanceChartData(schDoc.data().OrgDomain, schDoc.data().Assignee, sprintRange, schDoc.data().TeamId, teamName);
// }
// } else if (type == "UserPerformanceChart") {
// updatedUserPerformanceChartData(schDoc.data().OrgDomain, schDoc.data().Assignee, sprintRange, schDoc.data().TeamId, teamName);
// }

if (performanceChart) {
updatePerformanceChartData(orgDomain, teamId, "Team", sprintRange);
}
if (performanceChart) {
updatePerformanceChartData(orgDomain, teamId, "Team", sprintRange);
}
// else if (userPerformanceChart) {
// updateAutoSprintStatus(schDoc.data().OrgAppKey, schDoc.data().TeamId);
// }
}

return null;
}
});
});
});
return null;
}
});
});
}
Expand Down
1 change: 1 addition & 0 deletions functions/model/users/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ exports.setMyOrgCollection = function(Uid, orgDomain, orgAppKey, teams = [], def
DefaultTeam: defaultTeam,
OrgDomain: orgDomain,
ActiveNotifications: 0,
Status: "Active",
});
return Promise.resolve(setMyOrgPromise);
};
Expand Down
1 change: 1 addition & 0 deletions src/app/Interface/MilestoneInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export interface Milestones {
CreatorUid: string;
StartDate: string;
EndDate: string;
ColorCode: string;
}
4 changes: 4 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ import { StandardSubscriptionComponent } from './body/standard-subscription/stan
import { ReleaseComponent } from './body/release/release.component';
import { ReleaseDetailsComponent } from './body/release-details/release-details.component';
import { DocumentationsComponent } from './body/documentations/documentations.component';
import { GetStartedComponent } from './body/get-started/get-started.component';
import { FeaturesPageComponent } from './body/features-page/features-page.component';

const redirectLoggedInToDashboard = () => redirectLoggedInTo(['MyDashboard']);

Expand Down Expand Up @@ -111,6 +113,8 @@ const routes: Routes = [
{ path: 'PaymentStatus/:orderId/:paymentId/:signature/:subscriptionId', component:PaymentStatusComponent, canActivate:[AngularFireAuthGuard] },
{ path: 'Standard', component:StandardSubscriptionComponent},
{ path: 'Documentations', component:DocumentationsComponent },
{ path: 'GettingStarted', component: GetStartedComponent },
{ path: 'Features/:currentSection', component: FeaturesPageComponent,},
{ path: '**', pathMatch: 'full', component: PagenotfoundComponent },
];

Expand Down
24 changes: 24 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,18 @@ import { GitlabComponent } from './body/task-details/gitlab/gitlab.component';
import { GithubIntegrationComponent } from './body/team-details/github-integration/github-integration.component';
import { GitlabIntegrationComponent } from './body/team-details/gitlab-integration/gitlab-integration.component';
import { DocumentationsComponent } from './body/documentations/documentations.component';
import { GetStartedComponent } from './body/get-started/get-started.component';
import { FeaturesPageComponent } from './body/features-page/features-page.component';
import { BoardsFeatureComponent } from './body/features-page/boards-feature/boards-feature.component';
import { ChartsFeatureComponent } from './body/features-page/charts-feature/charts-feature.component';
import { DevopsFeatureComponent } from './body/features-page/devops-feature/devops-feature.component';
import { TechtagFeatureComponent } from './body/features-page/techtag-feature/techtag-feature.component';
import { MilestonesFeatureComponent } from './body/features-page/milestones-feature/milestones-feature.component';
import { MeetingsFeatureComponent } from './body/features-page/meetings-feature/meetings-feature.component';
import { OrganisationsFeatureComponent } from './body/features-page/organisations-feature/organisations-feature.component';
import { ProfileFeatureComponent } from './body/features-page/profile-feature/profile-feature.component';
import { QuicknotesFeatureComponent } from './body/features-page/quicknotes-feature/quicknotes-feature.component';
import { TasksFeatureComponent } from './body/features-page/tasks-feature/tasks-feature.component';

@NgModule({
declarations: [
Expand Down Expand Up @@ -355,6 +367,18 @@ import { DocumentationsComponent } from './body/documentations/documentations.co
GithubIntegrationComponent,
GitlabIntegrationComponent,
DocumentationsComponent,
GetStartedComponent,
FeaturesPageComponent,
BoardsFeatureComponent,
ChartsFeatureComponent,
DevopsFeatureComponent,
TechtagFeatureComponent,
MilestonesFeatureComponent,
MeetingsFeatureComponent,
OrganisationsFeatureComponent,
ProfileFeatureComponent,
QuicknotesFeatureComponent,
TasksFeatureComponent,
],
imports: [
BrowserModule,
Expand Down
52 changes: 45 additions & 7 deletions src/app/body/documentations/documentations.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,55 @@
border-radius: 5px;
}

.title {
font-size: xx-large;
color: #0000e4;
font-family: 'Plus Jakarta Sans', sans-serif;
}

/* .des {
color: #4a26fd;
} */

mat-icon {
font-size: 3rem;
width: 3rem;
height: 3rem;
}

.learn {
font-size: 4rem;
width: 4rem;
height: 4rem;
color: #0000e4;
}

.des {
font-size: large;
font-family: 'Plus Jakarta Sans', sans-serif;
}

.b1 {
background-color: #311B92;
color: #B39DDB;
background-color: #021aee;
color: #eee6ff;
cursor: pointer;
}

.b2 {
background-color: #512DA8;
color: #B39DDB;
background-color: #0013e9;
color: #eee6ff;
cursor: pointer;
}

.b3 {
background-color: #EDE7F6;
color: #4527A0;
}
background-color: #0000e4;
color: #eee6ff;
cursor: pointer;
}

.b1:hover,
.b2:hover,
.b3:hover {
background-color: #eee6ff;
color: #0000e4;
}
21 changes: 15 additions & 6 deletions src/app/body/documentations/documentations.component.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
<div class="page p-4">
<div class="row">
<div class="row py-2">
<div class="col-md-1 col-0"></div>
<div class="col"></div>
<div class="col text-center">
<span class="align-middle">
<!-- <mat-icon fontSet="material-icons-outlined" class="align-middle learn">
local_library
</mat-icon> -->
<img src="../../../assets/docs-page-svg/undraw_graduation_re_gthn.svg" alt="graphs" width="50%" height="50%">
</span>
<p class="title py-3 align-middle">Learn the fundamentals</p>
<p class="des align-middle">Explore our documents and resources to get the high level insight on fundamentals of worktez</p>
</div>
<div class="col-md-1 col-0"></div>
</div>
<div class="row">
<div class="row py-5">
<div class="col-md-1 col-0"></div>
<div class="col d-flex justify-content-center">
<div class="card text-center pt-4 p-2 b1">
<div class="card text-center pt-4 p-2 b1" (click)="getStarted()">
<span class="align-middle">
<mat-icon fontSet="material-icons-outlined card-img-top" class="align-middle">
navigation
Expand All @@ -23,11 +32,11 @@ <h3 class="card-title">Get started</h3>
model_training
</mat-icon>
</span>
<h3 class="card-title">Blogs and Resources</h3>
<h3 class="card-title">Blogs & Resources</h3>
</div>
</div>
<div class="col d-flex justify-content-center">
<div class="card text-center pt-4 p-2 b3">
<div class="card text-center pt-4 p-2 b3" (click)="features()">
<span class="align-middle">
<mat-icon fontSet="material-icons-outlined card-img-top" class="align-middle">
attractions
Expand Down
9 changes: 8 additions & 1 deletion src/app/body/documentations/documentations.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { Router } from '@angular/router';

@Component({
selector: 'app-documentations',
Expand All @@ -8,10 +9,16 @@ import { Title } from '@angular/platform-browser';
})
export class DocumentationsComponent implements OnInit {

constructor(private titleService: Title) { }
constructor(private titleService: Title, public router: Router) { }

ngOnInit(): void {
this.titleService.setTitle("Docs");
}

getStarted() {
this.router.navigate(['/GettingStarted']);
}
features() {
this.router.navigate(['/Features', 'boards'])
}
}
Loading

0 comments on commit 0193ece

Please sign in to comment.