* dev: workspace states and estimates * refactor issue dropdown logic to help work properly with issues on global level * fix: project labels response change * fix label type * change store computed actions to computed functions from mobx-utils * fix: state response change * chore: project and workspace state change * fix state and label types * chore: state and label serializer change * modify state and label types * fix dropdown reset on project id change * fix label sort order --------- Co-authored-by: pablohashescobar <nikhilschacko@gmail.com> Co-authored-by: Rahul R <rahulr@Rahuls-MacBook-Pro.local> Co-authored-by: NarayanBavisetti <narayan3119@gmail.com> Co-authored-by: Rahul R <rahul.ramesha@plane.so>
37 lines
715 B
Python
37 lines
715 B
Python
# Module imports
|
|
from .base import BaseSerializer
|
|
|
|
|
|
from plane.db.models import State
|
|
|
|
|
|
class StateSerializer(BaseSerializer):
|
|
class Meta:
|
|
model = State
|
|
fields = [
|
|
"id",
|
|
"project_id",
|
|
"workspace_id",
|
|
"name",
|
|
"color",
|
|
"group",
|
|
"default",
|
|
"description",
|
|
"sequence",
|
|
]
|
|
read_only_fields = [
|
|
"workspace",
|
|
"project",
|
|
]
|
|
|
|
|
|
class StateLiteSerializer(BaseSerializer):
|
|
class Meta:
|
|
model = State
|
|
fields = [
|
|
"id",
|
|
"name",
|
|
"color",
|
|
"group",
|
|
]
|
|
read_only_fields = fields
|