give detlef vanhyb.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
maydar
2024-03-04 10:27:20 +01:00
parent 42a3b4ae48
commit 64a04b21bf
6 changed files with 110 additions and 37 deletions

View File

@@ -3,6 +3,9 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@openapitools/openapi-generator-cli": "^2.5.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",

View File

@@ -38,6 +38,13 @@ export interface EntityModelReport {
* @memberof EntityModelReport
*/
selectedBranch?: string;
/**
*
* @type {string}
* @memberof EntityModelReport
*/
selectedVanhybBranch?: string;
/**
*
* @type {string}
@@ -109,6 +116,7 @@ export function EntityModelReportFromJSONTyped(json: any, ignoreDiscriminator: b
'id': !exists(json, 'id') ? undefined : json['id'],
'selectedBranch': !exists(json, 'selectedBranch') ? undefined : json['selectedBranch'],
'selectedVanhybBranch': !exists(json, 'selectedVanhybBranch') ? undefined : json['selectedVanhybBranch'],
'prevRelease': !exists(json, 'prevRelease') ? undefined : json['prevRelease'],
'jiraRelease': !exists(json, 'jiraRelease') ? undefined : json['jiraRelease'],
'createdBy': !exists(json, 'createdBy') ? undefined : json['createdBy'],
@@ -131,6 +139,7 @@ export function EntityModelReportToJSON(value?: EntityModelReport | null): any {
'id': value.id,
'selectedBranch': value.selectedBranch,
'selectedVanhybBranch': value.selectedVanhybBranch,
'prevRelease': value.prevRelease,
'jiraRelease': value.jiraRelease,
'createdBy': value.createdBy,

View File

@@ -37,6 +37,12 @@ export interface ReportRequestBody {
* @memberof ReportRequestBody
*/
selectedBranch?: string;
/**
*
* @type {string}
* @memberof ReportRequestBody
*/
selectedVanhybBranch?: string;
/**
*
* @type {string}
@@ -103,6 +109,7 @@ export function ReportRequestBodyFromJSONTyped(json: any, ignoreDiscriminator: b
'id': !exists(json, 'id') ? undefined : json['id'],
'reportEntryList': !exists(json, 'reportEntryList') ? undefined : json['reportEntryList'],
'selectedBranch': !exists(json, 'selectedBranch') ? undefined : json['selectedBranch'],
'selectedVanhybBranch': !exists(json, 'selectedVanhybBranch') ? undefined : json['selectedVanhybBranch'],
'prevRelease': !exists(json, 'prevRelease') ? undefined : json['prevRelease'],
'jiraRelease': !exists(json, 'jiraRelease') ? undefined : json['jiraRelease'],
'createdBy': !exists(json, 'createdBy') ? undefined : json['createdBy'],
@@ -125,6 +132,7 @@ export function ReportRequestBodyToJSON(value?: ReportRequestBody | null): any {
'id': value.id,
'reportEntryList': value.reportEntryList,
'selectedBranch': value.selectedBranch,
'selectedVanhybBranch': value.selectedVanhybBranch,
'prevRelease': value.prevRelease,
'jiraRelease': value.jiraRelease,
'createdBy': value.createdBy,

View File

@@ -1,4 +1,4 @@
import {Button, Container, Form, InputGroup} from "react-bootstrap";
import {Button, Col, Container, Form, InputGroup, Row} from 'react-bootstrap';
import {CredentialsStore} from "../stores/CredentialsStore";
import {observable} from "mobx";
import {observer} from "mobx-react";
@@ -8,6 +8,9 @@ import {useNavigate} from "react-router-dom";
import Loader from "../atoms/Loader";
import React, {useState} from "react";
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faCalendarAlt, faCodeBranch, faTasks} from '@fortawesome/free-solid-svg-icons';
interface ManagementProps {
credentialsStore: CredentialsStore
@@ -15,9 +18,18 @@ interface ManagementProps {
class CreateReportStore {
@observable private _selectedBranch = "";
@observable private _selectedVanhybBranch = "";
@observable private _prevRelease = "";
@observable private _jiraRelease = "";
get selectedVanhybBranch(): string {
return this._selectedVanhybBranch;
}
set selectedVanhybBranch(value: string) {
this._selectedVanhybBranch = value;
}
get selectedBranch(): string {
return this._selectedBranch;
}
@@ -83,7 +95,8 @@ const Management = (props: ManagementProps) => {
axios.post(DefaultConfig.basePath + "/reports/create", {
jiraRelease: createReportStore.jiraRelease,
prevRelease: createReportStore.prevRelease,
selectedBranch: createReportStore.selectedBranch
selectedBranch: createReportStore.selectedBranch,
selectedVanhybBranch: createReportStore.selectedVanhybBranch
}, {
headers: {
"Content-Type": "application/json",
@@ -126,46 +139,76 @@ const Management = (props: ManagementProps) => {
</Form>
)}
<br/>
<h2>Create Report:</h2>
<h2>Create Report</h2>
<Form>
<InputGroup>
<Form.Control type="text" placeholder="Selected branch"
onChange={(event) => createReportStore.selectedBranch = event.target.value}/>
</InputGroup>
<InputGroup>
<Form.Control type="text" placeholder="prev release"
onChange={(event) => createReportStore.prevRelease = event.target.value}/>
</InputGroup>
<InputGroup>
<Form.Control type="text" placeholder="Jira release"
onChange={(event) => createReportStore.jiraRelease = event.target.value}/>
</InputGroup>
<div className="mb-3">
<p>Enter the following details to create a report</p>
</div>
<Form.Group as={Row} className="mb-3" controlId="formSelectedBranch">
<Form.Label column sm="2">
Selected Branch(optional)
</Form.Label>
<Col sm="10">
<InputGroup>
<InputGroup.Text>
<FontAwesomeIcon icon={faCodeBranch}/>
</InputGroup.Text>
<Form.Control type="text" placeholder="release/2024-02"
onChange={(event) => createReportStore.selectedBranch = event.target.value}/>
</InputGroup>
</Col>
</Form.Group>
<Form.Group as={Row} className="mb-3" controlId="formSelectedVanhybBranch">
<Form.Label column sm="2">
Selected Vanhyb Branch (optional)
</Form.Label>
<Col sm="10">
<InputGroup>
<InputGroup.Text>
<FontAwesomeIcon icon={faCodeBranch}/>
</InputGroup.Text>
<Form.Control type="text" placeholder="release/24.2"
onChange={(event) => createReportStore.selectedVanhybBranch = event.target.value}/>
</InputGroup>
</Col>
</Form.Group>
<Form.Group as={Row} className="mb-3" controlId="formPreviousRelease">
<Form.Label column sm="2">
Previous Release (until 24.03.01, vanhyb data will be missing, sorries)
</Form.Label>
<Col sm="10">
<InputGroup>
<InputGroup.Text>
<FontAwesomeIcon icon={faCalendarAlt}/>
</InputGroup.Text>
<Form.Control type="text" placeholder="24.01.03"
onChange={(event) => createReportStore.prevRelease = event.target.value}/>
</InputGroup>
</Col>
</Form.Group>
<Form.Group as={Row} className="mb-3" controlId="formJiraRelease">
<Form.Label column sm="2">
Jira Release
</Form.Label>
<Col sm="10">
<InputGroup>
<InputGroup.Text>
<FontAwesomeIcon icon={faTasks}/>
</InputGroup.Text>
<Form.Control type="text" placeholder="24.02.01"
onChange={(event) => createReportStore.jiraRelease = event.target.value}/>
</InputGroup>
</Col>
</Form.Group>
<Button variant="primary" type="button" onClick={createReport}>
Create report
</Button>
</Form>
{/*<h1>Create Report</h1>*/}
{/*<form action="/credentials/" id="set-creds-form" method="post">*/}
{/* <div>*/}
{/* <input placeholder="Bitbucket User" name="userName" type="text"/>*/}
{/* <br/>*/}
{/* <input placeholder="Bitbucket Password" name="password" type="password"/>*/}
{/* <p><input type="submit" value="Submit Credentials"/> <input type="reset" value="Reset"/></p>*/}
{/* </div>*/}
{/*</form>*/}
{/*<form action="/reports/create" id="create-report-form" method="post">*/}
{/* <input placeholder="Select Branch" name="selectedBranch" type="text"/>*/}
{/* <input placeholder="Previous Release" name="prevRelease" type="text"/>*/}
{/* <input placeholder="Jira Release" name="jiraRelease" type="text"/>*/}
{/* <br/><br/>*/}
{/* <p><input type="submit" value="Create Report"/> <input type="reset" value="Reset"/></p>*/}
{/*</form>*/}
</Container>
};

View File

@@ -106,6 +106,9 @@ function Report(props: ReportProps) {
updateEntry(reportEntry);
}}/>
</td>
<td>
{reportEntry.issueType}
</td>
<td>
{reportEntry.jiraStatus}
</td>
@@ -198,6 +201,9 @@ function Report(props: ReportProps) {
Status
</th>
<th>Notes</th>
<th style={{width: "40px", cursor: "pointer"}} onClick={() => props.reportStore.sortField = "issueType"}>
IssueType
</th>
<th style={{width: "40px", cursor: "pointer"}} className="table-sort"
onClick={() => props.reportStore.sortField = "jiraStatus"}>
Jira Status
@@ -227,6 +233,7 @@ function Report(props: ReportProps) {
<th style={{width: "150px"}} className="table-sort">Name</th>
<th style={{width: "160px"}}>Status</th>
<th>Notes</th>
<th style={{width: "40px"}} className="table-sort">IssueType</th>
<th style={{width: "40px"}} className="table-sort">Jira Status</th>
<th style={{width: "40px"}}>Team</th>
<th style={{width: "40px"}}>PO</th>
@@ -247,6 +254,7 @@ function Report(props: ReportProps) {
<th style={{width: "150px"}} className="table-sort">Name</th>
<th style={{width: "160px"}}>Status</th>
<th>Notes</th>
<th style={{width: "40px"}} className="table-sort">IssueType</th>
<th style={{width: "40px"}} className="table-sort">Jira Status</th>
<th style={{width: "40px"}}>Team</th>
<th style={{width: "40px"}}>PO</th>

View File

@@ -29,6 +29,7 @@ export default function Reports() {
<Link to={'/report/' + report.id}>{report.id}</Link>
</td>
<td>{report.selectedBranch}</td>
<td>{report.selectedVanhybBranch}</td>
<td>{report.prevRelease}</td>
<td>{report.jiraRelease}</td>
<td>{report.created?.toDateString()}</td>
@@ -49,6 +50,7 @@ export default function Reports() {
<tr>
<th>ID</th>
<th>Selected Branch</th>
<th>Selected Vanhyb Branch</th>
<th>Previous Release</th>
<th>Jira Release</th>
<th>Created At</th>