Add 'sleep' status to Production model and update related components
- Introduced a new 'sleep' boolean field in the Production model to indicate if production is suspended. - Updated FalukantService to include 'sleep' in the production attributes. - Enhanced MessagesDialog and ProductionSection components to display the production status and handle branch names. - Added corresponding translations for 'status', 'sleep', and 'active' in both German and English locale files.
This commit is contained in:
@@ -22,7 +22,12 @@ Production.init({
|
||||
startTimestamp: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: false,
|
||||
defaultValue: sequelize.literal('CURRENT_TIMESTAMP')}
|
||||
defaultValue: sequelize.literal('CURRENT_TIMESTAMP')},
|
||||
sleep: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
comment: 'Produktion ist zurückgestellt'}
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'Production',
|
||||
|
||||
@@ -838,7 +838,7 @@ class FalukantService extends BaseService {
|
||||
{
|
||||
model: Production,
|
||||
as: 'productions',
|
||||
attributes: ['quantity', 'startTimestamp'],
|
||||
attributes: ['quantity', 'startTimestamp', 'sleep'],
|
||||
include: [{ model: ProductType, as: 'productType', attributes: ['id', 'category', 'labelTr', 'sellCost', 'productionTime'] }]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user