| Line 79... |
Line 79... |
| 79 |
if(!UserManager.getUserManager().canMarkReady(getUsername(), entityId)){
|
79 |
if(!UserManager.getUserManager().canMarkReady(getUsername(), entityId)){
|
| 80 |
addActionError("You do not have rights to mark entity as ready");
|
80 |
addActionError("You do not have rights to mark entity as ready");
|
| 81 |
return "success";
|
81 |
return "success";
|
| 82 |
}
|
82 |
}
|
| 83 |
try {
|
83 |
try {
|
| - |
|
84 |
EntityState state = CreationUtils.getEntityState(entityId);
|
| - |
|
85 |
|
| 84 |
CatalogServiceClient csc = new CatalogServiceClient();
|
86 |
CatalogServiceClient csc = new CatalogServiceClient();
|
| 85 |
in.shop2020.model.v1.catalog.InventoryService.Client iclient = csc.getClient();
|
87 |
in.shop2020.model.v1.catalog.InventoryService.Client iclient = csc.getClient();
|
| 86 |
iclient.markItemAsContentComplete(entityId);
|
88 |
iclient.markItemAsContentComplete(entityId, state.getCategoryID(), state.getBrand(), state.getModelName(), state.getModelNumber());
|
| - |
|
89 |
|
| 87 |
|
90 |
|
| 88 |
EntityState state = CreationUtils.getEntityState(entityId);
|
- |
|
| 89 |
state.readyEntity(getUsername());
|
91 |
state.readyEntity(getUsername());
|
| 90 |
CreationUtils.updateEntityState(state);
|
92 |
CreationUtils.updateEntityState(state);
|
| 91 |
addActionMessage("Entity marked as ready successfully");
|
93 |
addActionMessage("Entity marked as ready successfully");
|
| 92 |
} catch (Exception e) {
|
94 |
} catch (Exception e) {
|
| 93 |
addActionError("Unable to mark entity as ready.");
|
95 |
addActionError("Unable to mark entity as ready.");
|