Skip to content

Commit 7f587c6

Browse files
authored
Merge pull request #4357 from deandex/feature/project-plan-simplification-0
fix: #4355 - remove duration from payload, #4350 - revert back duration field and css
2 parents 416fa1c + 6cb96da commit 7f587c6

File tree

2 files changed

+8
-53
lines changed

2 files changed

+8
-53
lines changed

src/projects/detail/components/PhaseCard/EditStageForm.jsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ class EditStageForm extends React.Component {
7676
}
7777

7878
submitValue(model) {
79-
console.log(model)
8079
const { phase, phaseIndex, updatePhaseAction } = this.props
8180
const {
8281
publishClicked
@@ -91,8 +90,7 @@ class EditStageForm extends React.Component {
9190
description: model.description || ' ',
9291
startDate: updatedStartDate,
9392
endDate: updatedEndDate || '',
94-
status: newStatus,
95-
duration: moment.utc(updatedEndDate).diff(updatedStartDate, 'days')
93+
status: newStatus
9694
})
9795
this.setState({
9896
isUpdating: true,
@@ -102,6 +100,7 @@ class EditStageForm extends React.Component {
102100
}
103101

104102
onFormSubmit(model) {
103+
console.log(model)
105104
const { phase } = this.props
106105
const { showActivatingWarning, publishClicked } = this.state
107106

@@ -244,8 +243,6 @@ class EditStageForm extends React.Component {
244243
endDate = moment.utc(endDate).format('YYYY-MM-DD')
245244
const canDelete = phase.status !== PHASE_STATUS_ACTIVE && phase.status !== PHASE_STATUS_COMPLETED
246245
const isDraft = phase.status === PHASE_STATUS_DRAFT
247-
const duration = moment.utc(endDate).diff(startDate, 'days')
248-
console.log(duration)
249246

250247
return (
251248
<div styleName="container">
@@ -326,14 +323,6 @@ class EditStageForm extends React.Component {
326323
name="endDate"
327324
value={endDate}
328325
/>
329-
<TCFormFields.TextInput
330-
wrapperClass={`${styles['input-row']}`}
331-
disabled
332-
label="Duration"
333-
type="text"
334-
name="duration"
335-
value={`${duration} days`}
336-
/>
337326
</div>
338327
{!showActivatingWarning ? (
339328
<div styleName="group-bottom">

src/projects/detail/components/PhaseCard/EditStageForm.scss

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
.input-row {
3535
display: inline-block;
36-
width: 45%;
36+
width: 50%;
3737

3838
:global {
3939

@@ -51,7 +51,7 @@
5151
}
5252
input, textarea {
5353
display: inline-block;
54-
width:calc(100% - 170px);
54+
width:calc(100% - 170px)!important;
5555
}
5656

5757
textarea{
@@ -67,7 +67,7 @@
6767
white-space: nowrap;
6868
display: block;
6969
width: 150px;
70-
70+
7171
}
7272

7373
input:not([type="checkbox"]):disabled {
@@ -108,7 +108,7 @@
108108

109109
.title-label-layer,
110110
.description-label-layer {
111-
111+
112112
.input-row {
113113
width: 100%;
114114
input {
@@ -158,40 +158,6 @@
158158
}
159159
}
160160

161-
.label-layer {
162-
.input-row:nth-child(1) {
163-
input {
164-
width: calc(100% - 170px);
165-
}
166-
}
167-
168-
.input-row:nth-child(2) {
169-
width: 35%;
170-
171-
label {
172-
width: 75px;
173-
}
174-
175-
input{
176-
width: calc(100% - 100px);
177-
}
178-
}
179-
180-
.input-row:nth-child(3) {
181-
width: 20%;
182-
183-
label {
184-
width: 70px;
185-
padding-right: 0;
186-
}
187-
188-
input{
189-
width: calc(100% - 90px);
190-
font-size: 13px;
191-
}
192-
}
193-
}
194-
195161
// screen < 1024px
196162
@media screen and (max-width: 1023px) {
197163
.label-layer:nth-child(4) > :global(.Tooltip) {
@@ -205,7 +171,7 @@
205171
.label-layer,
206172
.input-row {
207173
display: block;
208-
width: 100% !important;
174+
width: 100%;
209175
input:not([type="checkbox"]):disabled {
210176
width: 100%;
211177
}
@@ -237,7 +203,7 @@
237203
display: block;
238204
}
239205
label {
240-
width: 100% !important;
206+
width: 100%;
241207
display: block;
242208
text-align: left;
243209
margin: 0;

0 commit comments

Comments
 (0)