
Updates the sign-in API endpoint to `/simpos/v1/sign_in`. Captures the `set-cookie` header from successful sign-in responses and stores it as a `sessionId`. Persists the session ID using secure storage and includes it in subsequent API requests via the `Cookie` header for improved session management. Extends the `AuthModel` to include the new `sessionId` field. Enables navigation from the reception list to a new reception details page, passing the selected reception's ID. Refactors the `StockPickingCard` into a dedicated component and adds loading indicators to the reception list.
21 lines
530 B
Dart
21 lines
530 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'auth_model.freezed.dart';
|
|
part 'auth_model.g.dart';
|
|
|
|
@Freezed(toJson: false)
|
|
abstract class AuthModel with _$AuthModel {
|
|
factory AuthModel({
|
|
@JsonKey(name: 'access_token') String? accessToken,
|
|
@JsonKey(name: 'db_name') String? dbName,
|
|
int? uid,
|
|
String? refreshToken,
|
|
String? name,
|
|
String? username,
|
|
String? sessionId,
|
|
}) = _AuthModel;
|
|
|
|
factory AuthModel.fromJson(Map<String, dynamic> json) =>
|
|
_$AuthModelFromJson(json);
|
|
}
|