Browse Source

Shift order status key

Vova Tkach 5 years ago
parent
commit
134c6e27e9

+ 1 - 1
modules/module_index_act_mysql_setup.go

@@ -290,7 +290,7 @@ func (this *Modules) RegisterAction_IndexMysqlSetup() *Action {
 				client_email varchar(64) NOT NULL COMMENT 'Client email',
 				client_delivery_comment text NOT NULL COMMENT 'Client delivery comment',
 				client_order_comment text NOT NULL COMMENT 'Client order comment',
-				status int(1) NOT NULL COMMENT 'new/confirmed/canceled/inprogress/completed',
+				status int(1) NOT NULL COMMENT 'new/confirmed/inprogress/canceled/completed',
 				PRIMARY KEY (id)
 			) ENGINE=InnoDB DEFAULT CHARSET=utf8;`,
 		); err != nil {

+ 2 - 2
modules/module_shop.go

@@ -319,9 +319,9 @@ func (this *Modules) shop_GetOrderStatus(status int) string {
 	} else if status == 1 {
 		return `<span style="color:#28a745;">Confirmed</span>`
 	} else if status == 2 {
-		return `<span style="color:#d9534f;">Canceled</span>`
-	} else if status == 3 {
 		return `<span style="color:#f0ad4e;">In progress</span>`
+	} else if status == 3 {
+		return `<span style="color:#d9534f;">Canceled</span>`
 	} else if status == 4 {
 		return `<span style="color:#6c757d;">Completed</span>`
 	}

+ 1 - 1
support/migrate/000000015.go

@@ -23,7 +23,7 @@ func Migrate_000000015(db *sqlw.DB, host string) error {
 			client_email varchar(64) NOT NULL COMMENT 'Client email',
 			client_delivery_comment text NOT NULL COMMENT 'Client delivery comment',
 			client_order_comment text NOT NULL COMMENT 'Client order comment',
-			status int(1) NOT NULL COMMENT 'new/confirmed/canceled/inprogress/completed',
+			status int(1) NOT NULL COMMENT 'new/confirmed/inprogress/canceled/completed',
 			PRIMARY KEY (id)
 		) ENGINE=InnoDB DEFAULT CHARSET=utf8;`,
 	); err != nil {

+ 1 - 1
support/schema.sql

@@ -112,7 +112,7 @@ CREATE TABLE shop_orders (
 	client_email varchar(64) NOT NULL COMMENT 'Client email',
 	client_delivery_comment text NOT NULL COMMENT 'Client delivery comment',
 	client_order_comment text NOT NULL COMMENT 'Client order comment',
-	status int(1) NOT NULL COMMENT 'new/confirmed/canceled/inprogress/completed',
+	status int(1) NOT NULL COMMENT 'new/confirmed/inprogress/canceled/completed',
 	PRIMARY KEY (id)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 CREATE TABLE shop_product_images (