mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
UBER-977: A remaining time (#3783)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
d97b476ecf
commit
eeb111bf44
@ -236,6 +236,13 @@ export class TIssue extends TTask implements Issue {
|
||||
@ReadOnly()
|
||||
reportedTime!: number
|
||||
|
||||
// A fully virtual property with calculated content.
|
||||
// TODO: Add proper support for this kind of fields
|
||||
@Prop(TypeNumber(), tracker.string.RemainingTime)
|
||||
@ReadOnly()
|
||||
@Hidden()
|
||||
remainingTime!: number
|
||||
|
||||
@Prop(Collection(tracker.class.TimeSpendReport), tracker.string.TimeSpendReports)
|
||||
reports!: number
|
||||
|
||||
@ -298,7 +305,7 @@ export class TIssueTemplate extends TDoc implements IssueTemplate {
|
||||
@Model(tracker.class.TimeSpendReport, core.class.AttachedDoc, DOMAIN_TRACKER)
|
||||
@UX(tracker.string.TimeSpendReport, tracker.icon.TimeReport)
|
||||
export class TTimeSpendReport extends TAttachedDoc implements TimeSpendReport {
|
||||
@Prop(TypeRef(tracker.class.Issue), tracker.string.Parent)
|
||||
@Prop(TypeRef(tracker.class.Issue), tracker.string.Issue)
|
||||
declare attachedTo: Ref<Issue>
|
||||
|
||||
@Prop(TypeRef(contact.mixin.Employee), contact.string.Employee)
|
||||
|
@ -42,7 +42,8 @@ export default mergeIds(trackerId, tracker, {
|
||||
ConfigDescription: '' as IntlString,
|
||||
Unarchive: '' as IntlString,
|
||||
UnarchiveConfirm: '' as IntlString,
|
||||
AllProjects: '' as IntlString
|
||||
AllProjects: '' as IntlString,
|
||||
RemainingTime: '' as IntlString
|
||||
},
|
||||
activity: {
|
||||
TxIssueCreated: '' as AnyComponent,
|
||||
|
@ -227,13 +227,14 @@
|
||||
"MoveAndDeleteMilestoneConfirm": "Do you want to delete milestone and move issues to another milestone?",
|
||||
|
||||
"Estimation": "Estimation",
|
||||
"ReportedTime": "Reported Time",
|
||||
"TimeSpendReports": "Time spend reports",
|
||||
"ReportedTime": "Spent time",
|
||||
"RemainingTime": "Remaining Time",
|
||||
"TimeSpendReports": "Time spent reports",
|
||||
"TimeSpendReport": "Time",
|
||||
"TimeSpendReportAdd": "Add time report",
|
||||
"TimeSpendReportDate": "Date",
|
||||
"TimeSpendReportValue": "Reported days",
|
||||
"TimeSpendReportValueTooltip": "Reported time in man days",
|
||||
"TimeSpendReportValue": "Spent time",
|
||||
"TimeSpendReportValueTooltip": "Spent time in hours",
|
||||
"TimeSpendReportDescription": "Description",
|
||||
"TimeSpendValue": "{value}d",
|
||||
"TimeSpendHours": "{value}h",
|
||||
|
@ -227,7 +227,8 @@
|
||||
"MoveAndDeleteMilestoneConfirm": "Вы действительно хотите удалить этап и перенести задачи в другой?",
|
||||
|
||||
"Estimation": "Оценка",
|
||||
"ReportedTime": "Использовано",
|
||||
"ReportedTime": "Потраченное времени",
|
||||
"RemainingTime": "Осталось времени",
|
||||
"TimeSpendReports": "Отчеты по времени",
|
||||
"TimeSpendReport": "Время",
|
||||
"TimeSpendReportAdd": "Добавить затраченное время",
|
||||
|
@ -159,11 +159,11 @@ test('report-time-from-issue-card', async ({ page }) => {
|
||||
}
|
||||
|
||||
await page.click('#ReportedTimeEditor')
|
||||
await page.waitForSelector('text="Time spend reports"')
|
||||
await page.waitForSelector('text="Time spent reports"')
|
||||
await page.click('#ReportsPopupAddButton')
|
||||
await page.waitForSelector('text="Add time report"')
|
||||
await expect(page.locator('button:has-text("Create")')).toBeDisabled()
|
||||
await page.fill('[placeholder="Reported\\ days"]', `${time}`)
|
||||
await page.fill('[placeholder="Spent time"]', `${time}`)
|
||||
await expect(page.locator('button:has-text("Create")')).toBeEnabled()
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.click('#card-close')
|
||||
@ -194,11 +194,11 @@ test('report-multiple-time-from-issue-card', async ({ page }) => {
|
||||
|
||||
for (let i = 0; i < 5; i++) {
|
||||
await expect(page.locator('.antiCard-content >> .footer')).toContainText(`Total: ${i}`)
|
||||
await page.waitForSelector('text="Time spend reports"')
|
||||
await page.waitForSelector('text="Time spent reports"')
|
||||
await page.click('#ReportsPopupAddButton')
|
||||
await page.waitForSelector('text="Add time report"')
|
||||
await expect(page.locator('button:has-text("Create")')).toBeDisabled()
|
||||
await page.fill('[placeholder="Reported\\ days"]', `${time}`)
|
||||
await page.fill('[placeholder="Spent time"]', `${time}`)
|
||||
await expect(page.locator('button:has-text("Create")')).toBeEnabled()
|
||||
await page.click('button:has-text("Create")')
|
||||
await expect(page.locator('.antiCard-content >> .footer')).toContainText(`Total: ${i + 1}`)
|
||||
@ -240,7 +240,7 @@ test('report-time-from-main-view', async ({ page }) => {
|
||||
await page.click('button:has-text("Add time report")')
|
||||
await page.waitForSelector('[id="tracker\\:string\\:TimeSpendReportAdd"] >> text=Add time report')
|
||||
await expect(page.locator('button:has-text("Create")')).toBeDisabled()
|
||||
await page.fill('[placeholder="Reported\\ days"]', `${time}`)
|
||||
await page.fill('[placeholder="Spent time"]', `${time}`)
|
||||
await expect(page.locator('button:has-text("Create")')).toBeEnabled()
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.click('#card-close')
|
||||
|
Loading…
Reference in New Issue
Block a user