status txt
This commit is contained in:
@@ -67,6 +67,19 @@ class ProductsService(BaseService):
|
|||||||
logger.info(f"Product Data ****** *****: {products}")
|
logger.info(f"Product Data ****** *****: {products}")
|
||||||
|
|
||||||
for t in products:
|
for t in products:
|
||||||
|
|
||||||
|
st_text = "Activate Now"
|
||||||
|
# match str(t.status):
|
||||||
|
if t.status == 1:
|
||||||
|
st_text = "Coming Soon"
|
||||||
|
|
||||||
|
if t.status == 5:
|
||||||
|
st_text = "Activate Now"
|
||||||
|
|
||||||
|
if t.status == 6:
|
||||||
|
st_text = "Creating"
|
||||||
|
|
||||||
|
|
||||||
product_data.append({
|
product_data.append({
|
||||||
'id': t.id,
|
'id': t.id,
|
||||||
'uid': t.uid,
|
'uid': t.uid,
|
||||||
@@ -79,7 +92,7 @@ class ProductsService(BaseService):
|
|||||||
'updated': t.updated.isoformat() if t.updated else None,
|
'updated': t.updated.isoformat() if t.updated else None,
|
||||||
'banner': t.banner,
|
'banner': t.banner,
|
||||||
'prov_status': 5,
|
'prov_status': 5,
|
||||||
'status_text': ProductsService._status_text(t.status)
|
'status_text': st_text
|
||||||
})
|
})
|
||||||
|
|
||||||
# export
|
# export
|
||||||
@@ -116,20 +129,20 @@ class ProductsService(BaseService):
|
|||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
return ResponseHelper.internal_server_error()
|
return ResponseHelper.internal_server_error()
|
||||||
|
|
||||||
@staticmethod
|
# @staticmethod
|
||||||
def _status_text(status):
|
# def _status_text(self, status):
|
||||||
st_text = "Activate Now"
|
# st_text = "Activate Now"
|
||||||
match status:
|
# match str(status):
|
||||||
case 1:
|
# case "1":
|
||||||
st_text = "Coming Soon"
|
# st_text = "Coming Soon"
|
||||||
case 5:
|
# case "5":
|
||||||
st_text = "Activate Now"
|
# st_text = "Activate Now"
|
||||||
case 6:
|
# case "6":
|
||||||
st_text = "Creating"
|
# st_text = "Creating"
|
||||||
case _:
|
# case _:
|
||||||
st_text = "Activate Now"
|
# st_text = "Activate Now"
|
||||||
|
#
|
||||||
return st_text
|
# return st_text
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def product_url_request(data):
|
def product_url_request(data):
|
||||||
|
|||||||
Reference in New Issue
Block a user