Skip to content

Commit 2b06879

Browse files
alexander.fridrichmarcel.heidebrecht
alexander.fridrich
authored and
marcel.heidebrecht
committed
Merge branch '119-merge-branches-isp-wup' into 'master' (squash)
Resolve "Merge Branches ISP WUP" Closes #119 See merge request juniter/pv-tool3/frontend!126 * Fix missing bt_rate adaption to min and max values for project tender edit view * Fix node version to v18 due to dependency restrictions in our bundler. See: vuejs/vue-cli#7424 * Duplicate Project Tender is Possible now * Add checkbox and indication to project tender whether offer is needed * Add indicator and filter for reference stuff * Add reference_approval_valid_until field to project * Add nda field to project * Add industry field to project_tender and project * Changed bt_rate to max and min * Make role selection for project applications multiple * Add playwright to project with default config * Remove jest framework from project for playwright * Vorlagen reiter ticket gemacht * Add club bonus and acquisitoin bonus fields to project creation * Improve some navigations by using replace instead push for router actions * Add role filter for project cast compare dialog * Added Kunden Filter * Added Text to Time * Change layout of Project Cast Edit View to bootstrap container with columns in order to remove jumping of cards * Filter out projekt subtype which starts with old * Add missing negation in date picker rules * workload verbessert * isPositiveInt verbessert und workload hinzugefügt * Draft Modus und BT max kleiner BT min gefixed * Roles con only use positive Ints * Antworten werden bei interresnbekundungen nicht mehr angezeigt * ALEX IST DOOF
1 parent 2c8b352 commit 2b06879

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+17296
-27878
lines changed

.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ module.exports = {
4040
'**/tests/unit/**/*.spec.{j,t}s?(x)'
4141
],
4242
env: {
43-
jest: true
4443
}
4544
},
4645
{

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ yarn-error.log*
2020
*.njsproj
2121
*.sln
2222
*.sw*
23+
/test-results/
24+
/playwright-report/
25+
/blob-report/
26+
/playwright/.cache/

.gitlab-ci.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ stages:
2626
- deploy
2727

2828
lint:
29-
image: node:lts
29+
image: node:18
3030
stage: lint
3131
needs: []
3232
cache:
@@ -42,15 +42,14 @@ lint:
4242

4343

4444
test:
45-
image: node:lts
45+
image: mcr.microsoft.com/playwright:v1.48.1-noble
4646
stage: test
47-
needs: []
4847
cache:
4948
paths:
5049
- node_modules
5150
script:
52-
- npm install --progress=false
53-
- VUE_APP_ENV=dev npm run test:unit
51+
- npm ci
52+
- VUE_APP_ENV=dev npm run test
5453
rules:
5554
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
5655
- if: $CI_COMMIT_REF_PROTECTED == "true"

README.md

-5
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,3 @@ npm run test
4646
```
4747
npm run lint
4848
```
49-
50-
### Run your unit tests
51-
```
52-
npm run test:unit
53-
```

jest.config.js

-18
This file was deleted.

modules/boards/views/BoardDetail.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@
6666
<v-row>
6767
<!-- add overview of meetings occured between start_date and end_date -->
6868
<v-col cols="12" md="4" class="px-5">
69-
<h2 class="text-h4 text--primary mb-3">Mitglieder-
70-
versammlungen</h2>
69+
<h2 class="text-h4 text--primary mb-3">Mitgliederversammlungen</h2>
7170
<p class="text-body-2 text--secondary">
7271
Mitgliederversammlungen im Zeitraum dieses Vorstandsjahres
7372
</p>

modules/project-application/components/ProjectApplicationListItem.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<v-list-item-content>
1010
<v-list-item-title>{{ projectApplication.participant.full_name }}</v-list-item-title>
11-
<v-list-item-subtitle>{{ $enum('ProjectRoleEnum', projectApplication.role) }}</v-list-item-subtitle>
11+
<v-list-item-subtitle v-for="role in projectApplication.roles" :key="role">{{ $enum('ProjectRoleEnum', role) }}</v-list-item-subtitle>
1212
<v-list-item-subtitle><v-chip small>{{ $enum('ProjectApplicationStatusEnum', projectApplication.status) }}</v-chip></v-list-item-subtitle>
1313
</v-list-item-content>
1414
<v-list-item-action>

modules/project-application/components/ProjectAvailableTime.vue

+34
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44
Verfügbarkeit
55
</v-card-title>
66
<v-card-text>
7+
<!-- Angebot notwendig -->
8+
<div class="row">
9+
<div class="col-md-12">
10+
<v-checkbox
11+
v-model="offerNeeded"
12+
prepend-icon="mdi-presentation"
13+
label="Angebot notwendig"
14+
:disabled="true"
15+
>
16+
</v-checkbox>
17+
</div>
18+
</div>
719
<div class="row">
820
<div v-for="week in weeks" :key="week.label" class="col-md-3 col-sm-6 col-12 py-1">
921
<template v-if="!readonly">
@@ -26,6 +38,16 @@
2638
</div>
2739
</div>
2840
</v-card-text>
41+
<v-card-text>
42+
Anmerkung zu Zeitangaben
43+
<v-textarea
44+
placeholder="Hier antworten"
45+
v-model= "textarea"
46+
filled
47+
outlined
48+
dense
49+
></v-textarea>
50+
</v-card-text>
2951
</v-card>
3052
</template>
3153

@@ -38,27 +60,38 @@ export default class ProjectAvailableTime extends Vue {
3860
3961
public btValues = new Array(16).fill(0).map((_, i) => ({ value: (i)/2, text: `${this.$common.decimal2Text((i)/2)}`}));
4062
public localValue = {}
63+
public textarea = ''
4164
4265
@Prop()
4366
public fromDate!: string;
4467
4568
@Prop()
4669
public toDate!: string;
4770
71+
@Prop()
72+
public readonly offerNeeded!: boolean;
73+
4874
@Prop()
4975
public readonly value!: object;
5076
5177
@Prop({ default: false})
5278
public readonly readonly!: boolean;
5379
80+
@Watch('textarea')
81+
public onTextareaChange(newValue: string) {
82+
this.setTimeSlotAt('Anmerkungen', newValue);
83+
}
84+
5485
5586
@Watch('value', { immediate: true })
5687
public onValueChange(value: object) {
5788
if (!value) {
5889
this.localValue = {};
90+
this.textarea = ''; // Initialize textarea
5991
return;
6092
}
6193
this.localValue = value;
94+
this.textarea = this.localValue['Anmerkungen'] || ''; // Populate textarea
6295
}
6396
6497
@@ -68,6 +101,7 @@ export default class ProjectAvailableTime extends Vue {
68101
69102
public setTimeSlotAt(key: string, value: string) {
70103
this.localValue[key] = value;
104+
console.log(this.localValue);
71105
this.$emit('input', this.localValue);
72106
}
73107

modules/project-application/components/ProjectTenderCard.vue

+22-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
<v-icon small>mdi-briefcase</v-icon>
3434
<span class="text-caption">{{ projectTender.min_bt + 'BT' }} {{ (projectTender.max_bt && projectTender.max_bt !== projectTender.min_bt) ? (' - ' + projectTender.max_bt + 'BT') : '' }}</span>
3535
</div>
36+
<div>
37+
<v-icon small>mdi-briefcase-download</v-icon>
38+
<span class="text-caption">{{ ((projectTender.min_bt + projectTender.max_bt)/2)/sumRoles(projectTender) }} BT/Person</span>
39+
</div>
3640
</div>
3741
</v-list-item>
3842
</v-card-text>
@@ -41,7 +45,10 @@
4145
</div>
4246
<v-card-actions>
4347
<v-spacer></v-spacer>
44-
<v-btn small outlined color="cctPurple" :to="{ name: 'project-tender-detail', params: { id: projectTender.id }}">
48+
<v-btn small dark color="cctPurple" :to="{ name: 'project-tender-create', params: { from: projectTender.id }}" v-if="hasProjectTenderPermission()">
49+
Duplizieren
50+
</v-btn>
51+
<v-btn small outlined color="cctPurple" :to="{ name: 'project-tender-detail', params: { id: projectTender.id }}" >
4552
Details
4653
</v-btn>
4754
</v-card-actions>
@@ -53,13 +60,27 @@ import ViewComponent from '@/components/editor/ViewComponent.vue';
5360
import UserChip from '@/components/user-chip/UserChip.vue';
5461
import { Vue, Component, Prop } from 'vue-property-decorator'
5562
import { ProjectTender } from '../types'
63+
import { readHasAnyPermission } from '@/store/main/getters';
5664
5765
@Component({
5866
components: { UserChip, ViewComponent }
5967
})
6068
export default class ProjectTenderCard extends Vue {
69+
70+
public sumRoles = (tender:ProjectTender): number => {
71+
let sum = 0;
72+
const x = tender.needed_project_roles_counts;
73+
Object.keys(x).forEach(key => {
74+
sum += x[key]
75+
});
76+
return sum;
77+
};
6178
@Prop()
6279
public projectTender!: ProjectTender;
80+
81+
public hasProjectTenderPermission() {
82+
return readHasAnyPermission(this.$store)(['portal.project-tender.create']);
83+
}
6384
}
6485
</script>
6586

modules/project-application/types/index.ts

+48-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ import { ProjectRoleEnum, ProjectTypeEnum } from '@modules/projects/types';
44

55
export type ProjectApplicationStatusEnum = 'draft' | 'interest' | 'completed'
66

7+
export type IndustryEnum =
8+
| 'automotive'
9+
| 'banking_finance'
10+
| 'insurance'
11+
| 'healthcare'
12+
| 'pharma_biotech'
13+
| 'energy_utilities'
14+
| 'renewable_energy'
15+
| 'technology_it'
16+
| 'telecommunication'
17+
| 'retail_ecommerce'
18+
| 'logistics_transport'
19+
| 'aviation'
20+
| 'construction_real_estate'
21+
| 'media_entertainment'
22+
| 'education'
23+
| 'public_sector'
24+
| 'defense_security'
25+
| 'tourism_hospitality'
26+
| 'consumer_goods'
27+
| 'manufacturing'
28+
| 'agriculture'
29+
| 'chemicals'
30+
| 'fashion_textiles'
31+
| 'non_profit'
32+
| 'startups_vc'
33+
| 'sports_leisure'
34+
| 'creative_industries'
35+
| 'other';
36+
37+
738
export interface ProjectCastCreate {
839
project_tender_id: number;
940
applications_ids?: { [k in ProjectRoleEnum]?: number[] };
@@ -38,7 +69,7 @@ export interface ProjectApplication {
3869
project_tender: ProjectTender;
3970
project_tender_id: number;
4071
project_id?: number;
41-
role: ProjectRoleEnum;
72+
roles: ProjectRoleEnum[];
4273
status: ProjectApplicationStatusEnum;
4374
files?: string;
4475
versioned_folder?: VersionedFolder;
@@ -51,7 +82,7 @@ export interface ProjectApplicationCreate {
5182
project_tender_id: number;
5283
files?: string;
5384
versioned_folder?: VersionedFolder;
54-
role: ProjectRoleEnum;
85+
roles: ProjectRoleEnum[];
5586
status?: ProjectApplicationStatusEnum;
5687
answered_questions?: ProjectApplicationAnsweredQuestion[];
5788
available_time?: object;
@@ -74,9 +105,11 @@ export interface ProjectTender {
74105
description?: string
75106
min_bt?: number;
76107
max_bt?: number;
77-
bt_rate?: number;
108+
min_bt_rate?: number;
109+
max_bt_rate?: number;
78110
date_deadline: string;
79111
is_deadline_passed: boolean;
112+
offer_needed: boolean;
80113

81114
project_start_date_expected: string;
82115
project_end_date_expected: string;
@@ -89,6 +122,8 @@ export interface ProjectTender {
89122
author: IUserProfile;
90123
files?: string;
91124
versioned_folder?: VersionedFolder;
125+
126+
industry: IndustryEnum[];
92127
}
93128

94129
export interface ProjectTenderCreate {
@@ -98,8 +133,10 @@ export interface ProjectTenderCreate {
98133
description?: string
99134
min_bt?: number;
100135
max_bt?: number;
101-
bt_rate?: number;
136+
min_bt_rate?: number;
137+
max_bt_rate?: number;
102138
date_deadline: string;
139+
offer_needed: boolean;
103140

104141
project_start_date_expected: string;
105142
project_end_date_expected: string;
@@ -108,6 +145,8 @@ export interface ProjectTenderCreate {
108145

109146
needed_project_roles_counts: { [k in ProjectRoleEnum]: number };
110147

148+
industry: IndustryEnum[];
149+
111150
}
112151

113152

@@ -118,8 +157,10 @@ export interface ProjectTenderCreation {
118157
description?: string
119158
min_bt?: string;
120159
max_bt?: string;
121-
bt_rate?: string;
160+
min_bt_rate?: string;
161+
max_bt_rate?: string;
122162
date_deadline: string;
163+
offer_needed: boolean;
123164

124165
project_start_date_expected: string;
125166
project_end_date_expected: string;
@@ -129,4 +170,6 @@ export interface ProjectTenderCreation {
129170

130171
files?: string;
131172
versioned_folder?: VersionedFolder;
173+
174+
industry: IndustryEnum[];
132175
}

modules/project-application/views/EditProjectApplication.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
<div class="pa-5">
2020
<v-select
2121
outlined
22-
v-model="projectApplication.role"
22+
v-model="projectApplication.roles"
2323
label="Projektrolle"
2424
:items="filteredRoles"
2525
class="input-lg"
26+
multiple
27+
chips
2628
>
2729
</v-select>
2830

@@ -107,6 +109,7 @@
107109
<project-available-time
108110
:fromDate="projectTender.project_start_date_expected"
109111
:toDate="projectTender.project_end_date_expected"
112+
:offerNeeded="projectTender.offer_needed"
110113
v-model="projectApplication.available_time"
111114
outlined
112115
>

0 commit comments

Comments
 (0)