Feat(SQL, UI): Logic for Get-Many SQL Stored Procedures refactored to use Calc Stored Procedures and Dog Command Links page styling improved.
This commit is contained in:
@@ -24,7 +24,7 @@ class Command(SQLAlchemy_ABC, Base):
|
||||
FLAG_COMMAND: ClassVar[str] = 'command'
|
||||
FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION: ClassVar[str] = 'hand-signal-default-description'
|
||||
FLAG_CAN_HAVE_BUTTON: ClassVar[str] = 'can-have-button'
|
||||
NAME_ATTR_OPTION_VALUE: ClassVar[str] = FLAG_COMMAND
|
||||
NAME_ATTR_OPTION_VALUE: ClassVar[str] = ATTR_ID_COMMAND
|
||||
NAME_ATTR_OPTION_TEXT: ClassVar[str] = Base.FLAG_NAME
|
||||
|
||||
__tablename__ = 'DOG_Command'
|
||||
@@ -78,7 +78,7 @@ class Command(SQLAlchemy_ABC, Base):
|
||||
_m = 'Command.from_json'
|
||||
command = cls()
|
||||
if json is None: return Command
|
||||
Helper_App.console_log(f'{_m}\njson: {json}')
|
||||
# Helper_App.console_log(f'{_m}\njson: {json}')
|
||||
command.id_command = -1
|
||||
command.id_command_category = json[Command_Category.FLAG_COMMAND_CATEGORY]
|
||||
command.name = json[cls.FLAG_NAME]
|
||||
@@ -87,12 +87,13 @@ class Command(SQLAlchemy_ABC, Base):
|
||||
command.notes = json[cls.FLAG_NOTES]
|
||||
command.active = json[cls.FLAG_ACTIVE]
|
||||
command.created_on = json.get(cls.FLAG_CREATED_ON, None)
|
||||
Helper_App.console_log(f'Command: {command}')
|
||||
# Helper_App.console_log(f'Command: {command}')
|
||||
return command
|
||||
|
||||
def to_json(self):
|
||||
as_json = {
|
||||
self.FLAG_COMMAND: self.id_command
|
||||
**self.get_shared_json_attributes(self)
|
||||
, self.ATTR_ID_COMMAND: self.id_command
|
||||
, Command_Category.FLAG_COMMAND_CATEGORY: self.id_command_category
|
||||
, self.FLAG_NAME: self.name
|
||||
, self.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION: self.hand_signal_default_description
|
||||
@@ -101,7 +102,7 @@ class Command(SQLAlchemy_ABC, Base):
|
||||
, self.FLAG_ACTIVE: self.active
|
||||
, self.FLAG_CREATED_ON: self.created_on
|
||||
}
|
||||
Helper_App.console_log(f'as_json: {as_json}')
|
||||
# Helper_App.console_log(f'as_json: {as_json}')
|
||||
return as_json
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
Reference in New Issue
Block a user