-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andrey Sobolev <[email protected]>
- Loading branch information
Showing
45 changed files
with
654 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// | ||
// Copyright © 2023 Hardcore Engineering Inc. | ||
// | ||
// Licensed under the Eclipse Public License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. You may | ||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import { Attribute, Domain, DOMAIN_MODEL, Ref, Status, StatusCategory } from '@hcengineering/core' | ||
import { Model, Prop, TypeRef, UX } from '@hcengineering/model' | ||
import { Asset, IntlString } from '@hcengineering/platform' | ||
import core from './component' | ||
import { TDoc } from './core' | ||
|
||
export const DOMAIN_STATUS = 'status' as Domain | ||
|
||
// S P A C E | ||
|
||
@Model(core.class.Status, core.class.Doc, DOMAIN_STATUS) | ||
@UX(core.string.Status) | ||
export class TStatus extends TDoc implements Status { | ||
// We attach to attribute, so we could distinguish between | ||
ofAttribute!: Ref<Attribute<Status>> | ||
|
||
@Prop(TypeRef(core.class.StatusCategory), core.string.StatusCategory) | ||
category!: Ref<StatusCategory> | ||
|
||
name!: string | ||
color!: number | ||
description!: string | ||
rank!: string | ||
} | ||
|
||
@Model(core.class.StatusCategory, core.class.Doc, DOMAIN_MODEL) | ||
@UX(core.string.StatusCategory) | ||
export class TStatusCategory extends TDoc implements StatusCategory { | ||
// We attach to attribute, so we could distinguish between | ||
ofAttribute!: Ref<Attribute<Status>> | ||
|
||
icon!: Asset | ||
label!: IntlString | ||
color!: number | ||
defaultStatusName!: string | ||
order!: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.